diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-06 21:56:36 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-06 21:56:36 -0400 |
commit | e2ffd6fc5c60b55fa18eb338a55fd944db57080a (patch) | |
tree | ed9682d945f24e30a55ac5dd15392e92f7097071 /build-aux | |
parent | 8b3a6039faff5b2df79626172fcb1df816e3e9a6 (diff) | |
parent | eaf336a9265399520e3cf71d4979446b98bdf48d (diff) |
Merge remote-tracking branch 'r-autothing/v3/master' into notsystemd/master
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/Makefile.each.tail/10-files.mk | 23 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/10-files.mk | 2 |
2 files changed, 15 insertions, 10 deletions
diff --git a/build-aux/Makefile.each.tail/10-files.mk b/build-aux/Makefile.each.tail/10-files.mk index 787a3bdbd1..e22b216c19 100644 --- a/build-aux/Makefile.each.tail/10-files.mk +++ b/build-aux/Makefile.each.tail/10-files.mk @@ -37,16 +37,21 @@ $(eval \ $$(outdir)/install-$(_files.g): $$(_files.sys.$(_files.g))$(at.nl))) # Destructive targets -_files.uninstall = $(_files.sys) -_files.mostlyclean = $(filter-out $(_files.out.slow) $(_files.out.cfg),$(_files.out)) -_files.clean = $(filter-out $(_files.out.cfg),$(_files.out)) -_files.distclean = $(_files.out) -_files.maintainer-clean = $(_files.distclean) $(filter-out $(_files.src.cfg) $(_files.src.src),$(_files.src)) -_files.$(files.vcsclean) = $(_files.distclean) $(filter-out $(_files.src.src),$(_files.src)) +# +# We do our on $(srcdir) / $(outdir) prefixing here because +# at.addprefix (while necessary for dependency lists) doesn't preserve +# trailing slashes, which we care about here; while also not caring +# about the path normalization that at.addprefix does. +_files.uninstall = $(addprefix $(DESTDIR),$(files.sys)) +_files.mostlyclean = $(addprefix $(srcdir)/,$(filter-out $(files.out.slow) $(files.out.cfg),$(files.out))) +_files.clean = $(addprefix $(srcdir)/,$(filter-out $(files.out.cfg),$(files.out))) +_files.distclean = $(addprefix $(srcdir)/, $(files.out)) +_files.maintainer-clean = $(files.distclean) $(addprefix $(srcdir)/,$(filter-out $(files.src.cfg) $(files.src.src),$(files.src))) +_files.$(files.vcsclean) = $(files.distclean) $(addprefix $(srcdir)/,$(filter-out $(files.src.src),$(files.src))) $(addprefix $(outdir)/,uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean)): %: %-hook - $(call _files.XARGS,$(RM) --, $(sort $(wildcard $(filter-out %/,$(_files.$(@F))))) ) - $(call _files.XARGS,$(RM) -r --, $(sort $(wildcard $(filter %/,$(_files.$(@F))))) ) - $(call _files.XARGS,$(RMDIR_P) --,$(filter-out ./,$(sort $(wildcard $(dir $(_files.$(@F))))))) + $(call _files.XARGS,$(RM) -- {}, $(sort $(filter-out %/,$(_files.$(@F)))) ) + $(call _files.XARGS,$(RM) -r -- {}, $(sort $(filter %/,$(_files.$(@F)))) ) + $(call _files.XARGS,$(RMDIR_P) -- {} 2>/dev/null || true,$(filter-out ./,$(sort $(dir $(_files.$(@F)))))) $(addprefix $(outdir)/,maintainer-clean $(files.vcsclean)): _files.maintainer-clean-warning $(foreach t,uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean), $(outdir)/$t-hook):: .PHONY: $(foreach t,uninstall mostlyclean clean distclean maintainer-clean $(files.vcsclean), $(outdir)/$t-hook) diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index 564f9d634f..55c41cb9b9 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -92,7 +92,7 @@ TRUE ?= true # Utility functions -_files.XARGS = $(if $(strip $2),$1 $(strip $2)) +_files.XARGS = $(if $(strip $2),$(subst {},$(strip $2),$1)) _files.maintainer-clean-warning: @echo 'This command is intended for maintainers to use; it' |