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