Annotation of xenocara/Makefile, Revision 1.72
1.72 ! matthieu 1: # $OpenBSD: Makefile,v 1.71 2016/07/30 12:18:35 matthieu 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.15 todd 8: RM?=rm
1.11 matthieu 9:
1.23 matthieu 10: XSERVER= xserver
11:
1.41 matthieu 12: SUBDIR= proto font/util data/bitmaps lib app data \
1.33 matthieu 13: ${XSERVER} driver util doc
1.1 matthieu 14: .ifndef NOFONTS
15: SUBDIR+= font
16: .endif
1.18 todd 17: SUBDIR+= distrib/notes
1.1 matthieu 18:
1.10 matthieu 19: NOOBJ=
1.1 matthieu 20:
1.66 matthieu 21: .if defined(DESTDIR)
22: build:
23: @echo "Cannot run ${MAKE} build with DESTDIR set"
24: @exit 2
25: .else
1.47 espie 26: build:
27: exec ${SUDO} ${MAKE} bootstrap-root
28: cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper
29: exec ${SUDO} ${MAKE} beforebuild
30: exec ${MAKE} realbuild
31: exec ${SUDO} ${MAKE} afterbuild
1.66 matthieu 32: .endif
1.47 espie 33:
34: realbuild: _SUBDIRUSE
35: # that's all folks
1.1 matthieu 36:
37: bootstrap:
1.47 espie 38: exec ${SUDO} ${MAKE} bootstrap-root
39:
40: bootstrap-root:
41: exec ${MAKE} distrib-dirs
42: exec ${MAKE} install-mk
43:
44: beforeinstall beforebuild:
45: cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper install
46: exec ${MAKE} includes
47:
48: afterinstall afterbuild:
49: exec ${MAKE} fix-appd
1.57 schwarze 50: /usr/sbin/makewhatis -Qv ${DESTDIR}/usr/X11R6/man
1.68 ajacouto 51: touch ${DESTDIR}/var/sysmerge/xetcsum
1.63 ajacouto 52: cd ${DESTDIR}/ && \
53: sort ${.CURDIR}/distrib/sets/lists/xetc/{mi,md.${MACHINE}} | \
1.68 ajacouto 54: xargs sha256 -h ${DESTDIR}/var/sysmerge/xetcsum || true
1.58 espie 55: cd distrib/sets && exec ${MAKE}
1.3 matthieu 56:
1.14 matthieu 57: install-mk:
1.47 espie 58: cd share/mk && exec ${MAKE} X11BASE=${X11BASE} install
1.10 matthieu 59:
1.11 matthieu 60: fix-appd:
61: # Make sure /usr/local/lib/X11/app-defaults is a link
62: if [ ! -L $(DESTDIR)${LOCALAPPD} ]; then \
63: if [ -d $(DESTDIR)${LOCALAPPD} ]; then \
1.48 espie 64: mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD} || true; \
1.11 matthieu 65: rmdir $(DESTDIR)${LOCALAPPD}; \
66: fi; \
67: mkdir -p ${DESTDIR}${LOCALAPPX}; \
68: ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
69: fi
1.3 matthieu 70:
1.47 espie 71: font-cache:
72: cd font/alias && exec ${MAKE} -f Makefile.bsd-wrapper afterinstall
73:
1.53 espie 74: .if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
75: release:
76: @echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
77: .else
1.55 todd 78: release: sha
79:
80: sha: release-clean release-install dist hash
81:
82: hash: dist
83: -cd ${RELEASEDIR}; \
1.56 sthen 84: cksum -a sha256 x*tgz > SHA256
1.55 todd 85:
86: .ORDER: release-clean release-install dist hash
1.53 espie 87: .endif
1.3 matthieu 88:
89: release-clean:
90: ${RM} -rf ${DESTDIR}/usr/X11R6/* ${DESTDIR}/usr/X11R6/.[a-zA-Z0-9]*
91: ${RM} -rf ${DESTDIR}/var/cache/*
92: ${RM} -rf ${DESTDIR}/etc/X11/*
93: ${RM} -rf ${DESTDIR}/etc/fonts/*
94: @if [ -d ${DESTDIR}/usr/X11R6 ] && [ "`cd ${DESTDIR}/usr/X11R6;ls`" ]; then \
95: echo "Files found in ${DESTDIR}/usr/X11R6:"; \
96: (cd ${DESTDIR}/usr/X11R6;/bin/pwd;ls -a); \
97: echo "Cleanup before proceeding."; \
98: exit 255; \
99: fi
100:
101: release-install:
1.59 matthieu 102: @exec ${MAKE} bootstrap-root
1.61 matthieu 103: @exec ${MAKE} install
1.3 matthieu 104:
105: dist-rel:
106: ${MAKE} RELEASEDIR=`pwd`/rel DESTDIR=`pwd`/dest dist 2>&1 | tee distlog
107:
108: dist:
109: cd distrib/sets && \
1.67 deraadt 110: env MACHINE=${MACHINE} ksh ./maketars ${OSrev} ${OSREV}
1.3 matthieu 111:
1.64 deraadt 112: checkdist:
1.65 deraadt 113: @cd distrib/sets && \
1.64 deraadt 114: { env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true ; }
1.1 matthieu 115:
116: distrib-dirs:
1.25 matthieu 117: .if defined(DESTDIR) && ${DESTDIR} != ""
1.47 espie 118: # running mtree under ${DESTDIR}
1.31 matthieu 119: mtree -qdef /etc/mtree/BSD.x11.dist -p ${DESTDIR} -U
1.25 matthieu 120: .else
1.47 espie 121: # running mtree
1.31 matthieu 122: mtree -qdef /etc/mtree/BSD.x11.dist -p / -U
1.25 matthieu 123: .endif
124:
1.1 matthieu 125:
1.9 matthieu 126: .PHONY: all build beforeinstall install afterinstall release clean cleandir \
1.47 espie 127: dist distrib-dirs fix-appd beforebuild bootstrap afterbuild realbuild \
128: install-mk bootstrap-root
1.1 matthieu 129:
1.11 matthieu 130: .include <bsd.subdir.mk>
1.1 matthieu 131: .include <bsd.xorg.mk>