Annotation of xenocara/Makefile, Revision 1.23
1.23 ! matthieu 1: # $OpenBSD: Makefile,v 1.22 2007/10/27 20:01:23 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
73:
74: release-clean:
75: .if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
76: @echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
77: .endif
78: ${RM} -rf ${DESTDIR}/usr/X11R6/* ${DESTDIR}/usr/X11R6/.[a-zA-Z0-9]*
79: ${RM} -rf ${DESTDIR}/var/cache/*
80: ${RM} -rf ${DESTDIR}/etc/X11/*
81: ${RM} -rf ${DESTDIR}/etc/fonts/*
82: @if [ -d ${DESTDIR}/usr/X11R6 ] && [ "`cd ${DESTDIR}/usr/X11R6;ls`" ]; then \
83: echo "Files found in ${DESTDIR}/usr/X11R6:"; \
84: (cd ${DESTDIR}/usr/X11R6;/bin/pwd;ls -a); \
85: echo "Cleanup before proceeding."; \
86: exit 255; \
87: fi
88:
89: release-install:
90: @${MAKE} install
91: .if ${MACHINE} == alpha || ${MACHINE} == hp300 || ${MACHINE} == mac68k || \
92: ${MACHINE} == macppc || ${MACHINE} == sparc || ${MACHINE} == vax || \
93: ${MACHINE} == zaurus
94: @if [ -f $(DESTDIR)/etc/X11/xorg.conf ]; then \
95: echo "Not overwriting existing" $(DESTDIR)/etc/X11/xorg.conf; \
96: else set -x; \
97: ${INSTALL} ${INSTALL_COPY} -o root -g wheel -m 644 \
98: ${XCONFIG} ${DESTDIR}/etc/X11 ; \
99: fi
100: .endif
101:
102: dist-rel:
103: ${MAKE} RELEASEDIR=`pwd`/rel DESTDIR=`pwd`/dest dist 2>&1 | tee distlog
104:
105: dist:
106: cd distrib/sets && \
107: env MACHINE=${MACHINE} ksh ./maketars ${OSrev} ${OSREV} && \
108: (env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true)
109:
1.1 matthieu 110:
111: distrib-dirs:
112: if [ ! -d ${DESTDIR}${X11BASE}/. ]; then \
113: ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}${X11BASE}/; \
114: fi
115: mtree -qdef ${.CURDIR}/etc/mtree/BSD.x11.dist \
116: -p ${DESTDIR}${X11BASE}/ -U
1.2 matthieu 117: if [ ! -d ${DESTDIR}${X11ETC}/. ]; then \
118: ${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}${X11ETC}/; \
119: fi
1.6 matthieu 120: mtree -qdef ${.CURDIR}/etc/mtree/BSD.etc-x11.dist \
1.2 matthieu 121: -p ${DESTDIR}${X11ETC}/ -U
1.1 matthieu 122:
1.9 matthieu 123: .PHONY: all build beforeinstall install afterinstall release clean cleandir \
1.16 todd 124: dist distrib-dirs fix-appd
1.1 matthieu 125:
1.11 matthieu 126: .include <bsd.subdir.mk>
1.1 matthieu 127: .include <bsd.xorg.mk>