summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-01 21:36:40 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-01 21:36:40 -0400
commita422a6a26da229bd168815958d55a582188f40bb (patch)
tree85401dc9a385f11009c5cc0733ae5bf8de45a483
parent524d3075ca1e93477deabb95f5c98eaed920de0b (diff)
fix libbasic out of tree build
-rw-r--r--build-aux/Makefile.each.tail/20-systemd.mk4
-rw-r--r--build-aux/Makefile.once.head/20-systemd.mk1
-rw-r--r--config.mk.in4
-rw-r--r--src/libbasic/Makefile4
4 files changed, 7 insertions, 6 deletions
diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk
index 82692ef301..a774fa5424 100644
--- a/build-aux/Makefile.each.tail/20-systemd.mk
+++ b/build-aux/Makefile.each.tail/20-systemd.mk
@@ -40,11 +40,11 @@ $(outdir)/%.la:
$(DESTDIR)$(libdir)/%.so: $(outdir)/%.la
$(LIBTOOL) $(ALL_LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $< $(@D)
-$(outdir)/%-from-name.gperf: $(srcdir)/%-list.txt
+$(outdir)/%-from-name.gperf: $(outdir)/%-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct $(notdir $*)_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
-$(outdir)/%-from-name.h: $(srcdir)/%-from-name.gperf
+$(outdir)/%-from-name.h: $(outdir)/%-from-name.gperf
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
diff --git a/build-aux/Makefile.once.head/20-systemd.mk b/build-aux/Makefile.once.head/20-systemd.mk
index 5dcd4d2e54..eefed97d1e 100644
--- a/build-aux/Makefile.once.head/20-systemd.mk
+++ b/build-aux/Makefile.once.head/20-systemd.mk
@@ -23,6 +23,7 @@
OUR_CPPFLAGS += -MT $@ -MD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).P$(patsubst .%,%,$(suffix $(@F)))
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)
diff --git a/config.mk.in b/config.mk.in
index f94e107c01..b95c1ee8a5 100644
--- a/config.mk.in
+++ b/config.mk.in
@@ -31,8 +31,8 @@ MAKEFLAGS += --warn-undefined-variables
include $(topsrcdir)/build-aux/no-builtin-variables.mk
.LIBPATTERNS = lib%.so lib%.a
-include $(topsrcdir)/gnustandards.mk
-include $(topsrcdir)/autoconf.mk
+include $(topoutdir)/gnustandards.mk
+include $(topoutdir)/autoconf.mk
CCLD = $(CC)
diff --git a/src/libbasic/Makefile b/src/libbasic/Makefile
index 8e76a01c8a..79ec1b26cc 100644
--- a/src/libbasic/Makefile
+++ b/src/libbasic/Makefile
@@ -265,8 +265,8 @@ $(outdir)/arphrd-from-name.gperf: $(outdir)/arphrd-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
-$(outdir)/cap-list.txt:
- $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
+$(outdir)/cap-list.txt: $(srcdir)/missing.h
+ $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include linux/capability.h -include $< - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
$(outdir)/cap-to-name.h: $(outdir)/cap-list.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@