summaryrefslogtreecommitdiffstats
path: root/build-aux/subst.am
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
commitcbffab246997fb5a06211dfb706b54e5ae5bb59f (patch)
tree0573c5d96f58d74d76a49c0f2a70398e389a36d3 /build-aux/subst.am
parentInitial commit. (diff)
downloaddpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.tar.xz
dpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.zip
Adding upstream version 1.21.22.upstream/1.21.22upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build-aux/subst.am')
-rw-r--r--build-aux/subst.am46
1 files changed, 46 insertions, 0 deletions
diff --git a/build-aux/subst.am b/build-aux/subst.am
new file mode 100644
index 0000000..74a40bf
--- /dev/null
+++ b/build-aux/subst.am
@@ -0,0 +1,46 @@
+#
+# Build time variable substitution for generated files.
+#
+
+# Shell support.
+
+do_shell_subst = $(AM_V_GEN) $(SED) \
+ -e "s:^ADMINDIR=.*$$:ADMINDIR='$(admindir)':" \
+ -e "s:^BACKUPSDIR=.*$$:BACKUPSDIR='$(backupsdir)':" \
+ -e "s:^PKGDATADIR_DEFAULT=.*$$:PKGDATADIR_DEFAULT='$(pkgdatadir)':" \
+ -e "s:^version=['\"][^'\"]*[\"']:version=\"$(PACKAGE_VERSION)\":" \
+ # EOL
+
+SUFFIXES += .sh
+
+.sh: Makefile
+ @test -d `dirname $@` || $(MKDIR_P) `dirname $@`
+ $(do_shell_subst) <$< >$@
+ $(AM_V_at) chmod +x $@
+
+# Perl support.
+
+do_perl_subst = $(AM_V_GEN) $(SED) \
+ -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \
+ -e "s:our \$$CONFDIR = .*;:our \$$CONFDIR = '$(pkgconfdir)';:" \
+ -e "s:our \$$ADMINDIR = .*;:our \$$ADMINDIR = '$(admindir)';:" \
+ -e "s:our \$$LIBDIR = .*;:our \$$LIBDIR = '$(pkglibexecdir)';:" \
+ -e "s:our \$$DATADIR = .*;:our \$$DATADIR = '$(pkgdatadir)';:" \
+ -e "s:our \$$PROGMAKE = .*;:our \$$PROGMAKE = '$(MAKE)';:" \
+ -e "s:our \$$PROGTAR = .*;:our \$$PROGTAR = '$(TAR)';:" \
+ -e "s:our \$$PROGPATCH = .*;:our \$$PROGPATCH = '$(PATCH)';:" \
+ -e "s:our \$$PROGVERSION = .*;:our \$$PROGVERSION = '$(PACKAGE_VERSION)';:" \
+ # EOL
+
+SUFFIXES += .pl
+
+.pl: Makefile
+ @test -d `dirname $@` || $(MKDIR_P) `dirname $@`
+ $(do_perl_subst) <$< >$@
+ $(AM_V_at) chmod +x $@
+
+# Makefile support.
+
+do_make_subst = $(AM_V_GEN) $(SED) \
+ -e "s:dpkg_datadir[[:space:]]*=[[:space:]]*[^[:space:]]*:dpkg_datadir = $(pkgdatadir):" \
+ # EOL