summaryrefslogtreecommitdiff
path: root/mk/tools/bsd.tools.mk
AgeCommit message (Collapse)AuthorFilesLines
2007-03-15For all those who are interested in the inner workings of pkgsrc, thererillig1-1/+23
is a new target "show-all" that fits to the existing "debug", "show-tools", "show-vars" targets. It prints a list of the variables that make up the public interface to pkgsrc. Running this target is especially useful if you want to do some things, you know that they must have been implemented but you don't know what it is called. It also shows the "class" of a variable (user-defined, package-defined, system-defined).
2006-12-15Remove trailing spaces.martti1-2/+2
2006-07-25Move barrier to just after the depends phase. This allows both thejlam1-5/+4
"tools" and "wrapper" phases to be able to expect all the dependencies to be installed already.
2006-07-21Rearrange sequence so that "wrapper" occurs between "tools" andjlam1-1/+5
"extract". This allows all user-definable targets (pre-*, do-*, post-*) to have access to the wrapper scripts.
2006-07-13* Add a new stage "bootstrap-depends" that happens before all otherjlam1-1/+2
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-07Rename <phase>_COOKIE variables to _COOKIE.<phase>. These are privatejlam1-10/+10
variables so there are no user-visible changes. This change just makes it a little easier to write for loops.
2006-07-06The cookie files are indirectly made using *-cookie targets, so verifyjlam1-1/+2
that they are never being created more than once by inserting a check into the *-cookie targets.
2006-07-05Flatten out recursive makes into a single re-invocation of make byjlam1-4/+9
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-05Make the check-vulnerable target more self-sufficient, by moving somejlam1-7/+7
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-05Teach the tools framework about the following new tools:jlam1-1/+2
itools, intltool, diff3, sdiff, msgmerge * Adding USE_TOOLS+=itools to a package Makefile will cause the tool-directory versions of imake, makedepend, mkdirhier and xmkmf to point to the ones from the devel/nbitools package. This change will remove the need for nbitools/buildlink3.mk, which currently does a bit of hackery to force the "right" imake tools to be used by packages that need it. * Adding USE_TOOLS+=intltool to a package Makefile will cause the local versions of intltool-* inside ${WRKSRC} to be replaced by copies from the textproc/intltool package. If "intltool" is not specified as a tool, then we create "broken" intltool-* tools in the tools directory to help highlight hidden dependencies on the intltool package. In addition, modify the tools framework so that if "perl" is not specified as a tool, then we create a "broken" perl tool in the tools directory for the same reason as for "intltool". These two changes together will remove the need for intltools/buildlink3.mk and should also catch all cases where the sources' intltools may have been silently used because perl was found on the system. * Adding USE_TOOLS+=diff3, USE_TOOLS+=sdiff, or USE_TOOLS+=msgmerge to a package Makefile will cause the corresponding tool to be pulled into the tools directory. These are convenience tools to help simplify dependencies for some packages.
2006-06-16Allow packages to set a post-tools target again (which fixes recentjlam1-3/+46
lossage when building security/openpam). Utilize a tools cookie file to ensure that the post-tools target is only ever run once to avoid tricky coding requirements for the post-tools target. Also document some more of the targets.
2006-06-09Introduce the capability to gather all the warnings and errors thatjlam1-1/+2
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-06Separate out the part of bsd.tools.mk that actually created the toolsjlam1-161/+51
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk as a file that pulls in all of the other ones. Also move the tools-related targets from bsd.pkg.mk into bsd.tools.mk. The tools cookie file has been removed, as well as hooks for {pre,do,post}-tools. Instead, there is now only a single public target "tools" which may be invoked. Invoking "tools" will always cause all of the tools in ${TOOLS_DIR} to be created. The "tools" step has been moved and is now just after the "depends" step and before sources are extracted. This is the earliest place where the "tools" step can be taken, and it allows the created tools to be used in all steps/phases after it, starting with "extract". As a consequence, we should just invoke tools by their bare names in targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE} names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-04-13Rename msgfmt.mk to gettext.mk. The rest of the gettext tool handlingjlam1-2/+2
will be moved here from replace.mk shortly.
2006-04-13Overhaul the way packages can ask for "msgfmt". If a package needsjlam1-1/+2
msgfmt, then it should set the following in the package Makefile: USE_TOOLS+= msgfmt To deal with message files that use the "msgid_plural" statement, which isn't supported in NetBSD<=3.x and also in gettext<=0.10.35, we determine if the built-in "msgfmt" is sufficiently new enough to understand "msgid_plural". If it isn't, then we use the msgfmt.sh script to transform the msgid_plural statements to an equivalent construct that's understood by older msgfmt tools. The msgfmt.sh script is a straightforward translation of the original perl script msgfmt.pl script by Julio M. Merino Vidal into shell and awk, which are more lightweight dependencies than perl. We remove the USE_MSGFMT_PLURALS bits in gettext-lib/builtin.mk as they are made obsolete by the new code in mk/tools/msgfmt.mk. BUILD_USE_MSGFMT is still supported but will be removed in a separate commit.
2005-08-10Remove the abuse of buildlink that was pkg-config/buildlink3.mk. Thatjlam1-1/+2
file's sole purpose was to provide a dependency on pkg-config and set some environment variables. Instead, turn pkg-config into a "tool" in the tools framework, where the pkg-config wrapper automatically adds PKG_CONFIG_LIBDIR to the environment before invoking the real pkg-config. For all package Makefiles that included pkg-config/buildlink3.mk, remove that inclusion and replace it with USE_TOOLS+=pkg-config.
2005-07-17Rename variable: TOOLS_CMDLINE.<tool> => TOOLS_SCRIPT.<tool> to betterjlam1-20/+21
reflect the possible variable contents.
2005-07-17Rename the following variables for brevity:jlam1-26/+25
TOOLS_REAL_CMD.<tool> => TOOLS_PATH.<tool> TOOLS_REAL_ARGS.<tool> => TOOLS_ARGS.<tool> TOOLS_REAL_CMDLINE.<tool> => TOOLS_CMDLINE.<tool>
2005-06-11Remove unnecessary .undef lines after .for loops as the loop variablesjlam1-6/+1
are automatically undefined after the loop exits.
2005-05-21Grammar 101 -- sentences should end in a period.jlam1-2/+2
2005-05-21Add TNF copyright to the new tools framework makefiles.jlam1-1/+37
2005-05-19Merge most of imake.mk into replace.mk and leave imake.mk to containjlam1-1/+2
the extra bits required by packages that use imake/xmkmf. This consolidates most of the replacement tools handling into replace.mk.
2005-05-19Merge most of perl.mk into replace.mk and leave perl.mk to containjlam1-1/+2
the extra bits required by packages that use perl. This causes PKGSRC_USE_TOOLS+=perl to work properly.
2005-05-17Move perl handling into replace.mk. We now can specify USE_TOOLS+=perljlam1-2/+1
to note that we need the perl binary and the associated PERL5 and TOOLS_PERL5 variable definitions.
2005-05-15In the tools framework, check that the directory doesn't exist beforejlam1-2/+3
creating it in case ${MKDIR} can't handle that situation.
2005-05-15Make TOOLS_REAL_CMDLINE_DFLT.<tool> into a publicly-readable value.jlam1-4/+4
2005-05-15Make implementation match documentation for when a wrapper is created andjlam1-8/+11
when a symlink is created.
2005-05-11Rewrite logic that defines the targets that create the tools underjlam1-23/+36
${TOOLS_DIR} so that we avoid inspecting various variables during the top-level make invocation -- rather, we defer inspection until the target is actually made. This allows TOOLS_REAL_CMDLINE.*, TOOLS_REAL_CMD.*, and TOOLS_REAL_ARGS.* to be defined after bsd.tools.mk is included and still affect the creation of the tools under ${TOOLS_DIR}.
2005-05-10Split out ldconfig handling from the USE_TOOLS processing in replace.mk.jlam1-1/+2
This makes more sense since there is never going to be a pkgsrc replacement for ldconfig. We now always create an ldconfig tool in ${TOOLS_DIR} that either calls the system-supplied one if it exists, or is a no-op.
2005-05-10Split out "strip" from the USE_TOOLS processing in replace.mk. Instead,jlam1-1/+2
we create a "strip" tool unconditionally, and make it either a no-op or the real thing depending on the whether we want unstripped files or not.
2005-05-10TOOLS_ALIASES.<tool> can be set to the list of names that should also bejlam1-5/+14
created under ${TOOLS_DIR} that invoke <tool>, e.g. TOOLS_ALIASES.gawk= awk The example above causes the "gawk" tool to be added to ${TOOLS_DIR} as both "gawk" and "awk".
2005-05-09Remove redundant variable definitions that simply match their defaults.jlam1-3/+1
2005-05-09Replace TOOLS_WRAP and TOOLS_SYMLINK with TOOLS_CREATE, and let the toolsjlam1-39/+27
framework figure out by itself whether a wrapper or a symlink should be created based on the real command and any arguments that may need to be invoked.
2005-05-09Rename TOOLS_ARGS.* to TOOLS_REAL_ARGS.* to follow naming convention forjlam1-21/+13
other TOOLS_* variables relating to the real command executed.
2005-05-02Include perl.mk to make sure the perl symlink is created.jlam1-1/+2
2005-04-28coreutils.mk has been merged into replace.mkjlam1-2/+1
2005-04-27Correct the fallback value of FALSE.jlam1-2/+2
2005-04-27Remove redundant checks.jlam1-9/+1
2005-04-27Don't bother testing whether the target file is excutable. Let's justjlam1-7/+4
trust the user.
2005-04-27Define tools that we use within the tools framework itself.jlam1-1/+14
2005-04-26Merge findutils.mk into replace.mk. We now just use USE_TOOLS+=findjlam1-2/+1
or USE_TOOLS+=xargs, and cause FIND and XARGS to point to the correct commands.
2005-04-26Make the wrapper and the symlink default to the same name under the toolsjlam1-6/+6
directory -- ${TOOLS_DIR}/bin/<tool>.
2005-04-24Correct the use of quotes when using echo.jlam1-3/+3
2005-04-22Improve the documentation in the header comments.jlam1-6/+19
2005-04-22Remove the search for TOOLS_REAL_CMD.<tool> in ${TOOL_EXECDIRS}. Thisjlam1-30/+11
behavior is deemed too undeterministic and too complex for bsd.tools.mk, which should just be providing simple building blocks for creating simple wrappers and symlinks. These searches are better implemented elsewhere.
2005-04-15Allow for USE_TOOLS+=coreutils and USE_TOOLS+=findutils to use pkgsrcjlam1-1/+3
replacements for "core" and "find" utilities, e.g. basename, cat, find, etc.
2005-04-15Initial commit of the new tools framework. This is currently designedjlam1-0/+182
to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.