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