summaryrefslogtreecommitdiff
path: root/mk/subst.mk
AgeCommit message (Collapse)AuthorFilesLines
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
2003-10-07Allow a new variable SUBST_FILTER_CMD.<class> that is a command filter orjlam1-6/+17
pipeline that takes stdin, performs the substitions and writes the result to stdout. It defaults to ${SED} ${SUBST_SED.<class>}. Use this variable to replace the sed command with something else, like an awk process.
2003-09-02Merge pkgviews-mk branch into the HEAD by running:jlam1-1/+1
cd pkgsrc/mk cvs update -Pd -A cvs update -Pd -j pkgviews-mk-base -j pkgviews-mk
2003-08-27subst.mk is a Makefile fragment that implements a general text replacementjlam1-0/+80
facility for different classes of files in ${WRKSRC}. For each class of files, a target <class>-subst is created to perform the text replacement. The following variables are used: SUBST_STAGE.<class> "stage" at which we do the text replacement, e.g. pre-configure, post-build, etc. SUBST_MESSAGE.<class> message to display, noting what is being substituted SUBST_FILES.<class> files on which to run the substitution; these are relative to ${WRKSRC} SUBST_SED.<class> sed(1) substitution expression to run on the specified files This basically extracts a useful piece of code from bsd.buildlink2.mk and puts it in a place that allows it to be more widely used, and so that the functionality doesn't depend on USE_BUILDLINK2 being defined.