Commit graph

23 commits

Author SHA1 Message Date
rillig
6744d25ff3 Replaced _PKG_SILENT and _PKG_DEBUG with RUN. 2009-03-17 21:43:54 +00:00
sketch
f3f4c75257 Wrap expansion of local patches inside LOCALPATCHES, given that it is undefined
by default.  Previous behaviour would try to echo /<pkgpath> which leads to
interesting behaviour when /net is an autofs map...

Reduces runtime of mk/bulk/printdepends by 5.25 days on my test system.
2008-06-09 14:47:03 +00:00
rillig
d3624fdf10 Made the .include directives simpler, since the directory of the
including file is always the first in the search path.
2008-01-04 01:46:24 +00:00
rillig
7e901dd9f3 Added LOCALPATCHES and PATCHDIR. 2007-09-19 08:37:37 +00:00
rillig
500f99647b Made "make show-all-patch" work. 2007-09-19 08:32:13 +00:00
jlam
8cd21c85a1 Allow for emulation-specific patches for binary-only packages. The
patches are named emul-${EMUL_PLATFORM}-patch-* and are located in
${PATCHDIR}.
2007-08-16 16:29:27 +00:00
jlam
3ff1bf7b40 Use a flag to the checksum script to tell it whether we're checking
a distfile or a pkgsrc patch.  It's simple, cleaner, less magic, etc.
(duh!).

While here, I notice that _CHECKSUM_CMD was already being defined in
mk/checksum/checksum.mk (as it should be), so update the definition
from mk/patch/patch.mk and remove it from patch.mk.
2007-08-15 13:56:24 +00:00
jlam
701b13909a Teach the pkgsrc/mk/checksum/checksum script how to verify patches by
first stripping them of NetBSD RCS ID tags.  Use the checksum script
in the patch module to verify patch checksums instead of hand-coding
a miniature version of the checksum script in the do-pkgsrc-patches
target.
2007-08-14 21:25:09 +00:00
rillig
b1e6764d13 Don't print the message for the distribution patches if there aren't any. 2007-08-14 13:21:57 +00:00
rillig
a6bcf86c93 Reworked the way the needed tools for the "patch" phase are determined. 2007-08-13 09:22:21 +00:00
rillig
72a55e9e86 When testing whether the patches/ directory exists or not, take into
account that CVS usually leaves empty directories around. This fixes the
bootstrapping after a "cvs update" without the -P option. The error
message leading to it was:

===> running: (cd /home/p/src/devel/bmake && /home/p/pkg/bin/bmake -s
	-DPKG_PRESERVE MAKECONF=/home/p/work/mk.conf.example
	WRKOBJDIR=/home/p/work/pkgsrc bootstrap-register)
ERROR: [resolve-dependencies] A package matching ``digest>=20010302'' should
ERROR:     be installed, but one cannot be found.  Perhaps there is a
ERROR:     stale work directory for ../../pkgtools/digest?
2007-05-25 14:21:32 +00:00
jlam
77b719dae8 Modify the barrier so that we always invoke the recursive make process
when passing through the barrier.  This ensures the PATH (passed via
PKGSRC_MAKE_ENV) is correctly set for all phases after the barrier.

This fixes a bug in "interactive" pkgsrc use, where if you have no
work directory and type "make build && make install", then the "install"
step does not have a PATH set to include all the wrapper and tools
directories.
2006-07-22 16:31:35 +00:00
jlam
4011c5cff2 Rearrange sequence so that "wrapper" occurs between "tools" and
"extract".  This allows all user-definable targets (pre-*, do-*,
post-*) to have access to the wrapper scripts.
2006-07-21 14:21:28 +00:00
jlam
7a2c97d53f * Add a new stage "bootstrap-depends" that happens before all other
stages, and that installs dependencies listed in BOOTSTRAP_DEPENDS.
  The bootstrap-depends step works just like the normal depends step
  and honors the value of DEPENDS_TARGET.  It's now possible to add
  dependencies solely to facilitate fetching the distfiles, e.g.

	BOOTSTRAP_DEPENDS+=	curl-[0-9]*:../../www/curl

* Teach the tools framework about ":bootstrap" as a tools modifier
  which indicates the tool should be added as a dependency via
  BOOTSTRAP_DEPENDS.

* Add "digest" to the tools framework.

* Use USE_TOOLS+=digest:bootstrap to force pkgsrc to install digest
  before anything else.  Get rid of unused "uptodate-digest" target
  and related digest version-checking code.

* Finish the refactoring work: split checksum-related code out of
  bsd.pkg.mk and into pkgsrc/mk/checksum and replace the "checksum"
  target command list with a script that does all the real work.

* Make DIGEST_ALGORITHMS and PATCH_DIGEST_ALGORITHM into private
  variables by prepending them with an underscore.  Also, rename
  _PATCH_DIGEST_ALGORITHM to _PATCH_DIGEST_ALGORITHMS and adjust the
  makepatchsum target to allow that variable to contain a list of
  algorithms, all of which are used when creating the patch checksums
  for ${DISTINFO_FILE}.
2006-07-13 14:02:34 +00:00
jlam
356f5e8af5 Rename <phase>_COOKIE variables to _COOKIE.<phase>. These are private
variables so there are no user-visible changes.  This change just makes
it a little easier to write for loops.
2006-07-07 21:24:27 +00:00
jlam
a8fcae3925 The cookie files are indirectly made using *-cookie targets, so verify
that they are never being created more than once by inserting a check
into the *-cookie targets.
2006-07-06 22:29:52 +00:00
jlam
b8d23232b8 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".
2006-07-05 22:21:02 +00:00
jlam
990d0b5377 Make the check-vulnerable target more self-sufficient, by moving some
of the logic from fetch/fetch.mk into flavor/pkg/check.mk, so that
check-vulnerable can be used as a source target.

Make check-vulnerable a source target for every phase of the build
workflow, which ensures that it is always run if the user starts a
new phase from the command line.

Fix the cookie-generation targets so that they don't append, only
overwrite to the cookie file.  This works around potential problems
due to recursive makes.

Move the cookie checks so that they surround the corresponding phase
target.  The presence of the cookie should now inform the make process
to avoid doing any processing of phases that occur before the phase
corresponding to the cookie.
2006-07-05 09:08:35 +00:00
jlam
8c10d39139 Introduce the capability to gather all the warnings and errors that
are generated for a target and output them all at once at the conclusion
of the target's invocation.  The implementation is in bsd.pkg.error.mk,
which defines a macro target "error-check" that will print out any
non-empty warning and error files in ${WARNING_DIR} and ${ERROR_DIR}
and exit appropriately if there were errors.

Convert some targets that were just long sequences of ${ERROR_MSG} or
${WARNING_MSG} within a single shell statement to use the new delayed
error output via error-check.

Modify the compiler "fail" wrappers for C++ and Fortran to be less
verbose during invocation.  Instead collect the warnings and only
print them at the end of the completed phase, e.g. after "configure"
and/or "build" completes.
2006-06-09 13:59:06 +00:00
rillig
cb4b57b6b0 Replaced PHASE_MSG with STEP_MSG in many (but not all) places where it
wasn't used to identify a ``phase'', as defined in the pkgsrc guide.
2006-06-08 08:01:53 +00:00
rillig
80d94acdf9 Use STEP_MSG for pkgsrc-patch-message instead of PHASE_MSG. 2006-06-08 07:30:40 +00:00
jlam
3058ace76f Move some variable definitions out of bsd.prefs.mk and back into
bsd.pkg.mk.  They didn't actually need to be defined in bsd.prefs.mk,
just somewhere before the "main" bsd.<phase>.mk files were included.
This moves some conditional (?=) definitions back into bsd.pkg.mk so
they won't conflict with any conditional definitions in package
Makefiles.

This should fix the "checksum" problems in lang/php-gd as noted here:

    http://mail-index.netbsd.org/pkgsrc-users/2006/06/05/0012.html

where EXTRACT_SUFX had the wrong value due to the order in while *.mk
files were included.
2006-06-06 15:28:51 +00:00
jlam
627dc60046 Refactor "patch" code into correspondingly named subdirectory of
pkgsrc/mk.  Also get rid of the recursive make for the "patch" target.
This basically merges the "patch" phase into the "tools" phase.

There should eventually be a standalone script that can be used to
verify checksums listed in distinfo that should be used instead of
the roll-your-own code in the do-pkgsrc-patch target.
2006-06-06 04:48:19 +00:00