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

Annotation of xenocara/Makefile, Revision 1.11

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