From d10902f55ae7aed2eeffedcd29d8ced80ec903ba Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 7 Jun 2016 02:38:08 -0400 Subject: Makefile tidy --- .../Makefile.each.tail/30-automake2autothing.mk | 27 ++++++++++++ build-aux/Makefile.each.tail/30-directory-info.mk | 4 ++ build-aux/Makefile.each.tail/30-module.mk | 4 -- build-aux/Makefile.once.head/20-systemd.mk | 49 +++------------------- .../Makefile.once.head/30-automake2autothing.mk | 9 ++++ src/busctl/Makefile | 6 +-- src/grp-boot/bootctl/Makefile | 4 +- src/grp-coredump/coredumpctl/Makefile | 6 +-- src/grp-coredump/systemd-coredump/Makefile | 10 ++--- src/grp-machine/libmachine-core/Makefile | 8 ++-- src/grp-machine/nss-mymachines/Makefile | 4 +- src/libfirewall/Makefile | 3 +- src/libshared/Makefile | 32 +++++++------- src/libsystemd/libsystemd-internal/Makefile | 10 ++--- src/libsystemd/libsystemd-internal/subdir.mk | 10 ++--- .../libsystemd-journal-internal/Makefile | 5 +-- src/libudev/src/Makefile | 10 ++--- src/systemd-nspawn/Makefile | 12 +++--- src/udev/Makefile | 3 +- 19 files changed, 105 insertions(+), 111 deletions(-) create mode 100644 build-aux/Makefile.each.tail/30-automake2autothing.mk create mode 100644 build-aux/Makefile.each.tail/30-directory-info.mk delete mode 100644 build-aux/Makefile.each.tail/30-module.mk create mode 100644 build-aux/Makefile.once.head/30-automake2autothing.mk diff --git a/build-aux/Makefile.each.tail/30-automake2autothing.mk b/build-aux/Makefile.each.tail/30-automake2autothing.mk new file mode 100644 index 0000000000..77320da714 --- /dev/null +++ b/build-aux/Makefile.each.tail/30-automake2autothing.mk @@ -0,0 +1,27 @@ +std.out_files += $(noinst_LTLIBRARIES) $(lib_LTLIBRARIES) +std.sys_files += $(addprefix $(libdir)/,$(lib_LTLIBRARIES)) + +std.out_files += $(bin_PROGRAMS) $(libexec_PROGRAMS) +std.sys_files += $(addprefix $(bindir)/,$(bin_PROGRAMS)) +std.sys_files += $(addprefix $(libexecdir)/,$(libexec_PROGRAMS)) + +std.out_files += $(notdir $(pkgconfiglib_DATA)) +std.sys_files += $(addprefix $(pkgconfiglibdir)/,$(notdir $(lib_pkgconfiglib_DATA))) + +$(foreach n,$(call automake_name,$(std.out_files)),\ + $(eval $n_SOURCES ?=)\ + $(eval nodist_$n_SOURCES ?=)\ + $(eval $n_CFLAGS ?=)\ + $(eval $n_CPPFLAGS ?=)\ + $(eval $n_LDFLAGS ?=)\ + $(eval $n_LIBADD ?=)) +$(foreach t,$(filter %.la,$(std.out_files)),\ + $(eval $(outdir)/$t: $(call at.path,$(call automake_lo,$t) $(call automake_libs,$t)) )\ + $(eval am.CFLAGS += $($(call automake_name,$t)_CFLAGS) )\ + $(eval am.CPPFLAGS += $($(call automake_name,$t)_CPPFLAGS) )\ + $(eval am.LDFLAGS += $($(call automake_name,$t)_LDFLAGS) )) +$(foreach t,$(bin_PROGRAMS) $(libexec_PROGRAMS),\ + $(eval $(outdir)/$t: $(call at.path,$(call automake_o,$t) $(call automake_libs,$t)) )\ + $(eval am.CFLAGS += $($(call automake_name,$t)_CFLAGS) )\ + $(eval am.CPPFLAGS += $($(call automake_name,$t)_CPPFLAGS) )\ + $(eval am.LDFLAGS += $($(call automake_name,$t)_LDFLAGS) )) diff --git a/build-aux/Makefile.each.tail/30-directory-info.mk b/build-aux/Makefile.each.tail/30-directory-info.mk new file mode 100644 index 0000000000..10ebc4c1de --- /dev/null +++ b/build-aux/Makefile.each.tail/30-directory-info.mk @@ -0,0 +1,4 @@ +dir_variables = $(foreach v,$(filter-out _%,$(patsubst %/$(@D),%,$(filter %/$(@D),$(.VARIABLES)))),$(if $(findstring /,$v),, $v)) +$(outdir)/directory-info: + $(AM_V_at)printf '%s = %s\n' $(foreach v,$(dir_variables),'$v' '$($v/$(@D))') | sort | column -s= -o= -t +.PHONY: $(outdir)/module-info diff --git a/build-aux/Makefile.each.tail/30-module.mk b/build-aux/Makefile.each.tail/30-module.mk deleted file mode 100644 index 10ebc4c1de..0000000000 --- a/build-aux/Makefile.each.tail/30-module.mk +++ /dev/null @@ -1,4 +0,0 @@ -dir_variables = $(foreach v,$(filter-out _%,$(patsubst %/$(@D),%,$(filter %/$(@D),$(.VARIABLES)))),$(if $(findstring /,$v),, $v)) -$(outdir)/directory-info: - $(AM_V_at)printf '%s = %s\n' $(foreach v,$(dir_variables),'$v' '$($v/$(@D))') | sort | column -s= -o= -t -.PHONY: $(outdir)/module-info diff --git a/build-aux/Makefile.once.head/20-systemd.mk b/build-aux/Makefile.once.head/20-systemd.mk index 61484c2954..6f9d23dc5a 100644 --- a/build-aux/Makefile.once.head/20-systemd.mk +++ b/build-aux/Makefile.once.head/20-systemd.mk @@ -27,11 +27,11 @@ OUR_CPPFLAGS += -MT $@ -MD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).P$(patsubst OUR_CPPFLAGS += -include $(topoutdir)/config.h OUR_CPPFLAGS += $(if $( $@ + $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@ $(outdir)/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@ -- cgit v1.2.3-54-g00ecf