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