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

Annotation of xenocara/Makefile, Revision 1.21

1.21    ! todd        1: # $OpenBSD: Makefile,v 1.20 2007/03/31 20:25:53 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.4       matthieu   10: SUBDIR= proto data/bitmaps lib app data/xkbdata xserver driver util doc
1.1       matthieu   11: .ifndef NOFONTS
                     12: SUBDIR+= font
                     13: .endif
1.18      todd       14: SUBDIR+= distrib/notes
1.1       matthieu   15:
1.10      matthieu   16: NOOBJ=
1.1       matthieu   17:
                     18: build: beforebuild _SUBDIRUSE
                     19:
                     20: bootstrap:
                     21:        ${SUDO} ${MAKE} distrib-dirs
                     22:        cd ${.CURDIR}/share/mk \
1.19      matthieu   23:                && exec ${SUDO} ${MAKE} X11BASE=${X11BASE} install
1.1       matthieu   24:
                     25: beforebuild: bootstrap
                     26:        cd ${.CURDIR}/util/macros \
                     27:                && ${MAKE} -f Makefile.bsd-wrapper \
1.19      matthieu   28:                && exec ${SUDO} ${MAKE} -f Makefile.bsd-wrapper install
                     29:        exec ${SUDO} ${MAKE} includes
1.1       matthieu   30:
                     31: beforeinstall:
                     32:        ${MAKE} distrib-dirs
                     33:        ${MAKE} includes
                     34:
1.14      matthieu   35: afterinstall:
                     36:        ${MAKE} install-mk
                     37:        ${MAKE} fix-appd
1.3       matthieu   38:        /usr/libexec/makewhatis ${DESTDIR}/usr/X11R6/man
                     39:
1.9       matthieu   40: realinstall: _SUBDIRUSE
1.14      matthieu   41:
                     42: install-mk:
                     43: .if defined(DESTDIR) && (${DESTDIR} != "" || ${DESTDIR} != "/")
                     44:        cd ${.CURDIR}/share/mk \
                     45:                && ${MAKE} X11BASE=${X11BASE} install
                     46: .endif
1.10      matthieu   47:
1.11      matthieu   48: fix-appd:
                     49:        # Make sure /usr/local/lib/X11/app-defaults is a link
                     50:        if [ ! -L $(DESTDIR)${LOCALAPPD} ]; then \
                     51:            if [ -d $(DESTDIR)${LOCALAPPD} ]; then \
                     52:                mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD}; \
                     53:                rmdir $(DESTDIR)${LOCALAPPD}; \
                     54:            fi; \
                     55:            mkdir -p ${DESTDIR}${LOCALAPPX}; \
                     56:            ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
                     57:        fi
1.3       matthieu   58:
                     59: release: release-clean distrib-dirs release-install dist
                     60:
                     61: release-clean:
                     62: .if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
                     63:        @echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
                     64: .endif
                     65:        ${RM} -rf ${DESTDIR}/usr/X11R6/* ${DESTDIR}/usr/X11R6/.[a-zA-Z0-9]*
                     66:        ${RM} -rf ${DESTDIR}/var/cache/*
                     67:        ${RM} -rf ${DESTDIR}/etc/X11/*
                     68:        ${RM} -rf ${DESTDIR}/etc/fonts/*
                     69:        @if [ -d ${DESTDIR}/usr/X11R6 ] && [ "`cd ${DESTDIR}/usr/X11R6;ls`" ]; then \
                     70:                echo "Files found in ${DESTDIR}/usr/X11R6:"; \
                     71:                (cd ${DESTDIR}/usr/X11R6;/bin/pwd;ls -a); \
                     72:                echo "Cleanup before proceeding."; \
                     73:                exit 255; \
                     74:        fi
                     75:
                     76: release-install:
                     77:        @${MAKE} install
                     78: .if ${MACHINE} == alpha || ${MACHINE} == hp300 || ${MACHINE} == mac68k || \
                     79:     ${MACHINE} == macppc || ${MACHINE} == sparc || ${MACHINE} == vax || \
                     80:     ${MACHINE} == zaurus
                     81:        @if [ -f $(DESTDIR)/etc/X11/xorg.conf ]; then \
                     82:         echo "Not overwriting existing" $(DESTDIR)/etc/X11/xorg.conf; \
                     83:        else set -x; \
                     84:         ${INSTALL} ${INSTALL_COPY} -o root -g wheel -m 644 \
                     85:                ${XCONFIG} ${DESTDIR}/etc/X11 ; \
                     86:        fi
                     87: .endif
                     88:
                     89: dist-rel:
                     90:        ${MAKE} RELEASEDIR=`pwd`/rel DESTDIR=`pwd`/dest dist 2>&1 | tee distlog
                     91:
                     92: dist:
                     93:        cd distrib/sets && \
                     94:                env MACHINE=${MACHINE} ksh ./maketars ${OSrev} ${OSREV} && \
                     95:                (env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true)
                     96:
1.1       matthieu   97:
                     98: distrib-dirs:
                     99:        if [ ! -d ${DESTDIR}${X11BASE}/. ]; then \
                    100:                ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}${X11BASE}/; \
                    101:        fi
                    102:        mtree -qdef ${.CURDIR}/etc/mtree/BSD.x11.dist \
                    103:                -p ${DESTDIR}${X11BASE}/ -U
1.2       matthieu  104:        if [ ! -d ${DESTDIR}${X11ETC}/. ]; then \
                    105:                ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}${X11ETC}/; \
                    106:        fi
1.6       matthieu  107:        mtree -qdef ${.CURDIR}/etc/mtree/BSD.etc-x11.dist \
1.2       matthieu  108:                -p ${DESTDIR}${X11ETC}/ -U
1.1       matthieu  109:
1.9       matthieu  110: .PHONY: all build beforeinstall install afterinstall release clean cleandir \
1.16      todd      111:        dist distrib-dirs fix-appd
1.1       matthieu  112:
1.11      matthieu  113: .include <bsd.subdir.mk>
1.1       matthieu  114: .include <bsd.xorg.mk>