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

Annotation of xenocara/Makefile, Revision 1.45

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