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

Annotation of xenocara/Makefile, Revision 1.20

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