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