xenocara/Makefile

132 lines
3.2 KiB
Makefile
Raw Normal View History

2016-09-03 07:57:18 -06:00
# $OpenBSD: Makefile,v 1.72 2016/09/03 13:57:18 matthieu Exp $
2006-11-26 07:00:56 -07:00
.include <bsd.own.mk>
.include <bsd.xconf.mk>
2006-11-26 07:00:56 -07:00
LOCALAPPD=/usr/local/lib/X11/app-defaults
LOCALAPPX=/usr/local/lib/X11
REALAPPD=/etc/X11/app-defaults
RM?=rm
XSERVER= xserver
SUBDIR= proto font/util data/bitmaps lib app data \
${XSERVER} driver util doc
2006-11-26 07:00:56 -07:00
.ifndef NOFONTS
SUBDIR+= font
.endif
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
.if defined(DESTDIR)
build:
@echo "Cannot run ${MAKE} build with DESTDIR set"
@exit 2
.else
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
.endif
realbuild: _SUBDIRUSE
# that's all folks
2006-11-26 07:00:56 -07:00
bootstrap:
exec ${SUDO} ${MAKE} bootstrap-root
2006-11-29 14:52:18 -07:00
bootstrap-root:
exec ${MAKE} distrib-dirs
exec ${MAKE} install-mk
2006-11-29 14:52:18 -07:00
beforeinstall beforebuild:
cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper install
exec ${MAKE} includes
afterinstall afterbuild:
exec ${MAKE} fix-appd
/usr/sbin/makewhatis -Qv ${DESTDIR}/usr/X11R6/man
touch ${DESTDIR}/var/sysmerge/xetcsum
cd ${DESTDIR}/ && \
sort ${.CURDIR}/distrib/sets/lists/xetc/{mi,md.${MACHINE}} | \
xargs sha256 -h ${DESTDIR}/var/sysmerge/xetcsum || true
cd distrib/sets && exec ${MAKE}
install-mk:
cd share/mk && exec ${MAKE} X11BASE=${X11BASE} install
fix-appd:
# Make sure /usr/local/lib/X11/app-defaults is a link
if [ ! -L $(DESTDIR)${LOCALAPPD} ]; then \
if [ -d $(DESTDIR)${LOCALAPPD} ]; then \
mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD} || true; \
rmdir $(DESTDIR)${LOCALAPPD}; \
fi; \
mkdir -p ${DESTDIR}${LOCALAPPX}; \
ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
fi
2006-12-17 15:47:35 -07:00
font-cache:
cd font/alias && exec ${MAKE} -f Makefile.bsd-wrapper afterinstall
.if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
release:
@echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
.else
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
.ORDER: release-clean release-install dist hash
.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:
@exec ${MAKE} bootstrap-root
@exec ${MAKE} install
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}
2006-11-29 14:52:18 -07:00
2015-06-18 05:46:16 -06:00
checkdist:
2015-07-01 14:10:39 -06:00
@cd distrib/sets && \
2015-06-18 05:46:16 -06:00
{ env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true ; }
2006-11-26 07:00:56 -07:00
distrib-dirs:
.if defined(DESTDIR) && ${DESTDIR} != ""
# running mtree under ${DESTDIR}
mtree -qdef /etc/mtree/BSD.x11.dist -p ${DESTDIR} -U
.else
# running mtree
mtree -qdef /etc/mtree/BSD.x11.dist -p / -U
.endif
2006-11-26 07:00:56 -07:00
.PHONY: all build beforeinstall install afterinstall release clean cleandir \
dist distrib-dirs fix-appd beforebuild bootstrap afterbuild realbuild \
install-mk bootstrap-root
2006-11-26 07:00:56 -07:00
.include <bsd.subdir.mk>
2006-11-26 07:00:56 -07:00
.include <bsd.xorg.mk>