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

Annotation of xenocara/Makefile, Revision 1.33

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