2014-07-16 15:38:36 -06:00
|
|
|
# $OpenBSD: Makefile,v 1.60 2014/07/16 21:38:36 ajacoutot Exp $
|
2006-11-26 07:00:56 -07:00
|
|
|
.include <bsd.own.mk>
|
2012-04-01 03:24:04 -06:00
|
|
|
.include <bsd.xconf.mk>
|
2006-11-26 07:00:56 -07:00
|
|
|
|
2006-12-23 06:08:07 -07:00
|
|
|
LOCALAPPD=/usr/local/lib/X11/app-defaults
|
|
|
|
LOCALAPPX=/usr/local/lib/X11
|
|
|
|
REALAPPD=/etc/X11/app-defaults
|
2007-03-31 14:25:53 -06:00
|
|
|
XCONFIG=${XSRCDIR}/etc/X11.${MACHINE}/xorg.conf
|
2007-03-16 15:04:42 -06:00
|
|
|
RM?=rm
|
2006-12-23 06:08:07 -07:00
|
|
|
|
2013-02-21 10:45:32 -07:00
|
|
|
.if ${MACHINE_ARCH} != "vax"
|
2007-12-19 23:52:03 -07:00
|
|
|
XSERVER= xserver
|
|
|
|
.endif
|
|
|
|
|
2012-04-01 17:00:24 -06:00
|
|
|
.if defined(XENOCARA_BUILD_PIXMAN)
|
2013-08-22 12:48:45 -06:00
|
|
|
.if ${XENOCARA_BUILD_PIXMAN:L} == "yes" && \
|
2013-10-25 12:12:59 -06:00
|
|
|
${XENOCARA_BUILD_GL:L} == "yes" && \
|
2012-12-01 14:10:42 -07:00
|
|
|
${XENOCARA_HAVE_SHARED_LIBS:L} == "yes"
|
2009-02-02 13:57:55 -07:00
|
|
|
XSERVER+= kdrive
|
|
|
|
.endif
|
2012-04-01 17:00:24 -06:00
|
|
|
.endif
|
2009-02-02 13:57:55 -07:00
|
|
|
|
2011-03-07 15:17:31 -07:00
|
|
|
SUBDIR= proto font/util data/bitmaps lib app data \
|
2009-12-01 14:36:52 -07:00
|
|
|
${XSERVER} driver util doc
|
2006-11-26 07:00:56 -07:00
|
|
|
.ifndef NOFONTS
|
|
|
|
SUBDIR+= font
|
|
|
|
.endif
|
2007-03-27 18:22:03 -06:00
|
|
|
SUBDIR+= distrib/notes
|
2006-11-26 07:00:56 -07:00
|
|
|
|
2006-12-17 15:47:35 -07:00
|
|
|
NOOBJ=
|
2006-11-26 07:00:56 -07:00
|
|
|
|
2012-08-18 04:38:39 -06:00
|
|
|
build:
|
|
|
|
exec ${SUDO} ${MAKE} bootstrap-root
|
|
|
|
cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper
|
|
|
|
exec ${SUDO} ${MAKE} beforebuild
|
|
|
|
exec ${MAKE} realbuild
|
|
|
|
exec ${SUDO} ${MAKE} afterbuild
|
|
|
|
|
|
|
|
realbuild: _SUBDIRUSE
|
|
|
|
# that's all folks
|
2006-11-26 07:00:56 -07:00
|
|
|
|
|
|
|
bootstrap:
|
2012-08-18 04:38:39 -06:00
|
|
|
exec ${SUDO} ${MAKE} bootstrap-root
|
2006-11-29 14:52:18 -07:00
|
|
|
|
2012-08-18 04:38:39 -06:00
|
|
|
bootstrap-root:
|
|
|
|
exec ${MAKE} distrib-dirs
|
|
|
|
exec ${MAKE} install-mk
|
2006-11-29 14:52:18 -07:00
|
|
|
|
2012-08-18 04:38:39 -06:00
|
|
|
beforeinstall beforebuild:
|
|
|
|
cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper install
|
|
|
|
exec ${MAKE} includes
|
2006-12-31 06:55:44 -07:00
|
|
|
|
2012-08-18 04:38:39 -06:00
|
|
|
afterinstall afterbuild:
|
|
|
|
exec ${MAKE} fix-appd
|
2014-04-18 04:02:45 -06:00
|
|
|
/usr/sbin/makewhatis -Qv ${DESTDIR}/usr/X11R6/man
|
2014-07-10 01:13:13 -06:00
|
|
|
cd distrib/sets && exec ${MAKE}
|
2012-08-18 04:38:39 -06:00
|
|
|
|
|
|
|
install-mk:
|
|
|
|
cd share/mk && exec ${MAKE} X11BASE=${X11BASE} install
|
2007-10-27 14:01:23 -06:00
|
|
|
|
2006-12-23 06:08:07 -07:00
|
|
|
fix-appd:
|
|
|
|
# Make sure /usr/local/lib/X11/app-defaults is a link
|
|
|
|
if [ ! -L $(DESTDIR)${LOCALAPPD} ]; then \
|
|
|
|
if [ -d $(DESTDIR)${LOCALAPPD} ]; then \
|
2012-10-17 02:48:43 -06:00
|
|
|
mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD} || true; \
|
2006-12-23 06:08:07 -07:00
|
|
|
rmdir $(DESTDIR)${LOCALAPPD}; \
|
|
|
|
fi; \
|
|
|
|
mkdir -p ${DESTDIR}${LOCALAPPX}; \
|
|
|
|
ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
|
|
|
|
fi
|
2006-12-17 15:47:35 -07:00
|
|
|
|
2012-08-18 04:38:39 -06:00
|
|
|
font-cache:
|
|
|
|
cd font/alias && exec ${MAKE} -f Makefile.bsd-wrapper afterinstall
|
|
|
|
|
2013-09-09 13:17:09 -06:00
|
|
|
.if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
|
|
|
|
release:
|
|
|
|
@echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
|
|
|
|
.else
|
2014-01-09 17:17:54 -07:00
|
|
|
release: sha
|
|
|
|
|
|
|
|
sha: release-clean release-install dist hash
|
|
|
|
|
|
|
|
hash: dist
|
|
|
|
-cd ${RELEASEDIR}; \
|
2014-03-24 14:41:19 -06:00
|
|
|
cksum -a sha256 x*tgz > SHA256
|
2014-01-09 17:17:54 -07:00
|
|
|
|
|
|
|
.ORDER: release-clean release-install dist hash
|
2013-09-09 13:17:09 -06:00
|
|
|
.endif
|
2006-11-29 14:52:18 -07:00
|
|
|
|
|
|
|
release-clean:
|
|
|
|
${RM} -rf ${DESTDIR}/usr/X11R6/* ${DESTDIR}/usr/X11R6/.[a-zA-Z0-9]*
|
|
|
|
${RM} -rf ${DESTDIR}/var/cache/*
|
|
|
|
${RM} -rf ${DESTDIR}/etc/X11/*
|
|
|
|
${RM} -rf ${DESTDIR}/etc/fonts/*
|
|
|
|
@if [ -d ${DESTDIR}/usr/X11R6 ] && [ "`cd ${DESTDIR}/usr/X11R6;ls`" ]; then \
|
|
|
|
echo "Files found in ${DESTDIR}/usr/X11R6:"; \
|
|
|
|
(cd ${DESTDIR}/usr/X11R6;/bin/pwd;ls -a); \
|
|
|
|
echo "Cleanup before proceeding."; \
|
|
|
|
exit 255; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
release-install:
|
2014-07-11 07:45:54 -06:00
|
|
|
@exec ${MAKE} bootstrap-root
|
2012-08-18 04:38:39 -06:00
|
|
|
@exec ${MAKE} install
|
2012-02-07 12:54:55 -07:00
|
|
|
.if ${MACHINE} == zaurus
|
2006-11-29 14:52:18 -07:00
|
|
|
@if [ -f $(DESTDIR)/etc/X11/xorg.conf ]; then \
|
|
|
|
echo "Not overwriting existing" $(DESTDIR)/etc/X11/xorg.conf; \
|
|
|
|
else set -x; \
|
|
|
|
${INSTALL} ${INSTALL_COPY} -o root -g wheel -m 644 \
|
|
|
|
${XCONFIG} ${DESTDIR}/etc/X11 ; \
|
|
|
|
fi
|
|
|
|
.endif
|
2014-07-16 15:38:36 -06:00
|
|
|
touch ${DESTDIR}/usr/share/sysmerge/xetcsum
|
|
|
|
XETCLIST=`mktemp /tmp/_xetcsum.XXXXXXXXXX` || exit 1; \
|
|
|
|
sort distrib/sets/lists/xetc/{mi,md.${MACHINE}} > $${XETCLIST}; \
|
2010-01-10 06:36:10 -07:00
|
|
|
cd ${DESTDIR} && \
|
2014-07-16 15:38:36 -06:00
|
|
|
xargs sha256 -h ${DESTDIR}/usr/share/sysmerge/xetcsum < $${XETCLIST} || true; \
|
|
|
|
rm -f $${XETCLIST}
|
2006-11-29 14:52:18 -07:00
|
|
|
|
|
|
|
dist-rel:
|
|
|
|
${MAKE} RELEASEDIR=`pwd`/rel DESTDIR=`pwd`/dest dist 2>&1 | tee distlog
|
|
|
|
|
|
|
|
dist:
|
|
|
|
cd distrib/sets && \
|
|
|
|
env MACHINE=${MACHINE} ksh ./maketars ${OSrev} ${OSREV} && \
|
2012-08-18 04:38:39 -06:00
|
|
|
{ env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true ; }
|
2006-11-29 14:52:18 -07:00
|
|
|
|
2006-11-26 07:00:56 -07:00
|
|
|
|
|
|
|
distrib-dirs:
|
2008-01-31 15:34:40 -07:00
|
|
|
.if defined(DESTDIR) && ${DESTDIR} != ""
|
2012-08-18 04:38:39 -06:00
|
|
|
# running mtree under ${DESTDIR}
|
2009-10-01 13:48:31 -06:00
|
|
|
mtree -qdef /etc/mtree/BSD.x11.dist -p ${DESTDIR} -U
|
2008-01-31 15:34:40 -07:00
|
|
|
.else
|
2012-08-18 04:38:39 -06:00
|
|
|
# running mtree
|
2009-10-01 13:48:31 -06:00
|
|
|
mtree -qdef /etc/mtree/BSD.x11.dist -p / -U
|
2008-01-31 15:34:40 -07:00
|
|
|
.endif
|
|
|
|
|
2006-11-26 07:00:56 -07:00
|
|
|
|
2006-12-17 13:41:36 -07:00
|
|
|
.PHONY: all build beforeinstall install afterinstall release clean cleandir \
|
2012-08-18 04:38:39 -06:00
|
|
|
dist distrib-dirs fix-appd beforebuild bootstrap afterbuild realbuild \
|
|
|
|
install-mk bootstrap-root
|
2006-11-26 07:00:56 -07:00
|
|
|
|
2006-12-23 06:08:07 -07:00
|
|
|
.include <bsd.subdir.mk>
|
2006-11-26 07:00:56 -07:00
|
|
|
.include <bsd.xorg.mk>
|