The NetBSD Project

CVS log for pkgsrc/mk/subst.mk

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / mk

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.59 / (download) - annotate - [select for diffs], Sun Mar 17 12:01:14 2019 UTC (5 days, 5 hours ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

mk/subst.mk: substitute embedded newlines, escape dots in variable names

Revision 1.58 / (download) - annotate - [select for diffs], Fri Nov 30 18:38:19 2018 UTC (3 months, 2 weeks ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4
Changes since 1.57: +3 -1 lines
Diff to previous 1.57 (colored)

mk/misc: make configuration for show-all targets more configurable

Up to now, there was a central list of variable name patterns that
defined whether a variable was printed as a sorted list, as a list or as
a single value.

Now each variable group decides on its own which of the variables are
printed in which way, using the usual glob patterns. This is more
flexible since different files sometimes differ in their naming
conventions.

Two variable groups are added: license (for everything related to
LICENSE) and go (for lang/go).

Revision 1.57 / (download) - annotate - [select for diffs], Mon Oct 8 20:35:00 2018 UTC (5 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Fix whitespace issues reported by pkglint

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 2 21:18:48 2018 UTC (14 months, 2 weeks ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1
Changes since 1.55: +8 -1 lines
Diff to previous 1.55 (colored)

Allow package developers to easily see and check the SUBST changes.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Jan 31 17:27:41 2016 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-
Changes since 1.54: +10 -14 lines
Diff to previous 1.54 (colored)

Fixed subst.mk not to corrupt files

Up to now, using subst.mk may have led to file corruption during active
package development. This happened when a sed(1) command had a syntax
error, in which case the whole sed(1) command was terminated, leaving an
empty original file behind.

This commit changes that behavior by applying the sed(1) commands to
the original file and saving the result in a temporary file. Only
after that succeeded is the original file overwritten.

During this rewrite, SUBST_POSTCMD has been removed, since it was
only used in one place (mk/wrapper), and since it relied on the exact
sequence of the internal commands. No package in either main pkgsrc
or pkgsrc-wip uses this variable right now.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Oct 13 21:38:36 2013 UTC (5 years, 5 months ago) by dholland
Branch: MAIN
CVS Tags: pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4
Changes since 1.53: +4 -3 lines
Diff to previous 1.53 (colored)

Add note to SUBST_SED noting that -E is not a standard sed option.
From Leonardo Taccari in followup to PR 48254.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Jan 26 15:23:21 2008 UTC (11 years, 1 month ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3, pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, pkgsrc-2008Q1-base, pkgsrc-2008Q1, cwrapper, cube-native-xorg-base, cube-native-xorg
Changes since 1.52: +4 -1 lines
Diff to previous 1.52 (colored)

See also: PLIST_SUBST

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jan 23 01:44:28 2008 UTC (11 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored)

Made the wording more into an explanation.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jan 18 11:26:11 2008 UTC (11 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.50: +4 -3 lines
Diff to previous 1.50 (colored)

If the package doesn't provide a SUBST_MESSAGE, generate a default one.
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.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jan 18 11:16:08 2008 UTC (11 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.49: +5 -5 lines
Diff to previous 1.49 (colored)

Don't rely on file(1) to distinguish text files from binary files. This
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

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jan 18 10:41:05 2008 UTC (11 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.48: +4 -7 lines
Diff to previous 1.48 (colored)

Replaced _PKG_SILENT and _PKG_DEBUG with RUN.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Nov 19 23:38:03 2007 UTC (11 years, 4 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2007Q4-base, pkgsrc-2007Q4
Changes since 1.47: +3 -2 lines
Diff to previous 1.47 (colored)

Explicitly mentioned that both SUBST_SED and SUBST_VARS may be used in a
class.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Nov 1 13:12:48 2007 UTC (11 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.46: +5 -5 lines
Diff to previous 1.46 (colored)

Before running _SUBST_IS_TEXT_FILE on a file, make sure that the file
exists.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Apr 5 18:33:09 2007 UTC (11 years, 11 months ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2007Q3-base, pkgsrc-2007Q3, pkgsrc-2007Q2-base, pkgsrc-2007Q2, pkgsrc-2007Q1-base, pkgsrc-2007Q1
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Recognize XML files as text.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Mar 15 22:54:24 2007 UTC (12 years ago) by rillig
Branch: MAIN
CVS Tags: jlam-pkgviews-base, jlam-pkgviews
Changes since 1.44: +10 -1 lines
Diff to previous 1.44 (colored)

For all those who are interested in the inner workings of pkgsrc, there
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).

Revision 1.44 / (download) - annotate - [select for diffs], Wed Mar 7 21:27:59 2007 UTC (12 years ago) by rillig
Branch: MAIN
Changes since 1.43: +5 -2 lines
Diff to previous 1.43 (colored)

Fixed the quoting for SUBST_VARS.*. Now every character gets replaced
properly. The regression test passes.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Feb 5 08:39:23 2007 UTC (12 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Some Makefile.in files start with the letters PACKAGE. NetBSD's file(1)
considers files starting with the letters PACK to be related to Quake.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Jan 23 06:05:39 2007 UTC (12 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.41: +11 -2 lines
Diff to previous 1.41 (colored)

Since there are many cases where the string @FOO@ is replaced with the
pkgsrc variable ${FOO}, there is now a shorter variant for it. Instead
of defining SUBST_SED.*, just say SUBST_VARS.* = FOO.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jan 14 17:05:02 2007 UTC (12 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.40: +14 -2 lines
Diff to previous 1.40 (colored)

The new variable SUBST_SKIP_TEXT_CHECK.* can be set to "yes" to do the
substitutions in all files, whether or not file(1) says they are text.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Jan 11 12:12:12 2007 UTC (12 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.39: +4 -3 lines
Diff to previous 1.39 (colored)

When a SUBST change leaves a file as-is, print an informational message.
For all messages, the current SUBST_CLASS is printed, too.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Jan 3 23:35:13 2007 UTC (12 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.38: +4 -1 lines
Diff to previous 1.38 (colored)

+ keyword "subst"

Revision 1.38 / (download) - annotate - [select for diffs], Sun Dec 10 02:25:13 2006 UTC (12 years, 3 months ago) by reed
Branch: MAIN
CVS Tags: pkgsrc-2006Q4-base, pkgsrc-2006Q4
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Also "Assembler source" is a text file for _SUBST_IS_TEXT_FILE.

(Really the file is a wdm config file. Noticed when building wdm.)

Revision 1.37 / (download) - annotate - [select for diffs], Thu Nov 23 16:27:53 2006 UTC (12 years, 4 months ago) by tron
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

file(1) under NetBSD-sparc64 4.99.4 identifies the file
"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).

Revision 1.36 / (download) - annotate - [select for diffs], Thu Nov 9 02:06:29 2006 UTC (12 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Clarify _who_ is supposed to set the SUBST_* variables.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Jul 2 09:35:05 2006 UTC (12 years, 8 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2006Q3-base, pkgsrc-2006Q3
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

Fixed the documentation for SUBST_SED.*, which is not _one_ sed
expression, but a list of sed expressions.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Jun 22 20:45:48 2006 UTC (12 years, 9 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2006Q2-base, pkgsrc-2006Q2
Changes since 1.33: +3 -2 lines
Diff to previous 1.33 (colored)

SUBST_STAGE.* is currently not defined by all SUBST blocks, so disable
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.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Jun 17 22:42:00 2006 UTC (12 years, 9 months ago) by rillig
Branch: MAIN
Changes since 1.32: +11 -20 lines
Diff to previous 1.32 (colored)

Simplified the code by reducing the number of different targets that are
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}.

Revision 1.16.4.2, Wed Jun 7 15:25:39 2006 UTC (12 years, 9 months ago) by tv
Branch: tv-derecurse
Changes since 1.16.4.1: +1 -1 lines
FILE REMOVED

EOL the tv-derecurse branch; it has become too outdated.  The last live
revision can be fetched at the tv-derecurse-eol tag.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jan 8 01:07:35 2006 UTC (13 years, 2 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2006Q1-base, pkgsrc-2006Q1
Changes since 1.31: +11 -2 lines
Diff to previous 1.31 (colored)

Reverted the change from 1.29 to 1.30, as it had led to build failures in
the "unwrap" class.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jan 7 23:27:41 2006 UTC (13 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Added two missing :Q operators. One of them affects how the
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.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jan 7 18:43:05 2006 UTC (13 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.29: +2 -11 lines
Diff to previous 1.29 (colored)

Removed the use of ${FILE_CMD} from the substitution framework. The
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.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jan 5 23:16:01 2006 UTC (13 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Adjust comment about SUBST_FILES to match reality:
absolute file names work as well.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jan 1 22:52:16 2006 UTC (13 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (colored)

Fixed some cases where the exitcode of child processes has been ignored.
This will cause package builds to fail instead of hiding bugs.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jan 1 22:30:35 2006 UTC (13 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

Fixed trivial pkglint warnings:
- Removed leading white-space in dependency lines.
- s/existant/existent/.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Dec 6 17:17:30 2005 UTC (13 years, 3 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2005Q4-base, pkgsrc-2005Q4
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Allow absolute filenames for SUBST_FILES. Needed for converters/convmv and
maybe some others.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Nov 24 20:02:40 2005 UTC (13 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.24: +4 -2 lines
Diff to previous 1.24 (colored)

Added another diagnostic message to distinguish the cases for non-text
file and non-existant file.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Nov 17 23:17:02 2005 UTC (13 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored)

A warning is printed for every non-text file. This helps in detecting
broken file(1) databases. It also gives an indication of whether this
test is necessary at all.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Aug 21 22:00:07 2005 UTC (13 years, 7 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2005Q3-base, pkgsrc-2005Q3
Changes since 1.22: +9 -9 lines
Diff to previous 1.22 (colored)

Changed the comment for SUBST_STAGE to be more complete. Started the other
sentences with an uppercase letter. No code changes.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jun 9 19:49:48 2005 UTC (13 years, 9 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2005Q2-base, pkgsrc-2005Q2
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Fixed a typo.

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 20 21:36:05 2005 UTC (13 years, 10 months ago) by jlam
Branch: MAIN
Changes since 1.20: +21 -22 lines
Diff to previous 1.20 (colored)

Change instances where we stored `shell command` in a make variable into
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.

Revision 1.20 / (download) - annotate - [select for diffs], Fri May 20 18:40:42 2005 UTC (13 years, 10 months ago) by jlam
Branch: MAIN
Changes since 1.19: +23 -22 lines
Diff to previous 1.19 (colored)

Revert part of revision 1.18.  The new quoting was breaking some
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.

Revision 1.19 / (download) - annotate - [select for diffs], Wed May 18 03:33:51 2005 UTC (13 years, 10 months ago) by rillig
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Removed the quoting for SUBST_MESSAGE.<class>. Most packages unnecessarily
define that inside double quotes.

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 17 19:01:36 2005 UTC (13 years, 10 months ago) by rillig
Branch: MAIN
Changes since 1.17: +27 -25 lines
Diff to previous 1.17 (colored)

Fixed shell quoting. Reviewed by jlam.

Revision 1.16.4.1 / (download) - annotate - [select for diffs], Tue May 17 18:29:44 2005 UTC (13 years, 10 months ago) by tv
Branch: tv-derecurse
CVS Tags: tv-derecurse-eol
Changes since 1.16: +1 -7 lines
Diff to previous 1.16 (colored)

sync [all but bsd.pkg.mk] with HEAD

Revision 1.17 / (download) - annotate - [select for diffs], Sat Apr 30 15:05:06 2005 UTC (13 years, 10 months ago) by jlam
Branch: MAIN
CVS Tags: tv-derecurse-merge
Changes since 1.16: +1 -7 lines
Diff to previous 1.16 (colored)

Avoid checking for !empty(...) so that we that defer variable references.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Aug 23 16:37:09 2004 UTC (14 years, 7 months ago) by jlam
Branch: MAIN
CVS Tags: tv-derecurse-base, pkgsrc-2005Q1-base, pkgsrc-2005Q1, pkgsrc-2004Q4-base, pkgsrc-2004Q4, pkgsrc-2004Q3-base, pkgsrc-2004Q3
Branch point for: tv-derecurse
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

SUBST_POSTCMD must be globally defined or else it breaks.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Aug 23 16:36:00 2004 UTC (14 years, 7 months ago) by jlam
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Actually, it's okay if SUBST_FILTER_CMD is empty... the ${SUBST_COOKIE}
target takes care of this case already.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Aug 23 16:35:11 2004 UTC (14 years, 7 months ago) by jlam
Branch: MAIN
Changes since 1.13: +10 -8 lines
Diff to previous 1.13 (colored)

Use _SUBST_BACKUP_SUFFIX instead of hardcoding ".subst.sav" everywhere.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Aug 23 09:01:57 2004 UTC (14 years, 7 months ago) by jlam
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

SUBST_FILTER_CMD can't be empty.  It must be a real filter cmd, so default
it to ${CAT} as a fall-through.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jun 6 04:22:23 2004 UTC (14 years, 9 months ago) by schmonz
Branch: MAIN
CVS Tags: pkgsrc-2004Q2-base, pkgsrc-2004Q2
Changes since 1.11: +8 -2 lines
Diff to previous 1.11 (colored)

Usually there's no need to keep the original version of a file
"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.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Mar 7 09:29:25 2004 UTC (15 years ago) by grant
Branch: MAIN
CVS Tags: pkgsrc-2004Q1-base, pkgsrc-2004Q1
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Solaris' file(1) reports "executable [path] script" on scripts which
arent't shell scripts, so allow them to be subst'd.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 1 09:57:10 2004 UTC (15 years ago) by uebayasi
Branch: MAIN
Changes since 1.9: +13 -9 lines
Diff to previous 1.9 (colored)

* Document SUBST_CLASSES.
* Indent conditionals.

Reviewed By:	wiz

Revision 1.9 / (download) - annotate - [select for diffs], Mon Dec 29 02:55:22 2003 UTC (15 years, 2 months ago) by kim
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Reinstate the fix in revision 1.6

Revision 1.8 / (download) - annotate - [select for diffs], Sun Dec 28 17:28:26 2003 UTC (15 years, 2 months ago) by kim
Branch: MAIN
Changes since 1.7: +18 -12 lines
Diff to previous 1.7 (colored)

Revert revision 1.5 as binaries and directories are now being substed
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.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Dec 28 15:57:29 2003 UTC (15 years, 2 months ago) by jmmv
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

The generated target is subst-<class>, not <class>-subst.  Fix comment
accordingly.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 27 03:05:53 2003 UTC (15 years, 2 months ago) by grant
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

bomb to prevent silent failure if we're unable to rename a file
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.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Dec 27 03:02:11 2003 UTC (15 years, 2 months ago) by grant
Branch: MAIN
Changes since 1.4: +12 -18 lines
Diff to previous 1.4 (colored)

remove somewhat bogus test for text files, which was dependent on the
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.

Revision 1.3.2.1 / (download) - annotate - [select for diffs], Thu Dec 11 09:55:31 2003 UTC (15 years, 3 months ago) by agc
Branch: pkgsrc-2003Q4
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

Pullup fix to pkgsrc-2003Q4 branch, requested by Grant Beattie.

	Module Name:    pkgsrc
	Committed By:   grant
	Date:           Thu Dec 11 00:05:36 UTC 2003

	Modified Files:
		pkgsrc/mk: subst.mk

	Log Message:
	only print SUBST_MESSAGE if it's defined.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Dec 11 00:05:36 2003 UTC (15 years, 3 months ago) by grant
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

only print SUBST_MESSAGE if it's defined.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Oct 7 10:19:09 2003 UTC (15 years, 5 months ago) by jlam
Branch: MAIN
CVS Tags: pkgsrc-2003Q4-base
Branch point for: pkgsrc-2003Q4
Changes since 1.2: +17 -6 lines
Diff to previous 1.2 (colored)

Allow a new variable SUBST_FILTER_CMD.<class> that is a command filter or
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.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Sep 2 06:59:47 2003 UTC (15 years, 6 months ago) by jlam
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

Merge pkgviews-mk branch into the HEAD by running:

	cd pkgsrc/mk
	cvs update -Pd -A
	cvs update -Pd -j pkgviews-mk-base -j pkgviews-mk

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Wed Aug 27 11:44:32 2003 UTC (15 years, 6 months ago) by jlam
Branch: pkgviews-mk
Changes since 1.1.2.1: +80 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync to HEAD for subst.mk

Revision 1.1.2.1, Wed Aug 27 11:24:37 2003 UTC (15 years, 6 months ago) by jlam
Branch: pkgviews-mk
Changes since 1.1: +0 -80 lines
FILE REMOVED

file subst.mk was added on branch pkgviews-mk on 2003-08-27 11:24:37 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Wed Aug 27 11:24:37 2003 UTC (15 years, 6 months ago) by jlam
Branch: MAIN
CVS Tags: pkgviews-mk-base
Branch point for: pkgviews-mk

subst.mk is a Makefile fragment that implements a general text replacement
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.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>