From f22246a490fcb1e8d60f8ae0759b3f1daca7c061 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 10 Aug 2016 11:22:38 -0400 Subject: fix build system --- Makefile | 34 ++--- build-aux/Makefile.each.head/00-files.mk | 13 +- build-aux/Makefile.each.head/zz-mod.mk | 1 - build-aux/Makefile.each.tail/00-dist.mk | 1 + build-aux/Makefile.each.tail/00-mod.mk | 41 +++++ build-aux/Makefile.each.tail/10-nested.mk | 3 +- build-aux/Makefile.each.tail/60-am.mk | 16 ++ build-aux/Makefile.head.mk | 14 +- build-aux/Makefile.once.head/10-dist.mk | 4 +- build-aux/Makefile.once.head/10-files.mk | 5 +- build-aux/Makefile.once.head/10-lt.mk | 8 +- build-aux/Makefile.once.head/10-write-ifchanged.mk | 3 +- build-aux/Makefile.once.head/20-sd.mk | 16 +- build-aux/Makefile.once.head/30-am.mk | 22 ++- build-aux/Makefile.once.head/zz-mod.mk | 32 +++- build-aux/Makefile.once.tail/00-dist.mk | 2 +- build-aux/Makefile.once.tail/00-mod.mk | 32 ---- build-aux/Makefile.once.tail/00-noop.mk | 2 - build-aux/Makefile.tail.mk | 2 +- src/grp-boot/systemd-boot/Makefile | 8 +- src/grp-system/systemd/Makefile | 2 + src/grp-udev/Makefile | 1 + src/grp-udev/libudev-core/Makefile | 4 +- src/grp-udev/libudev-core/udev.conf | 3 - src/grp-udev/libudev-core/udev.pc.in | 5 - src/grp-udev/udev.conf | 3 + src/grp-udev/udev.pc.in | 5 + src/libsystemd/Makefile | 14 +- src/libsystemd/src/Makefile | 165 ++------------------- src/libsystemd/src/sd-journal/Makefile | 5 +- src/libsystemd/src/test.mk | 152 +++++++++++++++++++ src/libudev/Makefile | 4 +- src/nss-myhostname/Makefile | 2 - tools/move.sh | 2 +- 34 files changed, 362 insertions(+), 264 deletions(-) delete mode 100644 build-aux/Makefile.each.head/zz-mod.mk create mode 100644 build-aux/Makefile.each.tail/00-dist.mk create mode 100644 build-aux/Makefile.each.tail/00-mod.mk delete mode 100644 build-aux/Makefile.once.tail/00-mod.mk delete mode 100644 build-aux/Makefile.once.tail/00-noop.mk delete mode 100644 src/grp-udev/libudev-core/udev.conf delete mode 100644 src/grp-udev/libudev-core/udev.pc.in create mode 100644 src/grp-udev/udev.conf create mode 100644 src/grp-udev/udev.pc.in create mode 100644 src/libsystemd/src/test.mk diff --git a/Makefile b/Makefile index 5d8c8e0e57..babbfd4050 100644 --- a/Makefile +++ b/Makefile @@ -26,23 +26,23 @@ include $(topsrcdir)/build-aux/Makefile.head.mk nested.subdirs += src # intltoolize -std.gen_files += m4/intltool.m4 -std.gen_files += po/Makefile.in.in +files.src.gen += m4/intltool.m4 +files.src.gen += po/Makefile.in.in # autoreconf -std.gen_files += aclocal.m4 -std.gen_files += automake.mk.in -std.gen_files += build-aux/compile -std.gen_files += build-aux/config.guess -std.gen_files += build-aux/config.sub -std.gen_files += build-aux/install-sh -std.gen_files += build-aux/ltmain.sh -std.gen_files += build-aux/missing -std.gen_files += m4/libtool.m4 -std.gen_files += m4/ltoptions.m4 -std.gen_files += m4/ltsugar.m4 -std.gen_files += m4/ltversion.m4 -std.gen_files += m4/lt~obsolete.m4 -std.gen_files += config.h.in -std.gen_files += configure +files.src.gen += aclocal.m4 +files.src.gen += automake.mk.in +files.src.gen += build-aux/compile +files.src.gen += build-aux/config.guess +files.src.gen += build-aux/config.sub +files.src.gen += build-aux/install-sh +files.src.gen += build-aux/ltmain.sh +files.src.gen += build-aux/missing +files.src.gen += m4/libtool.m4 +files.src.gen += m4/ltoptions.m4 +files.src.gen += m4/ltsugar.m4 +files.src.gen += m4/ltversion.m4 +files.src.gen += m4/lt~obsolete.m4 +files.src.gen += config.h.in +files.src.gen += configure include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/build-aux/Makefile.each.head/00-files.mk b/build-aux/Makefile.each.head/00-files.mk index c9a94e11a8..c4820cfb1f 100644 --- a/build-aux/Makefile.each.head/00-files.mk +++ b/build-aux/Makefile.each.head/00-files.mk @@ -17,13 +17,16 @@ files.src.src ?= files.src.int ?= files.src.cfg ?= files.src.gen ?= -files.src = $(sort $(foreach _files.v,$(filter files.src.%,$(.VARIABLES)),$($(_files.v)))) files.out.slow ?= files.out.int ?= files.out.cfg ?= -$(eval $(foreach t,$(files.groups),files.out.$t ?=$(at.nl))) -files.out = $(sort $(foreach _files.v,$(filter files.out.%,$(.VARIABLES)),$($(_files.v)))) -$(eval $(foreach t,$(files.groups),files.sys.$t ?=$(at.nl))) -files.sys = $(sort $(foreach _files.v,$(filter files.sys.%,$(.VARIABLES)),$($(_files.v)))) +# define files.out.$(group) files.sys.$(group) for every files.group +$(eval $(foreach t,$(files.groups),files.out.$t ?=$(at.nl)files.sys.$t ?=$(at.nl))) + +# define files.src, files.out, and files.sys aggregates +$(eval \ + files.src = $$(sort $(foreach _files.v,$(filter files.src.%,$(.VARIABLES)),$$($(_files.v))))$(at.nl)\ + files.out = $$(sort $(foreach _files.v,$(filter files.out.%,$(.VARIABLES)),$$($(_files.v))))$(at.nl)\ + files.sys = $$(sort $(foreach _files.v,$(filter files.sys.%,$(.VARIABLES)),$$($(_files.v))))) diff --git a/build-aux/Makefile.each.head/zz-mod.mk b/build-aux/Makefile.each.head/zz-mod.mk deleted file mode 100644 index b83c2235a2..0000000000 --- a/build-aux/Makefile.each.head/zz-mod.mk +++ /dev/null @@ -1 +0,0 @@ -_mod.each := $(sort $(_mod.each) $(filter-out $(_mod.once),$(_mod.vars))) diff --git a/build-aux/Makefile.each.tail/00-dist.mk b/build-aux/Makefile.each.tail/00-dist.mk new file mode 100644 index 0000000000..df363b54df --- /dev/null +++ b/build-aux/Makefile.each.tail/00-dist.mk @@ -0,0 +1 @@ +_dist.files := $(strip $(_dist.files) $(_files.src)) diff --git a/build-aux/Makefile.each.tail/00-mod.mk b/build-aux/Makefile.each.tail/00-mod.mk new file mode 100644 index 0000000000..6346173b8c --- /dev/null +++ b/build-aux/Makefile.each.tail/00-mod.mk @@ -0,0 +1,41 @@ +# Copyright (C) 2016 Luke Shumaker +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +$(outdir)/at-variables $(outdir)/at-variables-local: _mod.VARIABLES := $(filter-out $(call _mod.quote-pattern,$(_at.VARIABLES)),$(.VARIABLES)) +$(outdir)/at-variables-global: + @printf '%s\n' $(call _mod.quote-shell-each,$(sort $(.VARIABLES))) +$(outdir)/at-variables-local: + @printf '%s\n' $(call _mod.quote-shell-each,$(sort $(_mod.VARIABLES))) +$(outdir)/at-variables $(outdir)/at-values: + @printf '%s\n' $(call _mod.quote-shell-each,$(sort $(.VARIABLES),$(_mod.VARIABLES))) +$(outdir)/at-variables/%: + @printf '%s\n' $(call _mod.quote-shell,$($*)) +$(outdir)/at-values/%: + @printf '%s\n' $(call _mod.quote-shell,$(value $*)) +.PHONY: $(addprefix $(outdir)/, at-variables-global at-variables-local at-variables at-values) +at.targets += $(addprefix $(outdir)/, at-variables-global at-variables-local at-variables at-values at-variables/% at-values/%) + +$(outdir)/at-modules: + @printf 'Autothing modules used in this project:\n' + @printf ' - %s\n' $(foreach _mod.tmp,$(_mod.modules),$(call _mod.quote-shell,$(_mod.tmp) $(mod.$(_mod.tmp).description)))|column -t -s $$'\t' +$(addprefix $(outdir)/at-modules/,$(_mod.modules)): $(outdir)/at-modules/%: + @printf 'Name : %s\n' $(call _mod.quote-shell,$*) + @printf 'Description : %s\n' $(call _mod.quote-shell,$(mod.$*.description)) + @echo 'Contains Files :' $(call _mod.quote-shell-each,$(call at.relto,$(topsrcdir),$(sort $(mod.$*.files) $(wildcard $(topsrcdir)/build-aux/Makefile.*/??-$*.mk)))) + @echo 'Depends on :' $(mod.$*.depends) + +$(outdir)/at-noop: +.PHONY: $(outdir)/at-noop +at.targets += $(outdir)/at-noop diff --git a/build-aux/Makefile.each.tail/10-nested.mk b/build-aux/Makefile.each.tail/10-nested.mk index e9d02ca5b0..5e5a40b921 100644 --- a/build-aux/Makefile.each.tail/10-nested.mk +++ b/build-aux/Makefile.each.tail/10-nested.mk @@ -13,7 +13,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -$(addprefix $(outdir)/,$(nested.targets)): $(outdir)/%: $(addsuffix /%,$(call at.addprefix,$(outdir),$(nested.subdirs))) +$(eval $(foreach _tmp.nested,$(nested.targets),\ + $$(outdir)/$(_tmp.nested): $$(addsuffix /$(_tmp.nested),$$(call at.addprefix,$$(outdir),$$(nested.subdirs)))$(at.nl))) .PHONY: $(addprefix $(outdir)/,$(nested.targets)) at.subdirs += $(nested.subdirs) diff --git a/build-aux/Makefile.each.tail/60-am.mk b/build-aux/Makefile.each.tail/60-am.mk index 2c0e59212a..ff3230776b 100644 --- a/build-aux/Makefile.each.tail/60-am.mk +++ b/build-aux/Makefile.each.tail/60-am.mk @@ -7,6 +7,22 @@ $(eval \ $(foreach f,$(am.LTLIBRARIES),$(call _am.per_LTLIBRARY,$f,$(call am.file2var,$f))$(at.nl))\ $(foreach d,$(am.inst2dirs) ,$(call _am.per_directory,$d)$(at.nl))) +$(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) + at.subdirs += $(am.subdirs) files.sys.all += $(foreach p,$(am.primaries),$(am.inst_$p)) files.out.all += $(foreach p,$(am.primaries),$(am.noinst_$p)) diff --git a/build-aux/Makefile.head.mk b/build-aux/Makefile.head.mk index 105432c77a..c2ce3075b2 100644 --- a/build-aux/Makefile.head.mk +++ b/build-aux/Makefile.head.mk @@ -24,13 +24,13 @@ ifeq ($(origin _at.NO_ONCE),undefined) # These 4 functions are all $(call _at.func,parent,child) _at.is_strict_subdir = $(filter $(abspath $1)/%,$(abspath $2)) _at.is_subdir = $(filter $(abspath $1)/%,$(abspath $2)/.) -_at.relbase = $(strip \ - $(if $(call _at.is_subdir,$1,$2), \ - $(patsubst $(abspath $1)/%,%,$(abspath $2)/.), \ +_at.relbase = $(strip \ + $(if $(call _at.is_subdir,$1,$2), \ + $(patsubst %/.,$(patsubst $(abspath $1)/%,%,$(abspath $2)/.)), \ $(abspath $2))) -_at.relto = $(strip \ - $(if $(call _at.is_subdir,$1,$2), \ - $(patsubst $(abspath $1)/%,%,$(abspath $2)/.), \ +_at.relto = $(strip \ + $(if $(call _at.is_subdir,$1,$2), \ + $(patsubst %/.,%,$(patsubst $(abspath $1)/%,%,$(abspath $2)/.)), \ ../$(call _at.relto,$(dir $1),$2))) # These 3 functions only take one operand; we define public multi-operand @@ -51,6 +51,8 @@ _at.target_variable = $(_at.target_variable.$(flavor $2)) _at.target_variable.recursive = $1: private $2 = $(subst $(at.nl),$$(at.nl),$(value $2)) _at.target_variable.simple = $1: private $2 := $$($2) +_at.quote-pattern = $(subst %,\%,$(subst \,\\,$1)) + # Sanity checking ###################################################### ifeq ($(filter undefine,$(.FEATURES)),) $(error Autothing: We need a version of Make that supports 'undefine') diff --git a/build-aux/Makefile.once.head/10-dist.mk b/build-aux/Makefile.once.head/10-dist.mk index 0e13ea2e28..e139096576 100644 --- a/build-aux/Makefile.once.head/10-dist.mk +++ b/build-aux/Makefile.once.head/10-dist.mk @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -mod.dist.description = Make distribution tarballs +mod.dist.description = `dist` target for distribution tarballs # Developer configuration @@ -28,6 +28,8 @@ ifeq ($(dist.version),) $(error Autothing module: dist: dist.version must be set) endif +_dist.files = + # User configuration CP ?= cp diff --git a/build-aux/Makefile.once.head/10-files.mk b/build-aux/Makefile.once.head/10-files.mk index 2af7bf8f20..54417356ee 100644 --- a/build-aux/Makefile.once.head/10-files.mk +++ b/build-aux/Makefile.once.head/10-files.mk @@ -24,7 +24,10 @@ files.generate ?= files.generate .DEFAULT_GOAL = $(files.default) # Standard creative PHONY targets -nested.targets += $(foreach g,$(files.groups), $g install-$g install-$gdirs) +nested.targets += $(files.generate) +nested.targets += install installdirs +nested.targets += $(foreach g,$(files.groups),$g) +nested.targets += $(foreach g,$(filter-out $(files.default),$(files.groups)),install-$g install-$gdirs) # Standard destructive PHONY targets nested.targets += uninstall mostlyclean clean distclean maintainer-clean diff --git a/build-aux/Makefile.once.head/10-lt.mk b/build-aux/Makefile.once.head/10-lt.mk index c8410d4e38..b014a0f2a4 100644 --- a/build-aux/Makefile.once.head/10-lt.mk +++ b/build-aux/Makefile.once.head/10-lt.mk @@ -1,12 +1,12 @@ -mod.lt.description = Easy handling of libtool dependencies +mod.lt.description = (systemd) Easy handling of libtool dependencies mod.lt.deps += files _lt.dups = $(sort $(foreach l,$1,$(if $(filter-out 1,$(words $(filter $l,$1))),$l))) -_lt.patsubst-all = $(if $1,$(call _sd.patsubst-all,$(wordlist 2,$(words $1),$1),$2,$(patsubst $(firstword $1),$2,$3)),$3) -_lt.unLIBPATTERNS = $(foreach _lt.tmp,$1,$(if $(filter $(.LIBPATTERNS),$(_lt.tmp)),$(call _lt.patsubst-all,$(.LIBPATTERNS),-l%,$(_lt.tmp)),$(_lt.tmp))) +_lt.patsubst-all = $(if $1,$(call _lt.patsubst-all,$(wordlist 2,$(words $1),$1),$2,$(patsubst $(firstword $1),$2,$3)),$3) +_lt.unLIBPATTERNS = $(foreach _lt.tmp,$1,$(if $(filter $(.LIBPATTERNS),$(notdir $(_lt.tmp))),$(call _lt.patsubst-all,$(.LIBPATTERNS),-l%,$(notdir $(_lt.tmp))),$(_lt.tmp))) # The semantics for the de-dup bit are a bit weird. My head hurts thinking # about them. TODO: clarify/simplify/something lt.rpath = $(dir $(patsubst $(DESTDIR)%,%,$(filter %/$(@F),$(files.sys)))) -_lt.link_files = $(filter %.o %.lo %.la -l%,$(call _lt.unLIBPATTERNS$,$^)) +_lt.link_files = $(filter %.o %.lo %.la -l%,$(call _lt.unLIBPATTERNS,$^)) lt.link_files = $(filter-out $(call _lt.dups,$(_lt.link_files)),$(_lt.link_files)) diff --git a/build-aux/Makefile.once.head/10-write-ifchanged.mk b/build-aux/Makefile.once.head/10-write-ifchanged.mk index 7917201159..b0a5ac478f 100644 --- a/build-aux/Makefile.once.head/10-write-ifchanged.mk +++ b/build-aux/Makefile.once.head/10-write-ifchanged.mk @@ -1,3 +1,4 @@ -mod.write-ifchanged.description = build-aux/write-ifchanged helper script +mod.write-ifchanged.description = `write-ifchanged` auxiliary build script +mod.write-ifchanged.files += $(topsrcdir)/build-aux/write-ifchanged WRITE_IFCHANGED ?= $(topsrcdir)/build-aux/write-ifchanged diff --git a/build-aux/Makefile.once.head/20-sd.mk b/build-aux/Makefile.once.head/20-sd.mk index 6c943978e3..6b8dd580cc 100644 --- a/build-aux/Makefile.once.head/20-sd.mk +++ b/build-aux/Makefile.once.head/20-sd.mk @@ -21,7 +21,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . -mod.sd.description = systemd build rules +mod.sd.description = (systemd) shared build rules mod.sd.depends += am TESTS ?= @@ -47,10 +47,11 @@ sd.COMPILE = $(CC) $(sd.ALL_CPPFLAGS) $(sd.ALL_CFLAGS) sd.LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=compile $(CC) $(sd.ALL_CPPFLAGS) $(sd.ALL_CFLAGS) sd.LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=link $(CCLD) $(sd.ALL_CFLAGS) $(sd.ALL_LDFLAGS) -o $@ -am.INSTALL_PROGRAM = $(AM_V_PROG)$(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@ -am.INSTALL_SCRIPT = $(AM_V_SCRIPT)$(INSTALL_SCRIPT) $< $@ -am.INSTALL_LTLIBRARY = $(AM_V_LIB)$(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=install $(INSTALL) $< $@ -am.INSTALL_DATA = $(AM_V_DATA)$(INSTALL_DATA) $< $@ +am.INSTALL_PROGRAMS = $(AM_V_PROG)$(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $< $@ +am.INSTALL_SCRIPTS = $(AM_V_SCRIPT)$(INSTALL_SCRIPT) $< $@ +am.INSTALL_LTLIBRARIES = $(AM_V_LIB)$(LIBTOOL) $(AM_V_lt) --tag=CC $(sd.ALL_LIBTOOLFLAGS) --mode=install $(INSTALL) $< $@ +am.INSTALL_DATA = $(AM_V_DATA)$(INSTALL_DATA) $< $@ +am.INSTALL_HEADERS = $(AM_V_HEADER)$(INSTALL_DATA) $< $@ CC ?= c99 CCLD ?= c99 @@ -133,6 +134,11 @@ AM_V_LIB_ ?= $(AM_V_LIB_$(AM_DEFAULT_VERBOSITY)) AM_V_LIB_0 ?= @echo " LIB " $@; AM_V_LIB_1 ?= +AM_V_HEADER ?= $(AM_V_HEADER_$(V)) +AM_V_HEADER_ ?= $(AM_V_HEADER_$(AM_DEFAULT_VERBOSITY)) +AM_V_HEADER_0 ?= @echo " HEADER " $@; +AM_V_HEADER_1 ?= + AM_V_at ?= $(AM_V_at_$(V)) AM_V_at_ ?= $(AM_V_at_$(AM_DEFAULT_VERBOSITY)) AM_V_at_0 ?= @ diff --git a/build-aux/Makefile.once.head/30-am.mk b/build-aux/Makefile.once.head/30-am.mk index 52504c6dcb..65cbc33ed0 100644 --- a/build-aux/Makefile.once.head/30-am.mk +++ b/build-aux/Makefile.once.head/30-am.mk @@ -1,10 +1,12 @@ -mod.am.description = Support for Automake variables (systemd specific) +mod.am.description = (systemd) Automake-to-Autothing magic mod.am.depends += gnuconf am.inst2noinst_DATA = $(notdir \ $(patsubst $(sysusersdir)/%.conf,%.sysusers,\ $(patsubst $(sysctldir)/%.conf,%.sysctl,\ $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 am.var_LTLIBRARIES = $1_SOURCES nodist_$1_SOURCES $1_CFLAGS $1_CPPFLAGS $1_LDFLAGS $1_LIBADD @@ -21,7 +23,7 @@ $(eval $(foreach p,$(am.primaries),am.inst2noinst_$p ?= $$(notdir $$1)$(at.nl))) am.primary2dirs = $(filter $(patsubst %dir,%,$(filter %dir,$(.VARIABLES))),\ $(patsubst %_$1,%,$(filter %_$1,$(.VARIABLES)))) -am.inst2dirs = $(sort $(dir $(foreach p,$(am.primaries),$(am.inst_$p)))) +am.inst2dirs = $(sort $(patsubst %/,%,$(dir $(foreach p,$(am.primaries),$(am.inst_$p))))) am.file2var = $(subst -,_,$(subst .,_,$1)) am.file2sources = $(addprefix $(srcdir)/,$(notdir $($(am.file2var)_SOURCES))) @@ -35,13 +37,11 @@ define _am.per_primary noinst_$1 ?= check_$1 ?= -am.inst_$1 := $$(foreach d,$$(call am.primary2dirs,$1),$$($$d_$1)) +am.inst_$1 := $$(foreach d,$$(call am.primary2dirs,$1),$$(addprefix $$($$ddir)/,$$(notdir $$($$d_$1)))) am.noinst_$1 := $$(noinst_$1) am.check_$1 := $$(check_$1) $(foreach d,$(call am.primary2dirs,$1) noinst check,undefine $d_$1$(at.nl)) -ifneq ($$(am.inst_$1),) -$$(am.inst_$1): private am.INSTALL = $$(am.INSTALL_$1) -endif +$$(addprefix $$(DESTDIR),$$(am.inst_$1)): private am.INSTALL = $$(am.INSTALL_$1) am.$1 = $$(am.check_$1) $$(am.noinst_$1) $$(call am.inst2noinst_$1,$$(am.inst_$1)) endef ######################################################################## @@ -89,4 +89,12 @@ $$(DESTDIR)$1/%: $$(srcdir)/% @$$(NORMAL_INSTALL) $$(am.INSTALL) endef - +######################################################################## +define _am.per_include_directory +$$(DESTDIR)$1/%: $$(outdir)/include/% + @$$(NORMAL_INSTALL) + $$(am.INSTALL) +$$(DESTDIR)$1/%: $$(srcdir)/include/% + @$$(NORMAL_INSTALL) + $$(am.INSTALL) +endef diff --git a/build-aux/Makefile.once.head/zz-mod.mk b/build-aux/Makefile.once.head/zz-mod.mk index 7e526063c3..438f01e2ae 100644 --- a/build-aux/Makefile.once.head/zz-mod.mk +++ b/build-aux/Makefile.once.head/zz-mod.mk @@ -13,14 +13,30 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -mod.mod.description = Print information about Autothing modules +mod.mod.description = Display information about Autothing modules -_mod.target = at-mod-info -_mod.modules := $(sort $(patsubst %.mk,%,$(filter %.mk,$(subst -, ,$(notdir $(wildcard $(topsrcdir)/build-aux/Makefile.*/??-*.mk)))))) -_mod.quote = '$(subst ','\'',$1)' +# The trickery that is _mod.empty/_mod.space is from §6.2 of the GNU Make +# manual, "The Two Flavors of Variables". +_mod.empty := +_mod.space := $(_mod.empty) # +undefine _mod.empty +# _mod.rest is equivalent to GMSL rest. +_mod.rest = $(wordlist 2,$(words $1),$1) -$(eval $(foreach _mod.tmp,$(_mod.modules),mod.$(_mod.tmp).description ?=$(at.nl)mod.$(_mod.tmp).depends ?=$(at.nl))) +_mod.file2mod = $(foreach _mod.tmp,$(patsubst %.mk,%,$(notdir $1)),$(subst $(_mod.space),-,$(call _mod.rest,$(subst -, ,$(_mod.tmp))))) -_mod.vars = $(filter $(addsuffix .%,$(_mod.modules)),$(.VARIABLES)) -_mod.once := $(_mod.vars) -_mod.each := +_mod.modules := $(sort $(call _mod.file2mod,$(wildcard $(topsrcdir)/build-aux/Makefile.*/??-*.mk))) +undefine _mod.rest +undefine _mod.file2mod + +$(eval $(foreach _mod.tmp,$(_mod.modules),\ + mod.$(_mod.tmp).description ?=$(at.nl)\ + mod.$(_mod.tmp).depends ?=$(at.nl)\ + mod.$(_mod.tmp).files ?=$(at.nl))) + +_mod.quote-pattern = $(subst %,\%,$(subst \,\\,$1)) +_mod.quote-shell-each = $(foreach _mod.tmp,$1,$(call _mod.quote-shell,$(_mod.tmp))) + +# I put this as the last line in the file because it confuses Emacs syntax +# highlighting and makes the remainder of the file difficult to edit. +_mod.quote-shell = $(subst $(at.nl),'$$'\n'','$(subst ','\'',$1)') diff --git a/build-aux/Makefile.once.tail/00-dist.mk b/build-aux/Makefile.once.tail/00-dist.mk index 6c6aaedbce..3fbe0c4012 100644 --- a/build-aux/Makefile.once.tail/00-dist.mk +++ b/build-aux/Makefile.once.tail/00-dist.mk @@ -15,7 +15,7 @@ _dist.copyfile = $(MKDIR_P) $(dir $2) && $(CP) -T $1 $2 _dist.addfile = $(call _dist.copyfile,$3,$2/$(call at.relto,$1,$3)) -$(topoutdir)/$(dist.pkgname)-$(dist.version): $(foreach v,$(filter std.src_files/% std.gen_files/%,$(.VARIABLES)),$($v)) +$(topoutdir)/$(dist.pkgname)-$(dist.version): $(_dist.files) $(RM) -r $@ $(@D)/.tmp.$(@F) $(MKDIR) $(@D)/.tmp.$(@F) $(foreach f,$^,$(call _dist.addfile,$(topsrcdir),$(@D)/.tmp.$(@F),$f)$(at.nl)) diff --git a/build-aux/Makefile.once.tail/00-mod.mk b/build-aux/Makefile.once.tail/00-mod.mk deleted file mode 100644 index 68350f09ea..0000000000 --- a/build-aux/Makefile.once.tail/00-mod.mk +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2016 Luke Shumaker -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -$(_mod.target): - @printf 'Autothing modules used in this project:\n' - @printf ' - %s\n' $(foreach _mod.tmp,$(_mod.modules),$(call _mod.quote,$(_mod.tmp))) -$(addprefix $(_mod.target)/,$(_mod.modules)): $(_mod.target)/%: - @printf 'Module : %s ' $(call _mod.quote,$*) - @$(if $(at.mod.$*.description),printf ' - %s' $(call _mod.quote,mod.$*.description)) - @echo - @echo Depends on : $(mod.$*.depends) - @echo User configuration: - @egrep '^\s*[^:#]+\s*\?=' $(topsrcdir)/build-aux/Makefile.once.head/??-$*.mk 2>/dev/null | sed 's|^\s*||;s|?=|:' | grep -v -e ^'_' -e ^'$*' | column -t -s: |sed 's|^| |' - @echo Developer global inputs: - @egrep '^\s*[^:#]+\s*\?=' $(topsrcdir)/build-aux/Makefile.once.head/??-$*.mk 2>/dev/null | sed 's|^\s*||;s|?=|:' | grep ^'$*\.' | column -t -s: |sed 's|^| |' - @echo Developer per-directory inputs: - @egrep '^\s*[^:#]+\s*\?=' $(topsrcdir)/build-aux/Makefile.each.head/??-$*.mk 2>/dev/null | sed 's|^\s*||;s|?=|:' | grep ^'$*\.' | column -t -s: |sed 's|^| |' - @echo Developer outputs: - @egrep '^\s*[^:#]+\s*(|:|::)=' $(topsrcdir)/build-aux/Makefile.once.head/??-$*.mk 2>/dev/null | sed 's|^\s*||;s|?=|:' | grep ^'$*\.' | column -t -s: |sed 's|^| |' -.PHONY: $(addprefix mod/,$(_mod.modules)) diff --git a/build-aux/Makefile.once.tail/00-noop.mk b/build-aux/Makefile.once.tail/00-noop.mk deleted file mode 100644 index bac2ec11dd..0000000000 --- a/build-aux/Makefile.once.tail/00-noop.mk +++ /dev/null @@ -1,2 +0,0 @@ -noop: -.PHONY: noop diff --git a/build-aux/Makefile.tail.mk b/build-aux/Makefile.tail.mk index aeba2d1b09..2e4adc611b 100644 --- a/build-aux/Makefile.tail.mk +++ b/build-aux/Makefile.tail.mk @@ -22,7 +22,7 @@ _at.tmp_subdirs := $(call at.addprefix,$(outdir),$(at.subdirs)) # Clean the environment $(eval \ - $(foreach _at.tmp_variable,$(filter-out _at.tmp_variable $(_at.VARIABLES),$(.VARIABLES)),\ + $(foreach _at.tmp_variable,$(filter-out $(call _at.quote-pattern,_at.tmp_variable $(_at.VARIABLES)),$(.VARIABLES)),\ $(call _at.target_variable,$(_at.tmp_targets),$(_at.tmp_variable))$(at.nl)\ undefine $(_at.tmp_variable)$(at.nl))) diff --git a/src/grp-boot/systemd-boot/Makefile b/src/grp-boot/systemd-boot/Makefile index 2a56560c2c..9766e1bb82 100644 --- a/src/grp-boot/systemd-boot/Makefile +++ b/src/grp-boot/systemd-boot/Makefile @@ -113,8 +113,7 @@ systemd_boot_sources = \ src/boot/efi/boot.c systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi -std.out_files += $(systemd_boot) -std.sys_files += $(bootlibdir)/$(systemd_boot) +bootlib_DATA += $(systemd_boot) $(outdir)/systemd-boot.so: $(addprefix $(outdir)/,$(notdir $(systemd_boot_sources:.c=.o))) # ------------------------------------------------------------------------------ stub_headers = \ @@ -137,8 +136,7 @@ stub_sources = \ src/boot/efi/stub.c stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub -std.out_files += $(stub) -std.sys_files += $(bootlibdir)/$(stub) +bootlib_DATA += $(stub) $(outdir)/linux.so: $(addprefix $(outdir)/,$(notdir $(stub_sources:.c=.o))) # ------------------------------------------------------------------------------ $(outdir)/test-efi-disk.img: $(outdir)/$(systemd_boot) $(outdir)/$(stub) $(srcdir)/test-efi-create-disk.sh @@ -147,7 +145,7 @@ $(outdir)/test-efi-disk.img: $(outdir)/$(systemd_boot) $(outdir)/$(stub) $(srcdi test-efi: $(outdir)/test-efi-disk.img $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img -std.clean_files += test-efi-disk.img +files.out.int += test-efi-disk.img # ------------------------------------------------------------------------------ endif # HAVE_GNUEFI endif # ENABLE_EFI diff --git a/src/grp-system/systemd/Makefile b/src/grp-system/systemd/Makefile index 91dca30b92..4637b39de6 100644 --- a/src/grp-system/systemd/Makefile +++ b/src/grp-system/systemd/Makefile @@ -68,6 +68,8 @@ dist_systemunit_DATA_busnames += \ BUSNAMES_TARGET_WANTS += \ org.freedesktop.systemd1.busname +sd.sed_files += $(notdir $(patsubst %.in,%,$(filter %.in,$(EXTRA_DIST)))) + sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" diff --git a/src/grp-udev/Makefile b/src/grp-udev/Makefile index 67a17d74a0..67e20c65a2 100644 --- a/src/grp-udev/Makefile +++ b/src/grp-udev/Makefile @@ -69,6 +69,7 @@ SYSINIT_TARGET_WANTS += \ systemd-udevd.service \ systemd-udev-trigger.service +sd.sed_files += $(notdir $(patsubst %.in,%,$(filter %.in,$(EXTRA_DIST)))) nested.subdirs += systemd-udevd udevadm nested.subdirs += ata_id cdrom_id collect mtd_probe scsi_id v4l_id diff --git a/src/grp-udev/libudev-core/Makefile b/src/grp-udev/libudev-core/Makefile index f2b8c88eaf..da72594005 100644 --- a/src/grp-udev/libudev-core/Makefile +++ b/src/grp-udev/libudev-core/Makefile @@ -98,8 +98,8 @@ libudev_core_la_SOURCES += \ src/systemd/sd-login.h endif # HAVE_ACL -libudev-core.la.SOURCES = $(patsubst src/udev/%,%,$(filter %.c,$(_libudev_core_la_SOURCES) $(_nodist_libudev_core_la_SOURCES))) -libudev-core.la.DEPENDS = $(addprefix $(outdir)/,$(libudev-core.la.SOURCES:.c=.lo)) +sd.libudev-core_SOURCES = $(patsubst src/udev/%,%,$(filter %.c,$(_libudev_core_la_SOURCES) $(_nodist_libudev_core_la_SOURCES))) +$(outdir)/libudev-core.la: $(addprefix $(outdir)/,$(sd.libudev-core_SOURCES:.c=.lo)) nested.subdirs += net $(outdir)/udev-builtin-keyboard.lo: $(outdir)/keyboard-keys-from-name.h sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" diff --git a/src/grp-udev/libudev-core/udev.conf b/src/grp-udev/libudev-core/udev.conf deleted file mode 100644 index 47d1433002..0000000000 --- a/src/grp-udev/libudev-core/udev.conf +++ /dev/null @@ -1,3 +0,0 @@ -# see udev.conf(5) for details - -#udev_log="info" diff --git a/src/grp-udev/libudev-core/udev.pc.in b/src/grp-udev/libudev-core/udev.pc.in deleted file mode 100644 index a0c2e82d47..0000000000 --- a/src/grp-udev/libudev-core/udev.pc.in +++ /dev/null @@ -1,5 +0,0 @@ -Name: udev -Description: udev -Version: @VERSION@ - -udevdir=@udevlibexecdir@ diff --git a/src/grp-udev/udev.conf b/src/grp-udev/udev.conf new file mode 100644 index 0000000000..47d1433002 --- /dev/null +++ b/src/grp-udev/udev.conf @@ -0,0 +1,3 @@ +# see udev.conf(5) for details + +#udev_log="info" diff --git a/src/grp-udev/udev.pc.in b/src/grp-udev/udev.pc.in new file mode 100644 index 0000000000..a0c2e82d47 --- /dev/null +++ b/src/grp-udev/udev.pc.in @@ -0,0 +1,5 @@ +Name: udev +Description: udev +Version: @VERSION@ + +udevdir=@udevlibexecdir@ diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile index 61bf856c96..5c5d03a51d 100644 --- a/src/libsystemd/Makefile +++ b/src/libsystemd/Makefile @@ -52,10 +52,12 @@ libsystemd_la_LDFLAGS = \ $(libsystemd_internal_la_LIBADD) \ $(libsystemd_journal_internal_la_LIBADD) +libsystemd_la_LIBADD = $(libsystemd-internal.DEPENDS) + pkgconfiglib_DATA += \ src/libsystemd/libsystemd.pc -pkginclude_HEADERS += \ +_pkginclude_HEADERS += \ src/systemd/sd-bus.h \ src/systemd/sd-bus-protocol.h \ src/systemd/sd-bus-vtable.h \ @@ -64,6 +66,11 @@ pkginclude_HEADERS += \ src/systemd/sd-id128.h \ src/systemd/sd-daemon.h +_pkginclude_HEADERS += \ + src/systemd/sd-journal.h \ + src/systemd/sd-messages.h \ + src/systemd/_sd-common.h + rootlib_LTLIBRARIES += \ libsystemd.la @@ -105,6 +112,11 @@ nodist_test_libsystemd_sym_SOURCES = \ test_libsystemd_sym_LDADD = \ libsystemd.la +$(DESTDIR)$(pkgincludedir)/%.h: $(srcdir)/include/systemd/%.h + @$(NORMAL_INSTALL) + $(am.INSTALL_HEADERS) + +files.sys.all += $(addprefix $(pkgincludedir)/,$(notdir $(_pkginclude_HEADERS))) $(outdir)/libsystemd.la: $(srcdir)/libsystemd.sym nested.subdirs += src sd.sed_files += libsystemd.pc diff --git a/src/libsystemd/src/Makefile b/src/libsystemd/src/Makefile index 759c484bc9..10d3e668e8 100644 --- a/src/libsystemd/src/Makefile +++ b/src/libsystemd/src/Makefile @@ -116,141 +116,6 @@ libsystemd_internal_la_LIBADD = \ noinst_LTLIBRARIES += \ libsystemd-internal.la -test_bus_marshal_SOURCES = \ - src/libsystemd/sd-bus/test-bus-marshal.c - -test_bus_marshal_LDADD = \ - libshared.la \ - $(GLIB_LIBS) \ - $(DBUS_LIBS) - -test_bus_marshal_CFLAGS = \ - $(AM_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - -test_bus_signature_SOURCES = \ - src/libsystemd/sd-bus/test-bus-signature.c - -test_bus_signature_LDADD = \ - libshared.la - -test_bus_chat_SOURCES = \ - src/libsystemd/sd-bus/test-bus-chat.c - -test_bus_chat_LDADD = \ - libshared.la - -test_bus_cleanup_SOURCES = \ - src/libsystemd/sd-bus/test-bus-cleanup.c - -test_bus_cleanup_CFLAGS = \ - $(AM_CFLAGS) \ - $(SECCOMP_CFLAGS) - -test_bus_cleanup_LDADD = \ - libshared.la - -test_bus_server_SOURCES = \ - src/libsystemd/sd-bus/test-bus-server.c - -test_bus_server_LDADD = \ - libshared.la - -test_bus_objects_SOURCES = \ - src/libsystemd/sd-bus/test-bus-objects.c - -test_bus_objects_LDADD = \ - libshared.la - -test_bus_error_SOURCES = \ - src/libsystemd/sd-bus/test-bus-error.c - -test_bus_error_LDADD = \ - libshared.la - -test_bus_gvariant_SOURCES = \ - src/libsystemd/sd-bus/test-bus-gvariant.c - -test_bus_gvariant_LDADD = \ - libshared.la \ - $(GLIB_LIBS) - -test_bus_gvariant_CFLAGS = \ - $(AM_CFLAGS) \ - $(GLIB_CFLAGS) - -test_bus_creds_SOURCES = \ - src/libsystemd/sd-bus/test-bus-creds.c - -test_bus_creds_LDADD = \ - libshared.la - -test_bus_match_SOURCES = \ - src/libsystemd/sd-bus/test-bus-match.c - -test_bus_match_LDADD = \ - libshared.la - -test_bus_kernel_SOURCES = \ - src/libsystemd/sd-bus/test-bus-kernel.c - -test_bus_kernel_LDADD = \ - libshared.la - -test_bus_kernel_bloom_SOURCES = \ - src/libsystemd/sd-bus/test-bus-kernel-bloom.c - -test_bus_kernel_bloom_LDADD = \ - libshared.la - -test_bus_benchmark_SOURCES = \ - src/libsystemd/sd-bus/test-bus-benchmark.c - -test_bus_benchmark_LDADD = \ - libshared.la - -test_bus_zero_copy_SOURCES = \ - src/libsystemd/sd-bus/test-bus-zero-copy.c - -test_bus_zero_copy_LDADD = \ - libshared.la - -test_bus_introspect_SOURCES = \ - src/libsystemd/sd-bus/test-bus-introspect.c - -test_bus_introspect_LDADD = \ - libshared.la - -test_event_SOURCES = \ - src/libsystemd/sd-event/test-event.c - -test_event_LDADD = \ - libshared.la - -test_netlink_SOURCES = \ - src/libsystemd/sd-netlink/test-netlink.c - -test_netlink_LDADD = \ - libshared.la - -test_local_addresses_SOURCES = \ - src/libsystemd/sd-netlink/test-local-addresses.c - -test_local_addresses_LDADD = \ - libshared.la - -test_resolve_SOURCES = \ - src/libsystemd/sd-resolve/test-resolve.c - -test_resolve_LDADD = \ - libshared.la - -pkginclude_HEADERS += \ - src/systemd/sd-journal.h \ - src/systemd/sd-messages.h \ - src/systemd/_sd-common.h - _libsystemd_journal_internal_la_SOURCES = \ src/journal/sd-journal.c \ src/systemd/sd-journal.h \ @@ -276,7 +141,7 @@ _libsystemd_journal_internal_la_SOURCES = \ src/shared/gcrypt-util.h \ src/shared/gcrypt-util.c -nodist_libsystemd_journal_internal_la_SOURCES = \ +#nodist_libsystemd_journal_internal_la_SOURCES = \ src/journal/audit_type-to-name.h gperf_txt_sources += \ @@ -314,23 +179,25 @@ _libsystemd_journal_internal_la_SOURCES += \ libsystemd_journal_internal_la_LIBADD += \ $(GCRYPT_LIBS) -# fsprg.c is a drop-in file using void pointer arithmetic libsystemd_journal_internal_la_CFLAGS += \ - $(GCRYPT_CFLAGS) \ - -Wno-pointer-arith + $(GCRYPT_CFLAGS) endif # HAVE_GCRYPT -_noinst_LTLIBRARIES += \ +#noinst_LTLIBRARIES += \ libsystemd-journal-internal.la -libsystemd_internal_la_CFLAGS += $(libsystemd_journal_internal_la_CFLAGS) -libsystemd_internal_la_LIBADD += $(libsystemd_journal_internal_la_LIBADD) -libsystemd_internal_la_LDADD += $(libsystemd_journal_internal_la_LDADD) - -libsystemd-internal.la.SOURCES = -libsystemd-internal.la.SOURCES += $(patsubst src/libsystemd/%,%,$(filter %.c,$(_libsystemd_internal_la_SOURCES))) -libsystemd-internal.la.SOURCES += $(addprefix sd-journal/,$(notdir $(filter %.c,$(_libsystemd_journal_internal_la_SOURCES)))) -libsystemd-internal.la.DEPENDS = $(addprefix $(outdir)/,$(libsystemd-internal.la.SOURCES:.c=.lo)) -nested.subdirs += $(sort $(dir $(libsystemd-internal.la.SOURCES))) +# Hook into the `am` module +libsystemd_internal_la_CFLAGS += $(libsystemd_journal_internal_la_CFLAGS) +libsystemd_internal_la_LIBADD += $(libsystemd_journal_internal_la_LIBADD) + +# Don't bother trying to hook into the `am` module for the sources; the only +# thing it adds over declaring the dependencies is adding the appropriate +# directories to am.subdirs=>at.subdirs; but we can do that here just as easily +# with nested.subdirs. +sd.libsystemd_SOURCES = +sd.libsystemd_SOURCES += $(patsubst src/libsystemd/%,%,$(filter %.c,$(_libsystemd_internal_la_SOURCES))) +sd.libsystemd_SOURCES += $(addprefix sd-journal/,$(notdir $(filter %.c,$(_libsystemd_journal_internal_la_SOURCES)))) +$(outdir)/libsystemd-internal.la: $(addprefix $(outdir)/,$(sd.libsystemd_SOURCES:.c=.lo)) +nested.subdirs += $(sort $(dir $(sd.libsystemd_SOURCES))) include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/src/sd-journal/Makefile b/src/libsystemd/src/sd-journal/Makefile index c9d5c3dcd8..f13c2b51fa 100644 --- a/src/libsystemd/src/sd-journal/Makefile +++ b/src/libsystemd/src/sd-journal/Makefile @@ -29,11 +29,14 @@ audit_list_includes += -include libaudit.h endif # HAVE_AUDIT $(outdir)/audit_type-list.txt: $(call at.path,$(topsrcdir)/src/libbasic/include/basic/missing.h) - $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM $(audit_list_includes) - $@ + $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM $(audit_list_includes) - $@ $(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@ +# fsprg.c is a drop-in file using void pointer arithmetic +$(outdir)/fsprg.lo: sd.ALL_CFLAGS += -Wno-pointer-arith + sd.CPPFLAGS += $(libbasic.CPPFLAGS) sd.CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" $(outdir)/audit-type.lo: $(outdir)/audit_type-to-name.h diff --git a/src/libsystemd/src/test.mk b/src/libsystemd/src/test.mk new file mode 100644 index 0000000000..0290b33f6b --- /dev/null +++ b/src/libsystemd/src/test.mk @@ -0,0 +1,152 @@ +# -*- 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 . + +test_bus_marshal_SOURCES = \ + src/libsystemd/sd-bus/test-bus-marshal.c + +test_bus_marshal_LDADD = \ + libshared.la \ + $(GLIB_LIBS) \ + $(DBUS_LIBS) + +test_bus_marshal_CFLAGS = \ + $(AM_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) + +test_bus_signature_SOURCES = \ + src/libsystemd/sd-bus/test-bus-signature.c + +test_bus_signature_LDADD = \ + libshared.la + +test_bus_chat_SOURCES = \ + src/libsystemd/sd-bus/test-bus-chat.c + +test_bus_chat_LDADD = \ + libshared.la + +test_bus_cleanup_SOURCES = \ + src/libsystemd/sd-bus/test-bus-cleanup.c + +test_bus_cleanup_CFLAGS = \ + $(AM_CFLAGS) \ + $(SECCOMP_CFLAGS) + +test_bus_cleanup_LDADD = \ + libshared.la + +test_bus_server_SOURCES = \ + src/libsystemd/sd-bus/test-bus-server.c + +test_bus_server_LDADD = \ + libshared.la + +test_bus_objects_SOURCES = \ + src/libsystemd/sd-bus/test-bus-objects.c + +test_bus_objects_LDADD = \ + libshared.la + +test_bus_error_SOURCES = \ + src/libsystemd/sd-bus/test-bus-error.c + +test_bus_error_LDADD = \ + libshared.la + +test_bus_gvariant_SOURCES = \ + src/libsystemd/sd-bus/test-bus-gvariant.c + +test_bus_gvariant_LDADD = \ + libshared.la \ + $(GLIB_LIBS) + +test_bus_gvariant_CFLAGS = \ + $(AM_CFLAGS) \ + $(GLIB_CFLAGS) + +test_bus_creds_SOURCES = \ + src/libsystemd/sd-bus/test-bus-creds.c + +test_bus_creds_LDADD = \ + libshared.la + +test_bus_match_SOURCES = \ + src/libsystemd/sd-bus/test-bus-match.c + +test_bus_match_LDADD = \ + libshared.la + +test_bus_kernel_SOURCES = \ + src/libsystemd/sd-bus/test-bus-kernel.c + +test_bus_kernel_LDADD = \ + libshared.la + +test_bus_kernel_bloom_SOURCES = \ + src/libsystemd/sd-bus/test-bus-kernel-bloom.c + +test_bus_kernel_bloom_LDADD = \ + libshared.la + +test_bus_benchmark_SOURCES = \ + src/libsystemd/sd-bus/test-bus-benchmark.c + +test_bus_benchmark_LDADD = \ + libshared.la + +test_bus_zero_copy_SOURCES = \ + src/libsystemd/sd-bus/test-bus-zero-copy.c + +test_bus_zero_copy_LDADD = \ + libshared.la + +test_bus_introspect_SOURCES = \ + src/libsystemd/sd-bus/test-bus-introspect.c + +test_bus_introspect_LDADD = \ + libshared.la + +test_event_SOURCES = \ + src/libsystemd/sd-event/test-event.c + +test_event_LDADD = \ + libshared.la + +test_netlink_SOURCES = \ + src/libsystemd/sd-netlink/test-netlink.c + +test_netlink_LDADD = \ + libshared.la + +test_local_addresses_SOURCES = \ + src/libsystemd/sd-netlink/test-local-addresses.c + +test_local_addresses_LDADD = \ + libshared.la + +test_resolve_SOURCES = \ + src/libsystemd/sd-resolve/test-resolve.c + +test_resolve_LDADD = \ + libshared.la diff --git a/src/libudev/Makefile b/src/libudev/Makefile index 2601837e3a..b4c91d1738 100644 --- a/src/libudev/Makefile +++ b/src/libudev/Makefile @@ -38,6 +38,8 @@ libudev_la_LDFLAGS = \ -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \ -Wl,--version-script=$(srcdir)/libudev.sym +libudev_la_LIBADD += $(libudev-internal.DEPENDS) + pkgconfiglib_DATA += \ src/libudev/libudev.pc @@ -45,9 +47,7 @@ EXTRA_DIST += \ src/libudev/libudev.pc.in $(outdir)/test-libudev-sym.c: \ - $(srcdir)/libudev.sym \ $(srcdir)/udev.h - $(generate-sym-test) nodist_test_libudev_sym_SOURCES = \ test-libudev-sym.c diff --git a/src/nss-myhostname/Makefile b/src/nss-myhostname/Makefile index 201dbde20a..b5f6ff62aa 100644 --- a/src/nss-myhostname/Makefile +++ b/src/nss-myhostname/Makefile @@ -44,6 +44,4 @@ lib_LTLIBRARIES += \ libnss_myhostname.la endif # HAVE_MYHOSTNAME -libnss_myhostname_la_LIBADD += libshared.la # oops, because I moved local-addresses.{c,h} into libshared - include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/tools/move.sh b/tools/move.sh index 4b55c869ec..06c4e7f5cf 100755 --- a/tools/move.sh +++ b/tools/move.sh @@ -337,7 +337,7 @@ fixup_makefiles() ( -e '/^ \$\(AM_V_at\)\$\(MKDIR_P\) \$\(dir \$@\)/d' \ -e 's/ \$\(CFLAGS\) / /g' \ -e 's/ \$\(CPPFLAGS\) / /g' \ - -e 's/ \$\(AM_CPPFLAGS\) / $(ALL_CPPFLAGS) /g' \ + -e 's/ \$\(AM_CPPFLAGS\) / $(sd.ALL_CPPFLAGS) /g' \ -e '/^[^# ]*:/ { s|\S+/|$(outdir)/|g }' \ src/libbasic/include/basic/Makefile \ src/libsystemd/src/Makefile \ -- cgit v1.2.3-54-g00ecf