Annotation of xenocara/Makefile, Revision 1.49
1.49 ! matthieu 1: # $OpenBSD: Makefile,v 1.48 2012/10/17 08:48:43 espie Exp $
1.1 matthieu 2: .include <bsd.own.mk>
1.45 matthieu 3: .include <bsd.xconf.mk>
1.1 matthieu 4:
1.11 matthieu 5: LOCALAPPD=/usr/local/lib/X11/app-defaults
6: LOCALAPPX=/usr/local/lib/X11
7: REALAPPD=/etc/X11/app-defaults
1.20 matthieu 8: XCONFIG=${XSRCDIR}/etc/X11.${MACHINE}/xorg.conf
1.15 todd 9: RM?=rm
1.11 matthieu 10:
1.30 matthieu 11: .if ${MACHINE_ARCH} != "sh" && ${MACHINE_ARCH} != "vax"
1.23 matthieu 12: XSERVER= xserver
1.28 matthieu 13: .endif
14:
1.46 matthieu 15: .if defined(XENOCARA_BUILD_PIXMAN)
1.45 matthieu 16: .if ${COMPILER_VERSION:L:Mgcc[34]*} && ${XENOCARA_BUILD_PIXMAN:L} == "yes"
1.28 matthieu 17: XSERVER+= kdrive
1.46 matthieu 18: .endif
1.23 matthieu 19: .endif
20:
1.41 matthieu 21: SUBDIR= proto font/util data/bitmaps lib app data \
1.33 matthieu 22: ${XSERVER} driver util doc
1.1 matthieu 23: .ifndef NOFONTS
24: SUBDIR+= font
25: .endif
1.18 todd 26: SUBDIR+= distrib/notes
1.1 matthieu 27:
1.10 matthieu 28: NOOBJ=
1.1 matthieu 29:
1.47 espie 30: build:
31: exec ${SUDO} ${MAKE} bootstrap-root
32: cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper
33: exec ${SUDO} ${MAKE} beforebuild
34: exec ${MAKE} realbuild
35: exec ${SUDO} ${MAKE} afterbuild
36:
37: realbuild: _SUBDIRUSE
38: # that's all folks
1.1 matthieu 39:
40: bootstrap:
1.47 espie 41: exec ${SUDO} ${MAKE} bootstrap-root
42:
43: bootstrap-root:
44: exec ${MAKE} distrib-dirs
45: exec ${MAKE} install-mk
46:
47: beforeinstall beforebuild:
48: cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper install
49: exec ${MAKE} includes
50:
51: afterinstall afterbuild:
52: exec ${MAKE} fix-appd
1.43 schwarze 53: /usr/libexec/makewhatis -v ${DESTDIR}/usr/X11R6/man
1.3 matthieu 54:
1.14 matthieu 55: install-mk:
1.47 espie 56: cd share/mk && exec ${MAKE} X11BASE=${X11BASE} install
1.10 matthieu 57:
1.11 matthieu 58: fix-appd:
59: # Make sure /usr/local/lib/X11/app-defaults is a link
60: if [ ! -L $(DESTDIR)${LOCALAPPD} ]; then \
61: if [ -d $(DESTDIR)${LOCALAPPD} ]; then \
1.48 espie 62: mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD} || true; \
1.11 matthieu 63: rmdir $(DESTDIR)${LOCALAPPD}; \
64: fi; \
65: mkdir -p ${DESTDIR}${LOCALAPPX}; \
66: ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
67: fi
1.3 matthieu 68:
1.47 espie 69: font-cache:
70: cd font/alias && exec ${MAKE} -f Makefile.bsd-wrapper afterinstall
71:
72: release: release-clean release-install dist
73: .ORDER: release-clean 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:
1.47 espie 91: @exec ${SUDO} ${MAKE} bootstrap-root
92: @exec ${MAKE} install
1.44 matthieu 93: .if ${MACHINE} == zaurus
1.3 matthieu 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
1.34 ajacouto 101: touch ${DESTDIR}/var/db/sysmerge/xetcsum
102: TMPSUM=`mktemp /tmp/_xetcsum.XXXXXXXXXX` || exit 1; \
103: sort distrib/sets/lists/xetc/{mi,md.${MACHINE}} > $${TMPSUM}; \
104: cd ${DESTDIR} && \
105: xargs cksum < $${TMPSUM} > ${DESTDIR}/var/db/sysmerge/xetcsum; \
106: rm -f $${TMPSUM}
1.3 matthieu 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} && \
1.47 espie 114: { env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true ; }
1.3 matthieu 115:
1.1 matthieu 116:
117: distrib-dirs:
1.25 matthieu 118: .if defined(DESTDIR) && ${DESTDIR} != ""
1.47 espie 119: # running mtree under ${DESTDIR}
1.31 matthieu 120: mtree -qdef /etc/mtree/BSD.x11.dist -p ${DESTDIR} -U
1.25 matthieu 121: .else
1.47 espie 122: # running mtree
1.31 matthieu 123: mtree -qdef /etc/mtree/BSD.x11.dist -p / -U
1.25 matthieu 124: .endif
125:
1.1 matthieu 126:
1.9 matthieu 127: .PHONY: all build beforeinstall install afterinstall release clean cleandir \
1.47 espie 128: dist distrib-dirs fix-appd beforebuild bootstrap afterbuild realbuild \
129: install-mk bootstrap-root
1.1 matthieu 130:
1.11 matthieu 131: .include <bsd.subdir.mk>
1.1 matthieu 132: .include <bsd.xorg.mk>