aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-01-15 20:24:04 +0000
committerRoland McGrath <roland@gnu.org>2003-01-15 20:24:04 +0000
commit0e56981e1660c37d32ca15dafa15e1cbe119b0ef (patch)
tree3bac7021c59adb6ac8e4e9816c257d9ecea4c6d3 /Makerules
parentd439762939d51c4a35b3b44d77a57aa545452af7 (diff)
downloadglibc-0e56981e1660c37d32ca15dafa15e1cbe119b0ef.tar
glibc-0e56981e1660c37d32ca15dafa15e1cbe119b0ef.tar.gz
glibc-0e56981e1660c37d32ca15dafa15e1cbe119b0ef.tar.bz2
glibc-0e56981e1660c37d32ca15dafa15e1cbe119b0ef.zip
2003-01-15 Roland McGrath <roland@redhat.com>
* Makerules: Use -include for tls.make, suppresses warning. Move gen-as-const-headers rules up so before-compile is set in time. (sed-remove-dotdot): Fix to work right for subdirs or top dir.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules47
1 files changed, 25 insertions, 22 deletions
diff --git a/Makerules b/Makerules
index 97c20fd9dd..e2f7f22a4b 100644
--- a/Makerules
+++ b/Makerules
@@ -125,6 +125,25 @@ $(common-objpfx)%.latest: $(common-objpfx)abi-versions.h
endif # avoid-generated
endif # $(versioning) = yes
+
+# Generating headers for assembly constants.
+# We need this defined early to get into before-compile before
+# it's used in sysd-rules, below.
+$(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.awk \
+ %.sym $(before-compile)
+ $(AWK) -f $< $(filter %.sym,$^) \
+ | $(CC) -S -o - $(CFLAGS) $(CPPFLAGS) -x c - \
+ -MD -MF $(@:.h=.h.d)T -MT '$(@:.h=.h.d) $(@:.h.d=.h)' \
+ | sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$$/#define \1 \2/p' > $(@:.h.d=.h)T
+ sed $(sed-remove-objpfx) $(sed-remove-dotdot) \
+ $(@:.h=.h.d)T > $(@:.h=.h.d)T2
+ rm -f $(@:.h=.h.d)T
+ mv -f $(@:.h=.h.d)T2 $(@:.h=.h.d)
+ mv -f $(@:.h.d=.h)T $(@:.h.d=.h)
+vpath %.sym $(sysdirs)
+before-compile += $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
+
+
# When we have no deps pass doing it, then make sure the subdirectory
# for object files gets created.
ifdef no_deps
@@ -162,8 +181,11 @@ $(common-objpfx)%.make: $(..)%.make.c $(..)Makerules $(before-compile)
rm -f $@.dT) > $@T
mv -f $@T $@
-sed-remove-dotdot := -e 's@ *\([^ \/$$][^ \]*\)@ $$(..)\1@g' \
- -e 's@ *\.\.\/\([^ \]*\)@ $$(..)\1@g'
+ifdef subdir
+sed-remove-dotdot := -e 's@ *\.\.\/\([^ \]*\)@ $$(..)\1@g'
+else
+sed-remove-dotdot := -e 's@ *\([^ \/$$][^ \]*\)@ $$(..)\1@g'
+endif
# Generate an ordered list of implicit rules which find the source files in
# each sysdep directory. The old method was to use vpath to search all the
@@ -1160,7 +1182,7 @@ define check-abi
endef
ifeq ($(sysd-sorted-done),t)
-include $(common-objpfx)tls.make
+-include $(common-objpfx)tls.make
config-tls-yes := tls
config-tls-no := notls
check-abi-config := \
@@ -1212,25 +1234,6 @@ endif
endif
-# Generating headers for assembly constants.
-$(common-objpfx)%.h $(common-objpfx)%.h.d: $(..)scripts/gen-as-const.awk \
- %.sym $(before-compile)
- $(AWK) -f $< $(filter %.sym,$^) \
- | $(CC) -S -o - $(CFLAGS) $(CPPFLAGS) -x c - \
- -MD -MF $(@:.h=.h.d)T -MT '$(@:.h=.h.d) $(@:.h.d=.h)' \
- | sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$$/#define \1 \2/p' > $(@:.h.d=.h)T
- sed $(sed-remove-objpfx) $(sed-remove-dotdot) \
- $(@:.h=.h.d)T > $(@:.h=.h.d)T2
- rm -f $(@:.h=.h.d)T
- mv -f $(@:.h=.h.d)T2 $(@:.h=.h.d)
- mv -f $(@:.h.d=.h)T $(@:.h.d=.h)
-vpath %.sym $(sysdirs)
-
-ifeq (,$(wildcard $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)))
-before-compile += $(gen-as-const-headers:%.sym=$(common-objpfx)%.h)
-endif
-
-
# There's no good place to put this - here will do.
# The dependencies are wrong if it's run from the top level.
ifeq ($(filter %posix, $(sysdirs)),)