summaryrefslogtreecommitdiffstats
path: root/build-aux/subst.am
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:30:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:30:08 +0000
commit44cf9c6d2d274eac37502e835155f7e985f1b8e6 (patch)
tree9576ba968924c5b9a55ba9e14f4f26184c62c7d4 /build-aux/subst.am
parentAdding upstream version 1.22.6. (diff)
downloaddpkg-44cf9c6d2d274eac37502e835155f7e985f1b8e6.tar.xz
dpkg-44cf9c6d2d274eac37502e835155f7e985f1b8e6.zip
Adding upstream version 1.22.7.upstream/1.22.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build-aux/subst.am')
-rw-r--r--build-aux/subst.am52
1 files changed, 26 insertions, 26 deletions
diff --git a/build-aux/subst.am b/build-aux/subst.am
index 5515930..9c96e5c 100644
--- a/build-aux/subst.am
+++ b/build-aux/subst.am
@@ -4,44 +4,44 @@
# 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
+subst_shell_rules = "\
+ s{^ADMINDIR=.*$$}{ADMINDIR='$(admindir)'}; \
+ s{^BACKUPSDIR=.*$$}{BACKUPSDIR='$(backupsdir)'}; \
+ s{^PKGDATADIR_DEFAULT=.*$$}{PKGDATADIR_DEFAULT='$(pkgdatadir)'}; \
+ s{^version=['\"][^'\"]*[\"']}{version=\"$(PACKAGE_VERSION)\"}; \
+ s{^TAR=.*$$}{TAR='$(TAR)'}; \
+ "
+
+subst_shell_filter = $(PERL) -p -e $(subst_shell_rules)
+subst_shell_file = $(PERL) -i -p -e $(shell_subst_rules)
SUFFIXES += .sh
.sh: Makefile
@test -d `dirname $@` || $(MKDIR_P) `dirname $@`
- $(do_shell_subst) <$< >$@
+ $(AM_V_GEN) $(subst_shell_filter) <$< >$@
$(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
+subst_perl_rules = "\
+ s{^\#!\s*/usr/bin/perl}{\#!$(PERL)}; \
+ s{our \\\$$CONFDIR = .*;}{our \\\$$CONFDIR = '$(pkgconfdir)';}; \
+ s{our \\\$$ADMINDIR = .*;}{our \\\$$ADMINDIR = '$(admindir)';}; \
+ s{our \\\$$LIBDIR = .*;}{our \\\$$LIBDIR = '$(pkglibexecdir)';}; \
+ s{our \\\$$DATADIR = .*;}{our \\\$$DATADIR = '$(pkgdatadir)';}; \
+ s{our \\\$$PROGMAKE = .*;}{our \\\$$PROGMAKE = '$(MAKE)';}; \
+ s{our \\\$$PROGTAR = .*;}{our \\\$$PROGTAR = '$(TAR)';}; \
+ s{our \\\$$PROGPATCH = .*;}{our \\\$$PROGPATCH = '$(PATCH)';}; \
+ s{our \\\$$PROGVERSION = .*;}{our \\\$$PROGVERSION = '$(PACKAGE_VERSION)';}; \
+ "
+
+subst_perl_filter = $(PERL) -p -e $(subst_perl_rules)
+subst_perl_file = $(PERL) -i -p -e $(subst_perl_rules)
SUFFIXES += .pl
.pl: Makefile
@test -d `dirname $@` || $(MKDIR_P) `dirname $@`
- $(do_perl_subst) <$< >$@
+ $(AM_V_GEN) $(subst_perl_filter) <$< >$@
$(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