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

Annotation of xenocara/Makefile, Revision 1.22

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