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

Annotation of xenocara/Makefile, Revision 1.15

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