summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-07 02:38:08 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-07 02:38:08 -0400
commitd10902f55ae7aed2eeffedcd29d8ced80ec903ba (patch)
tree135c72aaa9c1a1fc73ff4a6ea0fdd89cb1f59ba1 /build-aux
parente7af93b77b33c6cb9241d5c72283357682394a96 (diff)
Makefile tidy
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/Makefile.each.tail/30-automake2autothing.mk27
-rw-r--r--build-aux/Makefile.each.tail/30-directory-info.mk (renamed from build-aux/Makefile.each.tail/30-module.mk)0
-rw-r--r--build-aux/Makefile.once.head/20-systemd.mk49
-rw-r--r--build-aux/Makefile.once.head/30-automake2autothing.mk9
4 files changed, 41 insertions, 44 deletions
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-module.mk b/build-aux/Makefile.each.tail/30-directory-info.mk
index 10ebc4c1de..10ebc4c1de 100644
--- a/build-aux/Makefile.each.tail/30-module.mk
+++ b/build-aux/Makefile.each.tail/30-directory-info.mk
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 $(<D),-I$(<D)) -I$(@D)
-at.dirlocal += AM_CFLAGS AM_CPPFLAGS AM_LDFLAGS AM_LIBTOOLFLAGS
-ALL_CFLAGS = $(OUR_CFLAGS) $(AM_CFLAGS/$(@D)) $(CFLAGS)
-ALL_CPPFLAGS = $(OUR_CPPFLAGS) $(AM_CPPFLAGS/$(@D)) $(CPPFLAGS)
-ALL_LDFLAGS = $(OUR_LDFLAGS) $(AM_LDFLAGS/$(@D)) $(LDFLAGS)
-ALL_LIBTOOLFLAGS = $(OUR_LIBTOOLFLAGS) $(AM_LIBTOOLFLAGS/$(@D)) $(LIBTOOLFLAGS)
+at.dirlocal += systemd.CFLAGS systemd.CPPFLAGS systemd.LDFLAGS systemd.LIBTOOLFLAGS
+ALL_CFLAGS = $(OUR_CFLAGS) $(am.CFLAGS/$(@D)) $(systemd.CFLAGS/$(@D)) $(CFLAGS)
+ALL_CPPFLAGS = $(OUR_CPPFLAGS) $(am.CPPFLAGS/$(@D)) $(systemd.CPPFLAGS/$(@D)) $(CPPFLAGS)
+ALL_LDFLAGS = $(OUR_LDFLAGS) $(am.LDFLAGS/$(@D)) $(systemd.LDFLAGS/$(@D)) $(LDFLAGS)
+ALL_LIBTOOLFLAGS = $(OUR_LIBTOOLFLAGS) $(am.LIBTOOLFLAGS/$(@D)) $(systemd.LIBTOOLFLAGS/$(@D)) $(LIBTOOLFLAGS)
COMPILE = $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=compile $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS)
@@ -192,42 +192,3 @@ define generate-sym-test
endef
at.dirlocal += systemd.sed_files
-
-at.dirlocal += noinst_LTLIBRARIES lib_LTLIBRARIES
-at.dirlocal += bin_PROGRAMS libexec_PROGRAMS
-at.dirlocal += pkgconfiglib_DATA
-automake_name = $(subst -,_,$(subst .,_,$1))
-automake_sources = $(addprefix $(outdir)/,$(notdir $($(automake_name)_SOURCES) $(nodist_$(automake_name)_SOURCES)))
-automake_lo = $(patsubst %.c,%.lo,$(filter %.c,$(automake_sources)))
-automake_o = $(patsubst %.c,%.o,$(filter %.c,$(automake_sources)))
-automake_libs = $($(automake_name)_LIBADD) $($(automake_name)_LDADD)
-
-define automake2autothing
-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) ))
-endef
diff --git a/build-aux/Makefile.once.head/30-automake2autothing.mk b/build-aux/Makefile.once.head/30-automake2autothing.mk
new file mode 100644
index 0000000000..a1df4e2518
--- /dev/null
+++ b/build-aux/Makefile.once.head/30-automake2autothing.mk
@@ -0,0 +1,9 @@
+at.dirlocal += am.CFLAGS am.CPPFLAGS am.LDFLAGS am.LIBTOOLFLAGS
+at.dirlocal += noinst_LTLIBRARIES lib_LTLIBRARIES
+at.dirlocal += bin_PROGRAMS libexec_PROGRAMS
+at.dirlocal += pkgconfiglib_DATA
+automake_name = $(subst -,_,$(subst .,_,$1))
+automake_sources = $(addprefix $(outdir)/,$(notdir $($(automake_name)_SOURCES) $(nodist_$(automake_name)_SOURCES)))
+automake_lo = $(patsubst %.c,%.lo,$(filter %.c,$(automake_sources)))
+automake_o = $(patsubst %.c,%.o,$(filter %.c,$(automake_sources)))
+automake_libs = $($(automake_name)_LIBADD) $($(automake_name)_LDADD)