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