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