summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-13 12:59:39 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-13 12:59:39 -0400
commit30e337e22d0bbf25150d8a795f6e41d17edb2a74 (patch)
tree247aa2942841894e6df8245d04b0e483cf1ee5bd /build-aux
parent9ef8b774c00a2ac078db4310a6b279e93c248253 (diff)
more
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/Makefile.each.tail/20-systemd.mk2
-rw-r--r--build-aux/Makefile.each.tail/30-automake2autothing.mk11
-rw-r--r--build-aux/Makefile.once.head/30-automake2autothing.mk3
3 files changed, 10 insertions, 6 deletions
diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk
index 4f82baed90..dfb8fa5b06 100644
--- a/build-aux/Makefile.each.tail/20-systemd.mk
+++ b/build-aux/Makefile.each.tail/20-systemd.mk
@@ -48,7 +48,7 @@ _systemd.link_files = $(call _systemd.lt_filter,$(filter %.o %.lo %.la,$^)) $(ca
$(outdir)/%.la:
@if test $(words $^) = 0; then echo 'Cannot link library with no dependencies: $@' >&2; exit 1; fi
$(AM_V_CCLD)$(LINK) $(if $(_systemd.rpath),-rpath $(_systemd.rpath)) $(_systemd.link_files)
-$(addprefix $(outdir)/,$(bin_PROGRAMS) $(libexec_PROGRAMS)): $(outdir)/%:
+$(addprefix $(outdir)/,$(foreach d,$(am.bindirs),$($d_PROGRAMS))): $(outdir)/%:
@if test $(words $^) = 0; then echo 'Cannot link executable with no dependencies: $@' >&2; exit 1; fi
$(AM_V_CCLD)$(LINK) $(_systemd.link_files)
diff --git a/build-aux/Makefile.each.tail/30-automake2autothing.mk b/build-aux/Makefile.each.tail/30-automake2autothing.mk
index 3c8918aa7a..a74e247339 100644
--- a/build-aux/Makefile.each.tail/30-automake2autothing.mk
+++ b/build-aux/Makefile.each.tail/30-automake2autothing.mk
@@ -1,9 +1,12 @@
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))
+_programs =
+$(foreach d,$(am.bindirs), \
+ $(eval _programs += $($d_PROGRAMS) )\
+ $(eval std.sys_files += $(addprefix $($(d)dir)/,$($d_PROGRAMS)) ))
+std.out_files += $(_programs)
+# TODO: noinst_PROGRAMS (test)
std.out_files += $(notdir $(pkgconfiglib_DATA))
std.sys_files += $(addprefix $(pkgconfiglibdir)/,$(notdir $(pkgconfiglib_DATA)))
@@ -23,7 +26,7 @@ $(foreach t,$(filter %.la,$(std.out_files)),
$(eval $t: private ALL_LDFLAGS += $($(call automake_name,$t)_LDFLAGS) )\
$(eval $(outdir)/$t: $($t.DEPENDS) )\
$(eval at.depdirs += $(abspath $(sort $(dir $(filter-out -l% /%,$($t.DEPENDS))))) ))
-$(foreach t,$(bin_PROGRAMS) $(libexec_PROGRAMS), \
+$(foreach t,$(_programs), \
$(eval $t.DEPENDS += $(call at.path,$(call automake_o,$t) $(call automake_lib,$t,LDADD)) )\
$(eval am.CPPFLAGS += $($(call automake_name,$t)_CPPFLAGS) $(call automake_cpp,$t,LDADD) )\
$(eval am.CFLAGS += $($(call automake_name,$t)_CFLAGS) )\
diff --git a/build-aux/Makefile.once.head/30-automake2autothing.mk b/build-aux/Makefile.once.head/30-automake2autothing.mk
index 9b05224d1c..529cc97326 100644
--- a/build-aux/Makefile.once.head/30-automake2autothing.mk
+++ b/build-aux/Makefile.once.head/30-automake2autothing.mk
@@ -1,6 +1,7 @@
+am.bindirs = bin rootbin libexec rootlibexec systemgenerator udevlibexec
at.dirlocal += am.CFLAGS am.CPPFLAGS am.LDFLAGS am.LIBTOOLFLAGS
at.dirlocal += noinst_LTLIBRARIES lib_LTLIBRARIES
-at.dirlocal += bin_PROGRAMS libexec_PROGRAMS
+at.dirlocal += $(addsuffix _PROGRAMS,$(am.bindirs))
at.dirlocal += pkgconfiglib_DATA
automake_name = $(subst -,_,$(subst .,_,$1))
automake_sources = $(addprefix $(outdir)/,$(notdir $($(automake_name)_SOURCES) $(nodist_$(automake_name)_SOURCES)))