[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / xenocara

Annotation of xenocara/Makefile, Revision 1.47

1.47    ! espie       1: # $OpenBSD: Makefile,v 1.46 2012/04/01 23:00:24 matthieu Exp $
1.1       matthieu    2: .include <bsd.own.mk>
1.45      matthieu    3: .include <bsd.xconf.mk>
1.1       matthieu    4:
1.11      matthieu    5: LOCALAPPD=/usr/local/lib/X11/app-defaults
                      6: LOCALAPPX=/usr/local/lib/X11
                      7: REALAPPD=/etc/X11/app-defaults
1.20      matthieu    8: XCONFIG=${XSRCDIR}/etc/X11.${MACHINE}/xorg.conf
1.15      todd        9: RM?=rm
1.11      matthieu   10:
1.30      matthieu   11: .if ${MACHINE_ARCH} != "sh" && ${MACHINE_ARCH} != "vax"
1.23      matthieu   12: XSERVER= xserver
1.28      matthieu   13: .endif
                     14:
1.46      matthieu   15: .if defined(XENOCARA_BUILD_PIXMAN)
1.45      matthieu   16: .if ${COMPILER_VERSION:L:Mgcc[34]*} && ${XENOCARA_BUILD_PIXMAN:L} == "yes"
1.28      matthieu   17: XSERVER+= kdrive
1.46      matthieu   18: .endif
1.23      matthieu   19: .endif
                     20:
1.41      matthieu   21: SUBDIR= proto font/util data/bitmaps lib app data \
1.33      matthieu   22:        ${XSERVER} driver util doc
1.1       matthieu   23: .ifndef NOFONTS
                     24: SUBDIR+= font
                     25: .endif
1.27      matthieu   26: SUBDIR+= share/pciids
1.18      todd       27: SUBDIR+= distrib/notes
1.1       matthieu   28:
1.10      matthieu   29: NOOBJ=
1.1       matthieu   30:
1.47    ! espie      31: build:
        !            32:        exec ${SUDO} ${MAKE} bootstrap-root
        !            33:        cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper
        !            34:        exec ${SUDO} ${MAKE} beforebuild
        !            35:        exec ${MAKE} realbuild
        !            36:        exec ${SUDO} ${MAKE} afterbuild
        !            37:
        !            38: realbuild: _SUBDIRUSE
        !            39:        # that's all folks
1.1       matthieu   40:
                     41: bootstrap:
1.47    ! espie      42:        exec ${SUDO} ${MAKE} bootstrap-root
        !            43:
        !            44: bootstrap-root:
        !            45:        exec ${MAKE} distrib-dirs
        !            46:        exec ${MAKE} install-mk
        !            47:
        !            48: beforeinstall beforebuild:
        !            49:        cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper install
        !            50:        exec ${MAKE} includes
        !            51:
        !            52: afterinstall afterbuild:
        !            53:        exec ${MAKE} fix-appd
1.43      schwarze   54:        /usr/libexec/makewhatis -v ${DESTDIR}/usr/X11R6/man
1.3       matthieu   55:
1.14      matthieu   56: install-mk:
1.47    ! espie      57:        cd share/mk && exec ${MAKE} X11BASE=${X11BASE} install
1.10      matthieu   58:
1.11      matthieu   59: fix-appd:
                     60:        # Make sure /usr/local/lib/X11/app-defaults is a link
                     61:        if [ ! -L $(DESTDIR)${LOCALAPPD} ]; then \
                     62:            if [ -d $(DESTDIR)${LOCALAPPD} ]; then \
                     63:                mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD}; \
                     64:                rmdir $(DESTDIR)${LOCALAPPD}; \
                     65:            fi; \
                     66:            mkdir -p ${DESTDIR}${LOCALAPPX}; \
                     67:            ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
                     68:        fi
1.3       matthieu   69:
1.47    ! espie      70: font-cache:
        !            71:        cd font/alias && exec ${MAKE} -f Makefile.bsd-wrapper afterinstall
        !            72:
        !            73: release: release-clean release-install dist
        !            74: .ORDER: release-clean release-install dist
1.3       matthieu   75:
                     76: release-clean:
                     77: .if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
                     78:        @echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
                     79: .endif
                     80:        ${RM} -rf ${DESTDIR}/usr/X11R6/* ${DESTDIR}/usr/X11R6/.[a-zA-Z0-9]*
                     81:        ${RM} -rf ${DESTDIR}/var/cache/*
                     82:        ${RM} -rf ${DESTDIR}/etc/X11/*
                     83:        ${RM} -rf ${DESTDIR}/etc/fonts/*
                     84:        @if [ -d ${DESTDIR}/usr/X11R6 ] && [ "`cd ${DESTDIR}/usr/X11R6;ls`" ]; then \
                     85:                echo "Files found in ${DESTDIR}/usr/X11R6:"; \
                     86:                (cd ${DESTDIR}/usr/X11R6;/bin/pwd;ls -a); \
                     87:                echo "Cleanup before proceeding."; \
                     88:                exit 255; \
                     89:        fi
                     90:
                     91: release-install:
1.47    ! espie      92:        @exec ${SUDO} ${MAKE} bootstrap-root
        !            93:        @exec ${MAKE} install
1.44      matthieu   94: .if ${MACHINE} == zaurus
1.3       matthieu   95:        @if [ -f $(DESTDIR)/etc/X11/xorg.conf ]; then \
                     96:         echo "Not overwriting existing" $(DESTDIR)/etc/X11/xorg.conf; \
                     97:        else set -x; \
                     98:         ${INSTALL} ${INSTALL_COPY} -o root -g wheel -m 644 \
                     99:                ${XCONFIG} ${DESTDIR}/etc/X11 ; \
                    100:        fi
                    101: .endif
1.34      ajacouto  102:        touch ${DESTDIR}/var/db/sysmerge/xetcsum
                    103:        TMPSUM=`mktemp /tmp/_xetcsum.XXXXXXXXXX` || exit 1; \
                    104:        sort distrib/sets/lists/xetc/{mi,md.${MACHINE}} > $${TMPSUM}; \
                    105:        cd ${DESTDIR} && \
                    106:                xargs cksum < $${TMPSUM} > ${DESTDIR}/var/db/sysmerge/xetcsum; \
                    107:        rm -f $${TMPSUM}
1.3       matthieu  108:
                    109: dist-rel:
                    110:        ${MAKE} RELEASEDIR=`pwd`/rel DESTDIR=`pwd`/dest dist 2>&1 | tee distlog
                    111:
                    112: dist:
                    113:        cd distrib/sets && \
                    114:                env MACHINE=${MACHINE} ksh ./maketars ${OSrev} ${OSREV} && \
1.47    ! espie     115:                { env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true ; }
1.3       matthieu  116:
1.1       matthieu  117:
                    118: distrib-dirs:
1.25      matthieu  119: .if defined(DESTDIR) && ${DESTDIR} != ""
1.47    ! espie     120:        # running mtree under ${DESTDIR}
1.31      matthieu  121:        mtree -qdef /etc/mtree/BSD.x11.dist -p ${DESTDIR} -U
1.25      matthieu  122: .else
1.47    ! espie     123:        # running mtree
1.31      matthieu  124:        mtree -qdef /etc/mtree/BSD.x11.dist -p / -U
1.25      matthieu  125: .endif
                    126:
1.1       matthieu  127:
1.9       matthieu  128: .PHONY: all build beforeinstall install afterinstall release clean cleandir \
1.47    ! espie     129:        dist distrib-dirs fix-appd beforebuild bootstrap afterbuild realbuild \
        !           130:        install-mk bootstrap-root
1.1       matthieu  131:
1.11      matthieu  132: .include <bsd.subdir.mk>
1.1       matthieu  133: .include <bsd.xorg.mk>