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

Annotation of xenocara/Makefile, Revision 1.41

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