pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun Apr 28 12:31:15 UTC 2019

Modified Files:
        pkgsrc/mk: subst.mk

Log Message:
mk/subst.mk: use simpler words in the documentation, add an example


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 pkgsrc/mk/subst.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/subst.mk
diff -u pkgsrc/mk/subst.mk:1.59 pkgsrc/mk/subst.mk:1.60
--- pkgsrc/mk/subst.mk:1.59     Sun Mar 17 12:01:14 2019
+++ pkgsrc/mk/subst.mk  Sun Apr 28 12:31:15 2019
@@ -1,9 +1,19 @@
-# $NetBSD: subst.mk,v 1.59 2019/03/17 12:01:14 rillig Exp $
+# $NetBSD: subst.mk,v 1.60 2019/04/28 12:31:15 rillig Exp $
 #
-# This Makefile fragment implements a general text replacement facility.
-# Package makefiles define a ``class'', for each of which a particular
-# substitution description can be defined.  For each class of files, a
-# target subst-<class> is created to perform the text replacement.
+# The subst framework replaces text in one or more files in the WRKSRC
+# directory. Packages can define several ``classes'' of replacements.
+# Each such class defines:
+#
+#      - in which stage of the build process the replacement happens
+#      - which files are affected by the replacement
+#      - which text or pattern is replaced by which replacement text
+#
+# A typical example is:
+#
+#      SUBST_CLASSES+=         prefix
+#      SUBST_STAGE.prefix=     pre-configure
+#      SUBST_FILES.prefix=     ./configure doc/*.html
+#      SUBST_SED.prefix=       -e 's,/usr/local,${PREFIX},g'
 #
 # Package-settable variables:
 #
@@ -29,12 +39,12 @@
 #
 # SUBST_VARS.<class>
 #      List of variables that are substituted whenever they appear in
-#      the form @VARNAME@. This is basically a short-cut for
+#      the form @VARNAME@. This is basically a shortcut for
 #
 #              -e 's,@VARNAME@,${VARNAME},g'
 #
-#      also taking care of (most) quoting issues. You can use both
-#      SUBST_SED and SUBST_VARS in a single class.
+#      that even works when ${VARNAME} contains arbitrary characters.
+#      Both SUBST_SED and SUBST_VARS can be used in a single class.
 #
 # SUBST_FILTER_CMD.<class>
 #      Filter used to perform the actual substitution on the specified



Home | Main Index | Thread Index | Old Index