summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-12 12:25:04 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-12 12:25:04 -0400
commit4cb2380233342aa01fda978be775c9a735fce3a2 (patch)
tree44c0d777b953effee759c1aeb607f17e831a8348 /build-aux
parent16ec24d89c754c376e4420cc37e896c85f8df85e (diff)
fixity
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/Makefile.each.tail/20-systemd.mk1
-rw-r--r--build-aux/Makefile.once.head/20-systemd.mk9
-rw-r--r--build-aux/Makefile.tail.mk7
3 files changed, 8 insertions, 9 deletions
diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk
index 0369b59bcf..a84e4b6ebc 100644
--- a/build-aux/Makefile.each.tail/20-systemd.mk
+++ b/build-aux/Makefile.each.tail/20-systemd.mk
@@ -28,6 +28,7 @@ std.clean_files += *-list.txt
std.clean_files += *-from-name.gperf
std.clean_files += *-from-name.h
std.clean_files += *-to-name.h
+std.clean_files += *-gperf.c
$(outdir)/%.o : $(srcdir)/%.c $(topoutdir)/config.h | $(outdir)/.deps; $(AM_V_CC)$(COMPILE) -c -o $@ $<
$(outdir)/%.o : $(outdir)/%.c $(topoutdir)/config.h | $(outdir)/.deps; $(AM_V_CC)$(COMPILE) -c -o $@ $<
diff --git a/build-aux/Makefile.once.head/20-systemd.mk b/build-aux/Makefile.once.head/20-systemd.mk
index 9939919f5e..75c35b6f4d 100644
--- a/build-aux/Makefile.once.head/20-systemd.mk
+++ b/build-aux/Makefile.once.head/20-systemd.mk
@@ -25,7 +25,9 @@ SHELL = bash -o pipefail
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)
+OUR_CPPFLAGS += $(sort $(if $(<D),-I$(<D)) \
+ $(if $(filter $(abspath $(topoutdir))/%,$(abspath $<)),-I$(call at.path,$(dir $(patsubst $(abspath $(topoutdir))/%,$(abspath $(topsrcdir))/%,$(abspath $<))))) \
+ -I$(@D) )
at.dirlocal += systemd.CFLAGS systemd.CPPFLAGS systemd.LDFLAGS systemd.LIBTOOLFLAGS
ALL_CFLAGS = $(OUR_CFLAGS) $(am.CFLAGS/$(@D)) $(systemd.CFLAGS/$(@D)) $(CFLAGS)
@@ -37,11 +39,6 @@ COMPILE = $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=compile $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=link $(CCLD) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@
-SED_PROCESS = \
- $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
- $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
- < $< > $@
-
# remove targets if the command fails
.DELETE_ON_ERROR:
diff --git a/build-aux/Makefile.tail.mk b/build-aux/Makefile.tail.mk
index be3a8c2de0..38f40c2e6a 100644
--- a/build-aux/Makefile.tail.mk
+++ b/build-aux/Makefile.tail.mk
@@ -17,13 +17,14 @@
include $(call _at.reverse,$(sort $(wildcard $(topsrcdir)/build-aux/Makefile.each.tail/*.mk)))
-at.subdirs := $(call at.addprefix,$(outdir)/,$(at.subdirs))
-at.depdirs := $(call at.addprefix,$(outdir)/,$(at.depdirs))
-
# Move all of the dirlocal variables to their namespaced version
$(foreach v,$(at.dirlocal),$(eval $v/$(outdir) := $$($v)))
$(foreach v,$(at.dirlocal),$(eval undefine $v))
+# Adjust subdirs and depdirs to be relative to $(outdir)
+at.subdirs/$(outdir) := $(sort $(patsubst %/,%,$(call at.addprefix,$(outdir)/,$(at.subdirs/$(outdir)))))
+at.depdirs/$(outdir) := $(sort $(patsubst %/,%,$(call at.addprefix,$(outdir)/,$(at.depdirs/$(outdir)))))
+
# Remember that this is a directory that we've visited
_at.outdirs := $(_at.outdirs) $(outdir)