From 30e337e22d0bbf25150d8a795f6e41d17edb2a74 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 13 Jun 2016 12:59:39 -0400 Subject: more --- build-aux/Makefile.each.tail/20-systemd.mk | 2 +- build-aux/Makefile.each.tail/30-automake2autothing.mk | 11 +++++++---- build-aux/Makefile.once.head/30-automake2autothing.mk | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'build-aux') 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))) -- cgit v1.2.3-54-g00ecf