diff options
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/Makefile.each.tail/60-am.mk | 19 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/30-am.mk | 9 |
2 files changed, 26 insertions, 2 deletions
diff --git a/build-aux/Makefile.each.tail/60-am.mk b/build-aux/Makefile.each.tail/60-am.mk index ff3230776b..1a59397a25 100644 --- a/build-aux/Makefile.each.tail/60-am.mk +++ b/build-aux/Makefile.each.tail/60-am.mk @@ -1,5 +1,12 @@ mod.am.depends += files +bin_PROGRAMS ?= +bin_SCRIPTS ?= +bashcompletion_DATA ?= +zshcompletion_DATA ?= +bashcompletion_DATA := $(sort $(bashcompletion_DATA) $(bin_PROGRAMS) $(bin_SCRIPTS)) +zshcompletion_DATA := $(sort $(zshcompletion_DATA) $(addprefix _,$(bin_PROGRAMS) $(bin_SCRIPTS))) + $(eval \ $(foreach p,$(am.primaries) ,$(call _am.per_primary,$p)$(at.nl))) $(eval \ @@ -22,6 +29,18 @@ $(DESTDIR)$(sysctldir)/%.conf: $(srcdir)/%.sysctl $(DESTDIR)$(sysctldir)/%.conf: $(outdir)/%.sysctl @$(NORMAL_INSTALL) $(am.INSTALL) +$(DESTDIR)$(bashcompletiondir)/%: $(srcdir)/%.completion.bash + @$(NORMAL_INSTALL) + $(am.INSTALL) +$(DESTDIR)$(bashcompletiondir)/%: $(outdir)/%.completion.bash + @$(NORMAL_INSTALL) + $(am.INSTALL) +$(DESTDIR)$(zshcompletiondir)/_%: $(srcdir)/%.completion.zsh + @$(NORMAL_INSTALL) + $(am.INSTALL) +$(DESTDIR)$(zshcompletiondir)/_%: $(outdir)/%.completion.zsh + @$(NORMAL_INSTALL) + $(am.INSTALL) at.subdirs += $(am.subdirs) files.sys.all += $(foreach p,$(am.primaries),$(am.inst_$p)) diff --git a/build-aux/Makefile.once.head/30-am.mk b/build-aux/Makefile.once.head/30-am.mk index 65cbc33ed0..457a878688 100644 --- a/build-aux/Makefile.once.head/30-am.mk +++ b/build-aux/Makefile.once.head/30-am.mk @@ -1,10 +1,15 @@ mod.am.description = (systemd) Automake-to-Autothing magic mod.am.depends += gnuconf -am.inst2noinst_DATA = $(notdir \ +am.inst2noinst_DATA = \ + $(patsubst %.completion.bash,$(abspath $(srcdir))/%.completion.bash,\ + $(patsubst %.completion.zsh,$(abspath $(srcdir))/%.completion.zsh,\ + $(notdir \ $(patsubst $(sysusersdir)/%.conf,%.sysusers,\ $(patsubst $(sysctldir)/%.conf,%.sysctl,\ - $1))) + $(patsubst $(bashcompletiondir)/%,%.completion.bash,\ + $(patsubst $(zshcompletiondir)/_%,%.completion.zsh,\ + $1))))))) am.inst2noinst_HEADERS = $(abspath $(addprefix $(srcdir)/include/,$(notdir $1))) am.var_PROGRAMS = $1_SOURCES nodist_$1_SOURCES $1_CFLAGS $1_CPPFLAGS $1_LDFLAGS $1_LDADD |