Subject: CVS commit: pkgsrc/mk
To: None <pkgsrc-changes@NetBSD.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: pkgsrc-changes
Date: 07/05/2006 22:21:03
Module Name:	pkgsrc
Committed By:	jlam
Date:		Wed Jul  5 22:21:03 UTC 2006

Modified Files:
	pkgsrc/mk: bsd.pkg.mk
	pkgsrc/mk/build: bsd.build.mk build.mk
	pkgsrc/mk/buildlink3: bsd.buildlink3.mk
	pkgsrc/mk/configure: bsd.configure.mk configure.mk
	pkgsrc/mk/depends: bsd.depends.mk depends.mk
	pkgsrc/mk/extract: extract.mk
	pkgsrc/mk/install: bsd.install.mk install.mk replace.mk
	pkgsrc/mk/package: bsd.package.mk package.mk
	pkgsrc/mk/patch: patch.mk
	pkgsrc/mk/pkginstall: bsd.pkginstall.mk
	pkgsrc/mk/tools: bsd.tools.mk
	pkgsrc/mk/wrapper: bsd.wrapper.mk
Added Files:
	pkgsrc/mk: bsd.pkg.barrier.mk

Log Message:
Flatten out recursive makes into a single re-invocation of make by
introducing the concept of a "barrier".  We separate the user-invokable
targets into ones that must happen before the barrier, and ones that
must happen after the barrier.  The ones that happen after the barrier
are run in a sub-make process.  In this case, the targets that must
be run after the barrier are from the "wrapper" step and beyond.  We
rewrite the various "flow" targets, e.g. wrapper, configure, build,
etc., so that they of the right form to use the barrier target.

This now completely removes the concept of PKG_PHASE from pkgsrc.  It
is replaced with the concept of "before" and "after" the barrier, and
this state can be checked by testing for the existence of the barrier
cookie file.  Because we've removed most of the recursive makes, there
is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove
them for now.

As part of this commit, put back the logic that conditionalized the
sources for the various cookie files.  Because the sources are all
"phony" targets, they were always run, regardless of whether or not
the cookie file already existed.  Now, if a cookie file exists, then
that entire phase associated with that cookie file is skipped.

Lastly, fix a thinko in configure/bsd.configure.mk where setting
NO_CONFIGURE in a package Makefile would manage to skip the "wrapper"
step altogether.  Fix this by correctly noting "wrapper" and not
"patch" as the preceding step to "configure".


To generate a diff of this commit:
cvs rdiff -r0 -r1.1 pkgsrc/mk/bsd.pkg.barrier.mk
cvs rdiff -r1.1858 -r1.1859 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -r1.2 -r1.3 pkgsrc/mk/build/bsd.build.mk pkgsrc/mk/build/build.mk
cvs rdiff -r1.179 -r1.180 pkgsrc/mk/buildlink3/bsd.buildlink3.mk
cvs rdiff -r1.2 -r1.3 pkgsrc/mk/configure/bsd.configure.mk \
    pkgsrc/mk/configure/configure.mk
cvs rdiff -r1.5 -r1.6 pkgsrc/mk/depends/bsd.depends.mk
cvs rdiff -r1.8 -r1.9 pkgsrc/mk/depends/depends.mk
cvs rdiff -r1.8 -r1.9 pkgsrc/mk/extract/extract.mk
cvs rdiff -r1.4 -r1.5 pkgsrc/mk/install/bsd.install.mk \
    pkgsrc/mk/install/replace.mk
cvs rdiff -r1.9 -r1.10 pkgsrc/mk/install/install.mk
cvs rdiff -r1.3 -r1.4 pkgsrc/mk/package/bsd.package.mk
cvs rdiff -r1.10 -r1.11 pkgsrc/mk/package/package.mk
cvs rdiff -r1.5 -r1.6 pkgsrc/mk/patch/patch.mk
cvs rdiff -r1.12 -r1.13 pkgsrc/mk/pkginstall/bsd.pkginstall.mk
cvs rdiff -r1.39 -r1.40 pkgsrc/mk/tools/bsd.tools.mk
cvs rdiff -r1.44 -r1.45 pkgsrc/mk/wrapper/bsd.wrapper.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.