summaryrefslogtreecommitdiffstats
path: root/build-aux/subst.am
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:35:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:35:28 +0000
commitea314d2f45c40a006c0104157013ab4b857f665f (patch)
tree3ef2971cb3675c318b8d9effd987854ad3f6d3e8 /build-aux/subst.am
parentInitial commit. (diff)
downloaddpkg-ea314d2f45c40a006c0104157013ab4b857f665f.tar.xz
dpkg-ea314d2f45c40a006c0104157013ab4b857f665f.zip
Adding upstream version 1.22.4.upstream/1.22.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build-aux/subst.am')
-rw-r--r--build-aux/subst.am47
1 files changed, 47 insertions, 0 deletions
diff --git a/build-aux/subst.am b/build-aux/subst.am
new file mode 100644
index 0000000..5515930
--- /dev/null
+++ b/build-aux/subst.am
@@ -0,0 +1,47 @@
+#
+# 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)\":" \
+ -e "s:^TAR=.*$$:TAR='$(TAR)':" \
+ # 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