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