mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
autoconf: use include directives instead of recursing down cmd
No installation diff, dist lost -zfs-2.1.99/cmd/fsck_zfs/fsck.zfs which was distributed erroneously, since it's generated Also clean gitrev on clean Also add -e 'any possible bashisms' to default checkbashisms flags, and fully parallelise it and shellcheck, and it works out-of-tree, too Also align the Release in the dist META file correctly Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
This commit is contained in:
+17
-13
@@ -21,18 +21,22 @@ subst_sed_cmd = \
|
||||
-e 's|@ASAN_ENABLED[@]|$(ASAN_ENABLED)|g' \
|
||||
-e 's|@UBSAN_ENABLED[@]|$(UBSAN_ENABLED)|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 \
|
||||
define SUBST
|
||||
$(1) : $(2)$(1).in Makefile;
|
||||
$$(AM_V_GEN)set -e; \
|
||||
$$(MKDIR_P) $$(@D); \
|
||||
$$(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 $@~ $@
|
||||
fi; \
|
||||
[ -x $$< ] && chmod +x $$@~; \
|
||||
mv -f $$@~ $$@
|
||||
endef
|
||||
|
||||
SUBSTFILES =
|
||||
CLEANFILES += $(SUBSTFILES)
|
||||
EXTRA_DIST += $(SUBSTFILES:=.in)
|
||||
|
||||
$(call SUBST,%,)
|
||||
|
||||
Reference in New Issue
Block a user