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

Annotation of xenocara/Makefile, Revision 1.27

1.27    ! matthieu    1: # $OpenBSD: Makefile,v 1.26 2008/06/12 21:58:28 matthieu 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.23      matthieu   10: .if ${MACHINE_ARCH} != "sh"
                     11: XSERVER= xserver
                     12: .endif
                     13:
                     14: SUBDIR= proto data/bitmaps lib app data/xkbdata ${XSERVER} driver util doc
1.1       matthieu   15: .ifndef NOFONTS
                     16: SUBDIR+= font
                     17: .endif
1.27    ! matthieu   18: SUBDIR+= share/pciids
1.18      todd       19: SUBDIR+= distrib/notes
1.1       matthieu   20:
1.10      matthieu   21: NOOBJ=
1.1       matthieu   22:
                     23: build: beforebuild _SUBDIRUSE
                     24:
                     25: bootstrap:
                     26:        ${SUDO} ${MAKE} distrib-dirs
                     27:        cd ${.CURDIR}/share/mk \
1.19      matthieu   28:                && exec ${SUDO} ${MAKE} X11BASE=${X11BASE} install
1.1       matthieu   29:
                     30: beforebuild: bootstrap
                     31:        cd ${.CURDIR}/util/macros \
                     32:                && ${MAKE} -f Makefile.bsd-wrapper \
1.19      matthieu   33:                && exec ${SUDO} ${MAKE} -f Makefile.bsd-wrapper install
                     34:        exec ${SUDO} ${MAKE} includes
1.1       matthieu   35:
                     36: beforeinstall:
                     37:        ${MAKE} distrib-dirs
                     38:        ${MAKE} includes
                     39:
1.14      matthieu   40: afterinstall:
                     41:        ${MAKE} install-mk
                     42:        ${MAKE} fix-appd
1.22      matthieu   43:        ${MAKE} font-cache
1.3       matthieu   44:        /usr/libexec/makewhatis ${DESTDIR}/usr/X11R6/man
                     45:
1.9       matthieu   46: realinstall: _SUBDIRUSE
1.14      matthieu   47:
                     48: install-mk:
                     49: .if defined(DESTDIR) && (${DESTDIR} != "" || ${DESTDIR} != "/")
                     50:        cd ${.CURDIR}/share/mk \
                     51:                && ${MAKE} X11BASE=${X11BASE} install
                     52: .endif
1.22      matthieu   53:
                     54: font-cache:
                     55:        @echo "running fc-cache"
                     56:        if test -z "$(DESTDIR)"; then \
                     57:                fc-cache -s -v ;\
                     58:        else\
                     59:                fc-cache -c ${DESTDIR} -s -v ;\
                     60:        fi
1.10      matthieu   61:
1.11      matthieu   62: fix-appd:
                     63:        # Make sure /usr/local/lib/X11/app-defaults is a link
                     64:        if [ ! -L $(DESTDIR)${LOCALAPPD} ]; then \
                     65:            if [ -d $(DESTDIR)${LOCALAPPD} ]; then \
                     66:                mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD}; \
                     67:                rmdir $(DESTDIR)${LOCALAPPD}; \
                     68:            fi; \
                     69:            mkdir -p ${DESTDIR}${LOCALAPPX}; \
                     70:            ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
                     71:        fi
1.3       matthieu   72:
                     73: release: release-clean distrib-dirs release-install dist
1.24      espie      74: .ORDER: release-clean distrib-dirs 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:
                     92:        @${MAKE} install
                     93: .if ${MACHINE} == alpha || ${MACHINE} == hp300 || ${MACHINE} == mac68k || \
1.26      matthieu   94:     ${MACHINE} == macppc || ${MACHINE} == sparc || ${MACHINE} == sgi || \
                     95:     ${MACHINE} == vax || ${MACHINE} == zaurus
1.3       matthieu   96:        @if [ -f $(DESTDIR)/etc/X11/xorg.conf ]; then \
                     97:         echo "Not overwriting existing" $(DESTDIR)/etc/X11/xorg.conf; \
                     98:        else set -x; \
                     99:         ${INSTALL} ${INSTALL_COPY} -o root -g wheel -m 644 \
                    100:                ${XCONFIG} ${DESTDIR}/etc/X11 ; \
                    101:        fi
                    102: .endif
                    103:
                    104: dist-rel:
                    105:        ${MAKE} RELEASEDIR=`pwd`/rel DESTDIR=`pwd`/dest dist 2>&1 | tee distlog
                    106:
                    107: dist:
                    108:        cd distrib/sets && \
                    109:                env MACHINE=${MACHINE} ksh ./maketars ${OSrev} ${OSREV} && \
                    110:                (env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true)
                    111:
1.1       matthieu  112:
                    113: distrib-dirs:
1.25      matthieu  114: .if defined(DESTDIR) && ${DESTDIR} != ""
                    115:        mtree -qdef ${.CURDIR}/etc/mtree/BSD.x11.dist -p ${DESTDIR} -U
                    116: .else
                    117:        mtree -qdef ${.CURDIR}/etc/mtree/BSD.x11.dist -p / -U
                    118: .endif
                    119:
1.1       matthieu  120:
1.9       matthieu  121: .PHONY: all build beforeinstall install afterinstall release clean cleandir \
1.16      todd      122:        dist distrib-dirs fix-appd
1.1       matthieu  123:
1.11      matthieu  124: .include <bsd.subdir.mk>
1.1       matthieu  125: .include <bsd.xorg.mk>