]> git.proxmox.com Git - mirror_zfs.git/blame - config/Substfiles.am
autoconf: use include directives instead of recursing down tests (mostly)
[mirror_zfs.git] / config / Substfiles.am
CommitLineData
38e2e9ce 1subst_sed_cmd = \
50d2c9e4 2 -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
38e2e9ce
AS
3 -e 's|@bindir[@]|$(bindir)|g' \
4 -e 's|@sbindir[@]|$(sbindir)|g' \
5 -e 's|@datadir[@]|$(datadir)|g' \
6 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
7 -e 's|@runstatedir[@]|$(runstatedir)|g' \
8 -e 's|@initconfdir[@]|$(initconfdir)|g' \
9 -e 's|@initdir[@]|$(initdir)|g' \
10 -e 's|@mounthelperdir[@]|$(mounthelperdir)|g' \
11 -e 's|@systemdgeneratordir[@]|$(systemdgeneratordir)|g' \
12 -e 's|@systemdunitdir[@]|$(systemdunitdir)|g' \
13 -e 's|@udevdir[@]|$(udevdir)|g' \
14 -e 's|@udevruledir[@]|$(udevruledir)|g' \
15 -e 's|@zfsexecdir[@]|$(zfsexecdir)|g' \
50d2c9e4 16 -e 's|@VERSION[@]|$(VERSION)|g' \
38e2e9ce
AS
17 -e 's|@PYTHON[@]|$(PYTHON)|g' \
18 -e 's|@PYTHON_SHEBANG[@]|$(PYTHON_SHEBANG)|g' \
19 -e 's|@DEFAULT_INIT_NFS_SERVER[@]|$(DEFAULT_INIT_NFS_SERVER)|g' \
37086897
AZ
20 -e 's|@DEFAULT_INIT_SHELL[@]|$(DEFAULT_INIT_SHELL)|g' \
21 -e 's|@LIBFETCH_DYNAMIC[@]|$(LIBFETCH_DYNAMIC)|g' \
63652e15
DS
22 -e 's|@LIBFETCH_SONAME[@]|$(LIBFETCH_SONAME)|g' \
23 -e 's|@ASAN_ENABLED[@]|$(ASAN_ENABLED)|g' \
24 -e 's|@UBSAN_ENABLED[@]|$(UBSAN_ENABLED)|g'
38e2e9ce 25
5cdca5b1
AZ
26define SUBST
27$(1) : $(2)$(1).in Makefile;
28 $$(AM_V_GEN)set -e; \
29 $$(MKDIR_P) $$(@D); \
30 $$(RM) $$@~; \
31 $$(SED) $$(subst_sed_cmd) $$< >$$@~; \
32 if grep -E '@[a-zA-Z0-9_]+@' $$@~ >&2; then \
38e2e9ce
AS
33 echo "Undefined substitution" >&2; \
34 exit 1; \
5cdca5b1
AZ
35 fi; \
36 [ -x $$< ] && chmod +x $$@~; \
37 mv -f $$@~ $$@
38endef
39
40SUBSTFILES =
41CLEANFILES += $(SUBSTFILES)
42EXTRA_DIST += $(SUBSTFILES:=.in)
43
44$(call SUBST,%,)