2010-01-31 07:28:45 -07:00
|
|
|
# $OpenBSD: Makefile,v 1.35 2010/01/31 14:28:45 matthieu Exp $
|
2006-11-26 07:00:56 -07:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
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
|
|
|
|
2009-09-10 13:28:23 -06:00
|
|
|
.if ${MACHINE_ARCH} != "sh" && ${MACHINE_ARCH} != "vax"
|
2007-12-19 23:52:03 -07:00
|
|
|
XSERVER= xserver
|
|
|
|
.endif
|
|
|
|
|
2009-02-02 13:57:55 -07:00
|
|
|
.if ${USE_GCC3:L} == "yes"
|
|
|
|
XSERVER+= kdrive
|
|
|
|
.endif
|
|
|
|
|
2009-11-26 15:53:50 -07:00
|
|
|
SUBDIR= proto font/util data/bitmaps lib app data/xkbdata \
|
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
|
2008-10-05 02:06:06 -06:00
|
|
|
SUBDIR+= share/pciids
|
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
|
|
|
|
|
|
|
build: beforebuild _SUBDIRUSE
|
|
|
|
|
|
|
|
bootstrap:
|
|
|
|
${SUDO} ${MAKE} distrib-dirs
|
|
|
|
cd ${.CURDIR}/share/mk \
|
2007-03-28 13:41:15 -06:00
|
|
|
&& exec ${SUDO} ${MAKE} X11BASE=${X11BASE} install
|
2006-11-26 07:00:56 -07:00
|
|
|
|
|
|
|
beforebuild: bootstrap
|
|
|
|
cd ${.CURDIR}/util/macros \
|
|
|
|
&& ${MAKE} -f Makefile.bsd-wrapper \
|
2007-03-28 13:41:15 -06:00
|
|
|
&& exec ${SUDO} ${MAKE} -f Makefile.bsd-wrapper install
|
|
|
|
exec ${SUDO} ${MAKE} includes
|
2006-11-26 07:00:56 -07:00
|
|
|
|
|
|
|
beforeinstall:
|
|
|
|
${MAKE} distrib-dirs
|
|
|
|
${MAKE} includes
|
|
|
|
|
2006-12-31 06:55:44 -07:00
|
|
|
afterinstall:
|
|
|
|
${MAKE} install-mk
|
|
|
|
${MAKE} fix-appd
|
2007-10-27 14:01:23 -06:00
|
|
|
${MAKE} font-cache
|
2006-11-29 14:52:18 -07:00
|
|
|
/usr/libexec/makewhatis ${DESTDIR}/usr/X11R6/man
|
|
|
|
|
2006-12-17 13:41:36 -07:00
|
|
|
realinstall: _SUBDIRUSE
|
2006-11-29 14:52:18 -07:00
|
|
|
|
2006-12-31 06:55:44 -07:00
|
|
|
install-mk:
|
|
|
|
.if defined(DESTDIR) && (${DESTDIR} != "" || ${DESTDIR} != "/")
|
|
|
|
cd ${.CURDIR}/share/mk \
|
|
|
|
&& ${MAKE} X11BASE=${X11BASE} install
|
|
|
|
.endif
|
|
|
|
|
2007-10-27 14:01:23 -06:00
|
|
|
font-cache:
|
|
|
|
@echo "running fc-cache"
|
|
|
|
if test -z "$(DESTDIR)"; then \
|
|
|
|
fc-cache -s -v ;\
|
|
|
|
else\
|
|
|
|
fc-cache -c ${DESTDIR} -s -v ;\
|
|
|
|
fi
|
|
|
|
|
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 \
|
|
|
|
mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD}; \
|
|
|
|
rmdir $(DESTDIR)${LOCALAPPD}; \
|
|
|
|
fi; \
|
|
|
|
mkdir -p ${DESTDIR}${LOCALAPPX}; \
|
|
|
|
ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
|
|
|
|
fi
|
2006-12-17 15:47:35 -07:00
|
|
|
|
2006-11-29 14:52:18 -07:00
|
|
|
release: release-clean distrib-dirs release-install dist
|
2008-01-05 13:22:38 -07:00
|
|
|
.ORDER: release-clean distrib-dirs release-install dist
|
2006-11-29 14:52:18 -07:00
|
|
|
|
|
|
|
release-clean:
|
|
|
|
.if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
|
|
|
|
@echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
|
|
|
|
.endif
|
|
|
|
${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:
|
|
|
|
@${MAKE} install
|
2010-01-31 07:28:45 -07:00
|
|
|
.if ${MACHINE} == alpha || ${MACHINE} == hp300 || ${MACHINE} == loongson || \
|
|
|
|
${MACHINE} == mac68k || ${MACHINE} == macppc || ${MACHINE} == sgi || \
|
2008-06-12 15:58:28 -06:00
|
|
|
${MACHINE} == vax || ${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
|
2010-01-10 06:36:10 -07:00
|
|
|
touch ${DESTDIR}/var/db/sysmerge/xetcsum
|
|
|
|
TMPSUM=`mktemp /tmp/_xetcsum.XXXXXXXXXX` || exit 1; \
|
|
|
|
sort distrib/sets/lists/xetc/{mi,md.${MACHINE}} > $${TMPSUM}; \
|
|
|
|
cd ${DESTDIR} && \
|
|
|
|
xargs cksum < $${TMPSUM} > ${DESTDIR}/var/db/sysmerge/xetcsum; \
|
|
|
|
rm -f $${TMPSUM}
|
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} && \
|
|
|
|
(env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true)
|
|
|
|
|
2006-11-26 07:00:56 -07:00
|
|
|
|
|
|
|
distrib-dirs:
|
2008-01-31 15:34:40 -07:00
|
|
|
.if defined(DESTDIR) && ${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
|
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 \
|
2007-03-16 17:54:43 -06:00
|
|
|
dist distrib-dirs fix-appd
|
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>
|