diff options
Diffstat (limited to 'build-aux/Makefile.each.tail')
-rw-r--r-- | build-aux/Makefile.each.tail/50-sd.mk | 94 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/60-am.mk | 6 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/60-amcfg.mk | 52 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/70-sdcompletion.mk | 23 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/70-sdman.mk | 73 |
5 files changed, 248 insertions, 0 deletions
diff --git a/build-aux/Makefile.each.tail/50-sd.mk b/build-aux/Makefile.each.tail/50-sd.mk new file mode 100644 index 0000000000..9917a0ce54 --- /dev/null +++ b/build-aux/Makefile.each.tail/50-sd.mk @@ -0,0 +1,94 @@ +# -*- Mode: makefile; indent-tabs-mode: t -*- +# +# This file is part of systemd. +# +# Copyright 2010-2012 Lennart Poettering +# Copyright 2010-2012 Kay Sievers +# Copyright 2013 Zbigniew Jędrzejewski-Szmek +# Copyright 2013 David Strauss +# Copyright 2016 Luke Shumaker +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see <http://www.gnu.org/licenses/>. + +mod.sd.depends += files am lt + +-include $(wildcard $(outdir)/$(DEPDIR)/*.P*) + +files.out.int += *.o *.lo *.so .deps/ .libs/ +files.out.int += *-list.txt +files.out.int += *-from-name.gperf +files.out.int += *-from-name.h +files.out.int += *-to-name.h +files.out.int += *-gperf.c + +$(outdir)/%.o : $(srcdir)/%.c $(topoutdir)/config.h | $(outdir)/$(DEPDIR); $(AM_V_CC)$(sd.COMPILE) -c -o $@ $< +$(outdir)/%.o : $(outdir)/%.c $(topoutdir)/config.h | $(outdir)/$(DEPDIR); $(AM_V_CC)$(sd.COMPILE) -c -o $@ $< +$(outdir)/%.lo: $(srcdir)/%.c $(topoutdir)/config.h | $(outdir)/$(DEPDIR); $(AM_V_CC)$(sd.LTCOMPILE) -c -o $@ $< +$(outdir)/%.lo: $(outdir)/%.c $(topoutdir)/config.h | $(outdir)/$(DEPDIR); $(AM_V_CC)$(sd.LTCOMPILE) -c -o $@ $< + +$(outdir)/$(DEPDIR): + $(AM_V_at)$(MKDIR_P) $@ + +$(outdir)/%.la: + @if test $(words $(lt.lib.files.all)) = 0; then echo 'Cannot link library with no dependencies: $@' >&2; exit 1; fi + @if test $(origin am.LDFLAGS) = undefined; then echo 'Cannot link library with undefined am.LDFLAGS: $@' >&2; exit 1; fi + $(AM_V_CCLD)$(sd.LINK) $(if $(lt.lib.rpath),-rpath $(lt.lib.rpath)) $(lt.lib.files.ld) + $(AM_V_at)$(lt.lib.post) +$(addprefix $(outdir)/,$(am.out_PROGRAMS)): $(outdir)/%: + @if test $(words $(lt.exe.files.all)) = 0; then echo 'Cannot link executable with no dependencies: $@' >&2; exit 1; fi + @if test $(origin am.LDFLAGS) = undefined; then echo 'Cannot link executable with undefined am.LDFLAGS: $@' >&2; exit 1; fi + $(AM_V_CCLD)$(sd.LINK) $(lt.exe.files.ld) + +# Stupid test that everything purported to be exported really is +$(outdir)/test-lib%-sym.c: $(srcdir)/lib%.sym + $(AM_V_GEN){\ + printf '#include <stdio.h>\n' && \ + printf '#include "%s"\n' $(notdir $(filter %.h, $^)) && \ + printf 'void* functions[] = {\n' && \ + sed -r -n 's/^ +([a-zA-Z0-9_]+);/\1,/p' $< && \ + printf '};\nint main(void) {\n' && \ + printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' && \ + printf 'return 0; }\n' && \ + :; } > $@ + +_sd.files_in = $(foreach f,$(files.sys),$(if $(filter $1,$(patsubst %/,%,$(dir $f))),$(DESTDIR)$f)) + +$(outdir)/%-from-name.gperf: $(outdir)/%-list.txt + $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@ + +$(outdir)/%-from-name.h: $(outdir)/%-from-name.gperf + $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@ + +ifeq ($(sd.sed_files),) +EXTRA_DIST ?= +sd.sed_files += $(notdir $(patsubst %.in,%,$(filter %.in,$(EXTRA_DIST)))) +endif +ifneq ($(sd.sed_files),) +$(addprefix $(outdir)/,$(sd.sed_files)): $(outdir)/%: $(srcdir)/%.in + $(sd.SED_PROCESS) +endif + +#$(outdir)/%.sh: $(srcdir)/%.sh.in +# $(SED_PROCESS) +# $(AM_V_GEN)chmod +x $@ + +$(outdir)/%.c: $(srcdir)/%.gperf + $(AM_V_GPERF)$(GPERF) < $< > $@ +$(outdir)/%.c: $(outdir)/%.gperf + $(AM_V_GPERF)$(GPERF) < $< > $@ + +$(outdir)/%: $(srcdir)/%.m4 $(top_builddir)/config.status + $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ +$(outdir)/%: $(outdir)/%.m4 $(top_builddir)/config.status + $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ diff --git a/build-aux/Makefile.each.tail/60-am.mk b/build-aux/Makefile.each.tail/60-am.mk new file mode 100644 index 0000000000..38ebc10ea9 --- /dev/null +++ b/build-aux/Makefile.each.tail/60-am.mk @@ -0,0 +1,6 @@ +$(eval $(value _am.pass0)) +$(eval $(value _am.pass1)) +$(eval $(value _am.pass2)) +$(eval $(value _am.pass3)) +$(eval $(value _am.pass4)) +$(eval $(value _am.pass5)) diff --git a/build-aux/Makefile.each.tail/60-amcfg.mk b/build-aux/Makefile.each.tail/60-amcfg.mk new file mode 100644 index 0000000000..ae9d25457b --- /dev/null +++ b/build-aux/Makefile.each.tail/60-amcfg.mk @@ -0,0 +1,52 @@ +$(DESTDIR)$(includedir)/%.h: $(srcdir)/include/%.h + @$(NORMAL_INSTALL) + $(am.INSTALL) + +$(DESTDIR)$(sysusersdir)/%.conf: $(srcdir)/%.sysusers + @$(NORMAL_INSTALL) + $(am.INSTALL) +$(DESTDIR)$(sysusersdir)/%.conf: $(outdir)/%.sysusers + @$(NORMAL_INSTALL) + $(am.INSTALL) + +$(DESTDIR)$(sysctldir)/%.conf: $(srcdir)/%.sysctl + @$(NORMAL_INSTALL) + $(am.INSTALL) +$(DESTDIR)$(sysctldir)/%.conf: $(outdir)/%.sysctl + @$(NORMAL_INSTALL) + $(am.INSTALL) + +$(DESTDIR)$(tmpfilesdir)/%.conf: $(srcdir)/%.tmpfiles + @$(NORMAL_INSTALL) + $(am.INSTALL) +$(DESTDIR)$(tmpfilesdir)/%.conf: $(outdir)/%.tmpfiles + @$(NORMAL_INSTALL) + $(am.INSTALL) + +$(DESTDIR)$(pamconfdir)/%: $(srcdir)/%.pam + @$(NORMAL_INSTALL) + $(am.INSTALL) +$(DESTDIR)$(pamconfdir)/%: $(outdir)/%.pam + @$(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) + +$(DESTDIR)$(xinitrcdir)/%.sh: $(srcdir)/%.xinitrc + @$(NORMAL_INSTALL) + $(am.INSTALL) +$(DESTDIR)$(xinitrcdir)/%.sh: $(outdir)/%.xinitrc + @$(NORMAL_INSTALL) + $(am.INSTALL) diff --git a/build-aux/Makefile.each.tail/70-sdcompletion.mk b/build-aux/Makefile.each.tail/70-sdcompletion.mk new file mode 100644 index 0000000000..22a0d1be62 --- /dev/null +++ b/build-aux/Makefile.each.tail/70-sdcompletion.mk @@ -0,0 +1,23 @@ +mod.sdcompletion.description = (systemd) shell completion +mod.sdcompletion.depends += am +define mod.sdcompletion.doc +# Inputs: +# - Directory variable : `rootbin_PROGRAMS` +# - Directory variable : `bin_PROGRAMS` +# - Directory variable : `dist_bin_SCRIPTS` +# - Directory variable : `bashcompletion_DATA` +# - Directory variable : `zshcompletion_DATA` +# Outputs: +# - Directory variable : `dist_bashcompletion_DATA` +# - Directory variable : `dist_zshcompletion_DATA` +endef +mod.sdcompletion.doc := $(value mod.sdcompletion.doc) + +rootbin_PROGRAMS ?= +bin_PROGRAMS ?= +dist_bin_SCRIPTS ?= +bashcompletion_DATA ?= +zshcompletion_DATA ?= +# We use `dist_` to trick `am` into not putting it in `am.out_DATA` +dist_bashcompletion_DATA := $(sort $(bashcompletion_DATA) $(rootbin_PROGRAMS) $(bin_PROGRAMS) $(dist_bin_SCRIPTS)) +dist_zshcompletion_DATA := $(sort $(zshcompletion_DATA) $(addprefix _,$(rootbin_PROGRAMS) $(bin_PROGRAMS) $(dist_bin_SCRIPTS))) diff --git a/build-aux/Makefile.each.tail/70-sdman.mk b/build-aux/Makefile.each.tail/70-sdman.mk new file mode 100644 index 0000000000..ccbb1bd4e1 --- /dev/null +++ b/build-aux/Makefile.each.tail/70-sdman.mk @@ -0,0 +1,73 @@ +# -*- Mode: makefile; indent-tabs-mode: t -*- +# +# This file is part of systemd. +# +# Copyright 2010-2012 Lennart Poettering +# Copyright 2010-2012 Kay Sievers +# Copyright 2013 Zbigniew Jędrzejewski-Szmek +# Copyright 2013 David Strauss +# Copyright 2016 Luke Shumaker +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see <http://www.gnu.org/licenses/>. + +_sdman.man_xml = $(foreach _sdman.tmp,$(filter %.xml,$(files.src.src)),$(if $(findstring /,$(_sdman.tmp)),,$(_sdman.tmp))) + +ifneq ($(_sdman.man_xml),) + +$(srcdir)/Makefile-man.mk: $(topsrcdir)/tools/make-man-rules.py $(topsrcdir)/tools/xml_helper.py $(topsrcdir)/man/custom-entities.ent.in $(outdir)/.var._sdman.man_xml $(call at.addprefix,$(srcdir),$(_sdman.man_xml)) + $(AM_V_GEN)$(PYTHON) $< $(filter %.xml,$^) | $(WRITE_ATOMIC) $@ +files.src.gen += Makefile-man.mk + +sdman.MANPAGES = +sdman.MANPAGES_ALIAS = +#-include $(srcdir)/Makefile-man.mk + +_sdman.XML_FILES = \ + ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(sdman.MANPAGES)}}}}} +_sdman.HTML_FILES = \ + ${_sdman.XML_FILES:.xml=.html} +_sdman.HTML_ALIAS = \ + ${patsubst %.1,%.html,${patsubst %.3,%.html,${patsubst %.5,%.html,${patsubst %.7,%.html,${patsubst %.8,%.html,$(sdman.MANPAGES_ALIAS)}}}}} + +ifneq ($(ENABLE_MANPAGES),) +man_MANS = \ + $(sdman.MANPAGES) \ + $(sdman.MANPAGES_ALIAS) + +noinst_DATA += \ + $(_sdman.HTML_FILES) \ + $(_sdman.HTML_ALIAS) +endif # ENABLE_MANPAGES + +at.subdirs += $(abspath $(topoutdir)/man) + +$(outdir)/%.1: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.3: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.5: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.7: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.8: $(srcdir)/%.xml $(topsrcdir)/man/custom-man.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_MAN) + +$(outdir)/%.html: $(srcdir)/%.xml $(topsrcdir)/man/custom-html.xsl $(topoutdir)/man/custom-entities.ent + $(_sdman.XSLTPROC_PROCESS_HTML) + +endif # _sdman.man_xml |