summaryrefslogtreecommitdiff
path: root/mk/subst.mk
AgeCommit message (Collapse)AuthorFilesLines
2008-01-26See also: PLIST_SUBSTrillig1-1/+4
2008-01-23Made the wording more into an explanation.rillig1-2/+3
2008-01-18If the package doesn't provide a SUBST_MESSAGE, generate a default one.rillig1-3/+4
This way, file modifications cannot go unnoticed and at least appear in the build logs. While here, fixed an ambiguity in the description of SUBST_MESSAGE.
2008-01-18Don't rely on file(1) to distinguish text files from binary files. Thisrillig1-5/+5
has proven too unreliable in the past. For example, some Makefile.in files were classified as "Quake I or II world or extension", just because they happen to start with the letters "PACK". This method was also subject to subtle differences in the locale. The new method counts the number of NUL bytes in the file. It does not depend on the locale settings. The -c option of wc(1) counts bytes, not characters, and tr(1), which may interpret multibyte sequences, is protected by LC_ALL. It should also work with the historical implementations of tr(1) that could not handle NUL bytes and discarded them, since this is exactly the intention. See also: * http://mail-index.netbsd.org/tech-pkg/2006/07/05/0000.html * PR 37793
2008-01-18Replaced _PKG_SILENT and _PKG_DEBUG with RUN.rillig1-7/+4
2007-11-19Explicitly mentioned that both SUBST_SED and SUBST_VARS may be used in arillig1-2/+3
class.
2007-11-01Before running _SUBST_IS_TEXT_FILE on a file, make sure that the filerillig1-5/+5
exists.
2007-04-05Recognize XML files as text.wiz1-2/+2
2007-03-15For all those who are interested in the inner workings of pkgsrc, thererillig1-1/+10
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).
2007-03-07Fixed the quoting for SUBST_VARS.*. Now every character gets replacedrillig1-2/+5
properly. The regression test passes.
2007-02-05Some Makefile.in files start with the letters PACKAGE. NetBSD's file(1)rillig1-2/+2
considers files starting with the letters PACK to be related to Quake.
2007-01-23Since there are many cases where the string @FOO@ is replaced with therillig1-2/+11
pkgsrc variable ${FOO}, there is now a shorter variant for it. Instead of defining SUBST_SED.*, just say SUBST_VARS.* = FOO.
2007-01-14The new variable SUBST_SKIP_TEXT_CHECK.* can be set to "yes" to do therillig1-2/+14
substitutions in all files, whether or not file(1) says they are text.
2007-01-11When a SUBST change leaves a file as-is, print an informational message.rillig1-3/+4
For all messages, the current SUBST_CLASS is printed, too.
2007-01-03+ keyword "subst"rillig1-1/+4
2006-12-10Also "Assembler source" is a text file for _SUBST_IS_TEXT_FILE.reed1-2/+2
(Really the file is a wdm config file. Noticed when building wdm.)
2006-11-23file(1) under NetBSD-sparc64 4.99.4 identifies the filetron1-2/+2
"gdk-pixbuf/Makefile.in" from the "gtk2" package as "libtool library file". Change the textfile check to accept any file which file(1) identifies as "<whatever>libtool<whateverelse>" to fix the build of the "gtk2" package (and probably other packages).
2006-11-09Clarify _who_ is supposed to set the SUBST_* variables.rillig1-2/+2
2006-07-02Fixed the documentation for SUBST_SED.*, which is not _one_ sedrillig1-2/+3
expression, but a list of sed expressions.
2006-06-22SUBST_STAGE.* is currently not defined by all SUBST blocks, so disablerillig1-2/+3
PKG_FAIL_REASON in that case. It didn't have an effect anyway for normal builds, since subst.mk is included after checking PKG_FAIL_REASON. Discussed with jlam.
2006-06-17Simplified the code by reducing the number of different targets that arerillig1-20/+11
evaluated. Now the SUBST_MESSAGE is only printed once when the substitution is actually done. Before this change it had been printed also when the subst-<class> target had been invoked a second time, but the substitution didn't take place again, which had confused me. Also, converted the code to use ${WARNING_MSG} and ${STEP_MSG}.
2006-01-08Reverted the change from 1.29 to 1.30, as it had led to build failures inrillig1-2/+11
the "unwrap" class.
2006-01-07Added two missing :Q operators. One of them affects how therillig1-3/+3
SUBST_MESSAGE is printed. The ones that have been defined with "quotes" in their Makefiles are printed with quotes (of course). This is the consequence of the design pattern "quote-exactly-where-necessary", which in fact should be have been applied to pkgsrc as a whole, but still isn't.
2006-01-07Removed the use of ${FILE_CMD} from the substitution framework. Therillig1-11/+2
detection whether a given file was a text file or some other file had been unreliable. In the recent bulk builds, all of the warnings that had appeared because of that unreliable detection had been false positives.
2006-01-05Adjust comment about SUBST_FILES to match reality:joerg1-2/+2
absolute file names work as well.
2006-01-01Fixed some cases where the exitcode of child processes has been ignored.rillig1-4/+4
This will cause package builds to fail instead of hiding bugs.
2006-01-01Fixed trivial pkglint warnings:rillig1-4/+4
- Removed leading white-space in dependency lines. - s/existant/existent/.
2005-12-06Allow absolute filenames for SUBST_FILES. Needed for converters/convmv andrillig1-2/+2
maybe some others.
2005-11-24Added another diagnostic message to distinguish the cases for non-textrillig1-2/+4
file and non-existant file.
2005-11-17A warning is printed for every non-text file. This helps in detectingrillig1-1/+3
broken file(1) databases. It also gives an indication of whether this test is necessary at all.
2005-08-21Changed the comment for SUBST_STAGE to be more complete. Started the otherrillig1-9/+9
sentences with an uppercase letter. No code changes.
2005-06-09Fixed a typo.rillig1-2/+2
2005-05-20Change instances where we stored `shell command` in a make variable intojlam1-23/+22
variables that use the :sh modifier. This still causes expansion to only happen when referenced, and has the advantage of being :Q-safe. Bring back the changes from revision 1.19 of mk/subst.mk now that the problem noted above has been fixed. This passes the buildlink-unwrap regression test.
2005-05-20Revert part of revision 1.18. The new quoting was breaking somejlam1-22/+23
assumptions being made by the USE_PKGLOCALEDIR code and the wrapper framework since it added backtick expressions to the SUBST_FILES.* variables, which were being mangled by the :Q modifier. This is evident when running "make regress" in regress/buildlink-unwrap. Mea culpa.
2005-05-18Removed the quoting for SUBST_MESSAGE.<class>. Most packages unnecessarilyrillig1-2/+2
define that inside double quotes.
2005-05-17Fixed shell quoting. Reviewed by jlam.rillig1-25/+27
2005-04-30Avoid checking for !empty(...) so that we that defer variable references.jlam1-7/+1
2004-08-23SUBST_POSTCMD must be globally defined or else it breaks.jlam1-2/+2
2004-08-23Actually, it's okay if SUBST_FILTER_CMD is empty... the ${SUBST_COOKIE}jlam1-2/+2
target takes care of this case already.
2004-08-23Use _SUBST_BACKUP_SUFFIX instead of hardcoding ".subst.sav" everywhere.jlam1-8/+10
2004-08-23SUBST_FILTER_CMD can't be empty. It must be a real filter cmd, so defaultjlam1-2/+2
it to ${CAT} as a fall-through.
2004-06-06Usually there's no need to keep the original version of a fileschmonz1-2/+8
"foo" as "foo.subst.sav". Implement SUBST_POSTCMD, which by default cleans up these leftovers. If you need to keep them around, e.g. while debugging, set it to ${DO_NADA}. Remove superfluous whitespace in a comment.
2004-03-07Solaris' file(1) reports "executable [path] script" on scripts whichgrant1-2/+2
arent't shell scripts, so allow them to be subst'd.
2004-03-01* Document SUBST_CLASSES.uebayasi1-9/+13
* Indent conditionals. Reviewed By: wiz
2003-12-29Reinstate the fix in revision 1.6kim1-2/+2
2003-12-28Revert revision 1.5 as binaries and directories are now being substedkim1-12/+18
unintentionally. Also revert revision 1.6 as part of the overall change, as I suspect the change might be unnecessary. While I'm not 100% sure, this does just revert to the previous behaviour.
2003-12-28The generated target is subst-<class>, not <class>-subst. Fix commentjmmv1-2/+2
accordingly.
2003-12-27bomb to prevent silent failure if we're unable to rename a filegrant1-2/+2
before subst'ing it. previously, only a warning would be printed and the .subst_done cookie(s) would be created, indicating that the subst target was successful when it really was not.
2003-12-27remove somewhat bogus test for text files, which was dependent on thegrant1-18/+12
output of file(1) which reports too many false negatives (not detecting a file as a text file when it really is). package developers are aware of which files the subst operation applies to, since they need to specify the filenames, so this test is not really required. it's also not inconceivable that one would want to subst over a non-text file, which is now possible.
2003-12-11only print SUBST_MESSAGE if it's defined.grant1-1/+3