[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / xsrc

File: [cvs.NetBSD.org] / xsrc / Makefile (download)

Revision 1.44, Fri Mar 18 15:56:09 2005 UTC (17 years, 8 months ago) by tron
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base, riastradh-drm2, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.43: +3 -16 lines

Remove code handling "contrib" directory.

#	$NetBSD: Makefile,v 1.44 2005/03/18 15:56:09 tron Exp $
# Targets & Variables
# build: Clean out xsrc, and build and install everything that goes
#	under /usr/X11R6.
#  DESTDIR -- Set to an alternative directory to install under.
#  UPDATE --  If set, don't make clean first, plus attempt to make
#	only the targets that are out of date.
# release snapshot: Same as build, plus tar up the X sets and install
#	them under the ${RELEASEDIR}/binary/sets directory (NetBSD <=1.6)
#	or the ${RELEASEDIR}/${MACHINE}/binary/sets directory (NetBSD >1.6).
#  DESTDIR -- Same as for build. Mandatory for building a release.
#  RELEASEDIR -- As explained above.
#  BUILD_DONE -- If set, assume build is already done.
#  INSTALL_DONE -- If set, assume binaries to tar up are to be found
#	in ${DESTDIR} already.
#  NETBSDSRCDIR -- Set to the full path to the main source tree, /usr/src
#	by default. Needed to find ./distrib/sets.
# cleandir distclean: Remove all generated files from under xsrc.
# clean: Remove object files, but keep imake generated makefiles.

.include <bsd.own.mk>

# Backwards compatibility with NetBSD 1.5 and 1.5.x where NETBSDSRCDIR
# doesn't get defined by  "bsd.own.mk".

XCDIR=	xfree/xc

.MAIN: all
all: all-xc all-local

.if exists(${XCDIR}/xmakefile) && defined(UPDATE)
	@cd ${XCDIR} && ${MAKE} Everything
	@-rm -f ${XCDIR}/xmakefile
	@cd ${XCDIR} && ${MAKE} World

	@if [ ! -f local/Makefile ]; then \
	  cd local && PATH=../${XCDIR}/config/imake:$$PATH \
	    sh ../${XCDIR}/config/util/xmkmf -a ../${XCDIR} \
	      ${.CURDIR}/local; \
	@cd local && ${MAKE}

install: install-xc install-local

	@cd ${XCDIR} && \
	  ${MAKE} DESTDIR="${DESTDIR}" install && \
	  ${MAKE} DESTDIR="${DESTDIR}" install.man

	@cd local && \
	  ${MAKE} DESTDIR="${DESTDIR}" install && \
	  ${MAKE} DESTDIR="${DESTDIR}" install.man

	@-cd ${XCDIR} && ${MAKE} clean
	@-cd local && ${MAKE} clean

cleandir distclean: clean
	find ${XCDIR} local -name .depend | xargs -n5 rm
	find ${XCDIR} local -name 'Makefile*' | \
	    xargs -n5 grep -l "Makefile generated by imake" | xargs rm
	-rmdir ${XCDIR}/exports
	rm -f ${XCDIR}/xmakefile ${XCDIR}/config/cf/version.def \

.if defined(UPDATE)
	@${MAKE} all && ${MAKE} install
	@${MAKE} cleandir && ${MAKE} all && ${MAKE} install

# release goo
.if !defined(DESTDIR)
release snapshot:
	@echo setenv DESTDIR before doing that!
.elif !defined(RELEASEDIR)
release snapshot:
	@echo setenv RELEASEDIR before doing that!
.if defined(INSTALL_DONE)
release snapshot:
.elif defined(BUILD_DONE)
release snapshot: install
release snapshot: build
	${INSTALL} -d -m 755 -o root -g wheel ${RELEASEDIR}/${MACHINE}/binary/sets
	${INSTALL} -d -m 755 -o root -g wheel ${DESTDIR}/etc/mtree
.if defined(METALOG.add) && !exists(${DESTDIR}/etc/master.passwd)
	cd ${NETBSDSRCDIR}/distrib/sets && \
	    sh ./maketars -x -d ${DESTDIR:S,^$,/,} -N ${NETBSDSRCDIR}/etc -t ${RELEASEDIR}/${MACHINE}/binary/sets
	cd ${NETBSDSRCDIR}/distrib/sets && \
	    sh ./maketars -x -d ${DESTDIR:S,^$,/,} -t ${RELEASEDIR}/${MACHINE}/binary/sets
	cd ${RELEASEDIR}/${MACHINE}/binary/sets && \
		cksum -o 1 *.tgz >BSDSUM && \
		cksum *.tgz >CKSUM && \
		cksum -m *.tgz >MD5 && \
		cksum -o 2 *.tgz >SYSVSUM
.endif # DESTDIR and RELEASEDIR check