2 # Build time variable substitution for generated files.
8 s{^ADMINDIR=.*$$}{ADMINDIR='$(admindir)'}; \
9 s{^BACKUPSDIR=.*$$}{BACKUPSDIR='$(backupsdir)'}; \
10 s{^PKGDATADIR_DEFAULT=.*$$}{PKGDATADIR_DEFAULT='$(pkgdatadir)'}; \
11 s{^version=['\"][^'\"]*[\"']}{version=\"$(PACKAGE_VERSION)\"}; \
12 s{^TAR=.*$$}{TAR='$(TAR)'}; \
15 subst_shell_filter = $(PERL) -p -e $(subst_shell_rules)
16 subst_shell_file = $(PERL) -i -p -e $(shell_subst_rules)
21 @test -d `dirname $@` || $(MKDIR_P) `dirname $@`
22 $(AM_V_GEN) $(subst_shell_filter) <$< >$@
23 $(AM_V_at) chmod +x $@
28 s{^\#!\s*/usr/bin/perl}{\#!$(PERL)}; \
29 s{our \\\$$CONFDIR = .*;}{our \\\$$CONFDIR = '$(pkgconfdir)';}; \
30 s{our \\\$$ADMINDIR = .*;}{our \\\$$ADMINDIR = '$(admindir)';}; \
31 s{our \\\$$LIBDIR = .*;}{our \\\$$LIBDIR = '$(pkglibexecdir)';}; \
32 s{our \\\$$DATADIR = .*;}{our \\\$$DATADIR = '$(pkgdatadir)';}; \
33 s{our \\\$$PROGMAKE = .*;}{our \\\$$PROGMAKE = '$(MAKE)';}; \
34 s{our \\\$$PROGTAR = .*;}{our \\\$$PROGTAR = '$(TAR)';}; \
35 s{our \\\$$PROGPATCH = .*;}{our \\\$$PROGPATCH = '$(PATCH)';}; \
36 s{our \\\$$PROGVERSION = .*;}{our \\\$$PROGVERSION = '$(PACKAGE_VERSION)';}; \
39 subst_perl_filter = $(PERL) -p -e $(subst_perl_rules)
40 subst_perl_file = $(PERL) -i -p -e $(subst_perl_rules)
45 @test -d `dirname $@` || $(MKDIR_P) `dirname $@`
46 $(AM_V_GEN) $(subst_perl_filter) <$< >$@
47 $(AM_V_at) chmod +x $@