diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-01 17:18:06 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-01 17:18:06 -0400 |
commit | bcf1acd2a33706c296339f5627eb4070fdda2ecd (patch) | |
tree | 2aa7628170b8dfd03305aa9b56d28b0bc202b6bf /build-aux | |
parent | b3390c34179818fe1f5f9848141a3f891aeb45e7 (diff) |
get libbasic to build again
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/Makefile.each.tail/20-systemd.mk | 4 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/20-systemd.mk | 35 | ||||
-rw-r--r-- | build-aux/Makefile.once.tail/20-systemd.mk | 2 |
3 files changed, 30 insertions, 11 deletions
diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk index 8f2f612273..fa0bd9ec2a 100644 --- a/build-aux/Makefile.each.tail/20-systemd.mk +++ b/build-aux/Makefile.each.tail/20-systemd.mk @@ -2,10 +2,10 @@ std.clean_files += *.o *.lo .deps/ .libs/ -$(outdir)/%.o: $(srcdir)/%.c | $(outdir)/.deps +$(outdir)/%.o: $(srcdir)/%.c $(topoutdir)/config.h | $(outdir)/.deps $(AM_V_CC)$(COMPILE) -c -o $@ $< -$(outdir)/%.lo: $(srcdir)/%.c | $(outdir)/.deps +$(outdir)/%.lo: $(srcdir)/%.c $(topoutdir)/config.h | $(outdir)/.deps $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< $(outdir)/.deps: diff --git a/build-aux/Makefile.once.head/20-systemd.mk b/build-aux/Makefile.once.head/20-systemd.mk index 4fd092c3b4..7358649809 100644 --- a/build-aux/Makefile.once.head/20-systemd.mk +++ b/build-aux/Makefile.once.head/20-systemd.mk @@ -21,20 +21,14 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -AM_MAKEFLAGS = --no-print-directory -AUTOMAKE_OPTIONS = color-tests parallel-tests - -GCC_COLORS ?= 'ooh, shiny!' -export GCC_COLORS - -SUBDIRS = . po - OUR_CPPFLAGS += -MT $@ -MD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).P$(patsubst .%,%,$(suffix $(@F))) +OUR_CPPFLAGS += -include $(topoutdir)/config.h +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) COMPILE = $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=compile $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) @@ -131,3 +125,26 @@ define generate-sym-test $(AM_V_at)printf 'unsigned i; for (i=0;i<sizeof(functions)/sizeof(void*);i++) printf("%%p\\n", functions[i]);\n' >> $@ $(AM_V_at)printf 'return 0; }\n' >> $@ endef + +at.dirlocal += noinst_LTLIBRARIES +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) + +define automake2autothing +std.out_files += $(noinst_LTLIBRARIES) +$(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 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) )) +endef diff --git a/build-aux/Makefile.once.tail/20-systemd.mk b/build-aux/Makefile.once.tail/20-systemd.mk index 7e18da1449..ea0e341c2d 100644 --- a/build-aux/Makefile.once.tail/20-systemd.mk +++ b/build-aux/Makefile.once.tail/20-systemd.mk @@ -27,6 +27,8 @@ $(topoutdir)/config.status: $(topsrcdir)/configure cd $(@D) && $(abspath $<) $(addprefix $(topoutdir)/,config.mk automake.mk autoconf.mk gnustandards.mk po/Makefile.in): $(topoutdir)/%: $(topoutdir)/config.status $(topsrcdir)/%.in cd $(topoutdir) && ./config.status --file=$* +$(addprefix $(topoutdir)/,config.h): $(topoutdir)/%: $(topoutdir)/config.status $(topsrcdir)/%.in + cd $(topoutdir) && ./config.status --file=$* # Let's run all tests of the test suite, but under valgrind. Let's # exclude perl/python/shell scripts we have in there |