File: Substfiles.am

package info (click to toggle)
zfs-linux 2.1.11-1%2Bdeb12u1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 77,344 kB
  • sloc: ansic: 376,447; sh: 59,625; python: 7,872; asm: 6,476; makefile: 5,812; perl: 770; sed: 41; awk: 5
file content (36 lines) | stat: -rw-r--r-- 1,243 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
subst_sed_cmd = \
	-e 's|@bindir[@]|$(bindir)|g' \
	-e 's|@sbindir[@]|$(sbindir)|g' \
	-e 's|@datadir[@]|$(datadir)|g' \
	-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
	-e 's|@runstatedir[@]|$(runstatedir)|g' \
	-e 's|@initconfdir[@]|$(initconfdir)|g' \
	-e 's|@initdir[@]|$(initdir)|g' \
	-e 's|@mounthelperdir[@]|$(mounthelperdir)|g' \
	-e 's|@systemdgeneratordir[@]|$(systemdgeneratordir)|g' \
	-e 's|@systemdunitdir[@]|$(systemdunitdir)|g' \
	-e 's|@udevdir[@]|$(udevdir)|g' \
	-e 's|@udevruledir[@]|$(udevruledir)|g' \
	-e 's|@zfsexecdir[@]|$(zfsexecdir)|g' \
	-e 's|@PYTHON[@]|$(PYTHON)|g' \
	-e 's|@PYTHON_SHEBANG[@]|$(PYTHON_SHEBANG)|g' \
	-e 's|@DEFAULT_INIT_NFS_SERVER[@]|$(DEFAULT_INIT_NFS_SERVER)|g' \
	-e 's|@DEFAULT_INIT_SHELL[@]|$(DEFAULT_INIT_SHELL)|g' \
	-e 's|@LIBFETCH_DYNAMIC[@]|$(LIBFETCH_DYNAMIC)|g' \
	-e 's|@LIBFETCH_SONAME[@]|$(LIBFETCH_SONAME)|g'

SUBSTFILES =
CLEANFILES = $(SUBSTFILES)
EXTRA_DIST = $(SUBSTFILES:=.in)

$(SUBSTFILES):%:%.in Makefile
	$(AM_V_GEN)set -e; \
	$(MKDIR_P) $$(dirname $@); \
	$(RM) $@~; \
	$(SED) $(subst_sed_cmd) $< >$@~; \
	if grep -E '@[a-zA-Z0-9_]+@' $@~ >&2; then \
		echo "Undefined substitution" >&2; \
		exit 1; \
	else test $$? -eq 1; fi; \
	test -x $< && chmod +x $@~; \
	mv -f $@~ $@