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