Annotation of xenocara/Makefile, Revision 1.74
1.74 ! matthieu 1: # $OpenBSD: Makefile,v 1.73 2016/10/02 09:25:23 tb 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:
47: afterinstall afterbuild:
48: exec ${MAKE} fix-appd
1.57 schwarze 49: /usr/sbin/makewhatis -Qv ${DESTDIR}/usr/X11R6/man
1.73 tb 50: chown root:wheel ${DESTDIR}/usr/X11R6/man/mandoc.db
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.73 tb 55: chown root:wheel ${DESTDIR}/var/sysmerge/xetcsum
1.58 espie 56: cd distrib/sets && exec ${MAKE}
1.3 matthieu 57:
1.14 matthieu 58: install-mk:
1.47 espie 59: cd share/mk && exec ${MAKE} X11BASE=${X11BASE} install
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 \
1.48 espie 65: mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD} || true; \
1.11 matthieu 66: rmdir $(DESTDIR)${LOCALAPPD}; \
67: fi; \
68: mkdir -p ${DESTDIR}${LOCALAPPX}; \
69: ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
1.73 tb 70: chown -h root:wheel ${DESTDIR}${LOCALAPPD}; \
1.11 matthieu 71: fi
1.3 matthieu 72:
1.47 espie 73: font-cache:
74: cd font/alias && exec ${MAKE} -f Makefile.bsd-wrapper afterinstall
75:
1.53 espie 76: .if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
77: release:
78: @echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
79: .else
1.55 todd 80: release: sha
81:
82: sha: release-clean release-install dist hash
83:
84: hash: dist
85: -cd ${RELEASEDIR}; \
1.56 sthen 86: cksum -a sha256 x*tgz > SHA256
1.55 todd 87:
88: .ORDER: release-clean release-install dist hash
1.53 espie 89: .endif
1.3 matthieu 90:
91: release-clean:
92: ${RM} -rf ${DESTDIR}/usr/X11R6/* ${DESTDIR}/usr/X11R6/.[a-zA-Z0-9]*
93: ${RM} -rf ${DESTDIR}/var/cache/*
94: ${RM} -rf ${DESTDIR}/etc/X11/*
95: ${RM} -rf ${DESTDIR}/etc/fonts/*
96: @if [ -d ${DESTDIR}/usr/X11R6 ] && [ "`cd ${DESTDIR}/usr/X11R6;ls`" ]; then \
97: echo "Files found in ${DESTDIR}/usr/X11R6:"; \
98: (cd ${DESTDIR}/usr/X11R6;/bin/pwd;ls -a); \
99: echo "Cleanup before proceeding."; \
100: exit 255; \
101: fi
102:
103: release-install:
1.59 matthieu 104: @exec ${MAKE} bootstrap-root
1.61 matthieu 105: @exec ${MAKE} install
1.3 matthieu 106:
107: dist-rel:
108: ${MAKE} RELEASEDIR=`pwd`/rel DESTDIR=`pwd`/dest dist 2>&1 | tee distlog
109:
110: dist:
111: cd distrib/sets && \
1.67 deraadt 112: env MACHINE=${MACHINE} ksh ./maketars ${OSrev} ${OSREV}
1.3 matthieu 113:
1.64 deraadt 114: checkdist:
1.65 deraadt 115: @cd distrib/sets && \
1.64 deraadt 116: { env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true ; }
1.1 matthieu 117:
118: distrib-dirs:
1.25 matthieu 119: .if defined(DESTDIR) && ${DESTDIR} != ""
1.47 espie 120: # running mtree under ${DESTDIR}
1.31 matthieu 121: mtree -qdef /etc/mtree/BSD.x11.dist -p ${DESTDIR} -U
1.25 matthieu 122: .else
1.47 espie 123: # running mtree
1.31 matthieu 124: mtree -qdef /etc/mtree/BSD.x11.dist -p / -U
1.25 matthieu 125: .endif
126:
1.1 matthieu 127:
1.9 matthieu 128: .PHONY: all build beforeinstall install afterinstall release clean cleandir \
1.47 espie 129: dist distrib-dirs fix-appd beforebuild bootstrap afterbuild realbuild \
130: install-mk bootstrap-root
1.1 matthieu 131:
1.11 matthieu 132: .include <bsd.subdir.mk>
1.1 matthieu 133: .include <bsd.xorg.mk>