aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-29 01:29:24 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-29 01:29:24 +0000
commitd2b9a50e60ddfcf8ac94abd29e7a0c286186bdc3 (patch)
tree9f9fd2aa1787eff81849fb9aa67bc89c6db4358a /Makerules
parentUpdate. (diff)
downloadglibc-d2b9a50e60ddfcf8ac94abd29e7a0c286186bdc3.tar.gz
glibc-d2b9a50e60ddfcf8ac94abd29e7a0c286186bdc3.tar.bz2
glibc-d2b9a50e60ddfcf8ac94abd29e7a0c286186bdc3.zip
Update.
* Makerules: If make variable md5 is defined to yes after generating dependencies generate MD5 sum for the object.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makerules b/Makerules
index 6f5e43320c..28fc884cba 100644
--- a/Makerules
+++ b/Makerules
@@ -337,6 +337,15 @@ COMPILE.S = \
$(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
+# If we want to generate MD% checksums for the sources do this now.
+ifeq ($(md5),yes)
+generate-md5 = ; rm -f $(@:.d=.md5); \
+$(CC) -E $< $(CFLAGS) $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \
+sed '/^\#/d;/^[[:space:]]*$$/d' | md5sum > $(@:.d=.md5)
+else
+generate-md5 =
+endif
+
# We need this for the output to go in the right place. It will default to
# empty if make was configured to work with a cc that can't grok -c and -o
# together. You can't compile the C library with such a compiler.
@@ -350,7 +359,7 @@ $(+mkdep) $< $(CFLAGS) $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \
sed \
-e 's,$(subst .,\.,$*)\.o,$(foreach o,$(all-object-suffixes),$(@:.d=$o)) $@,' \
$(sed-remove-objpfx) > $(@:.d=.T)
-mv -f $(@:.d=.T) $@
+mv -f $(@:.d=.T) $@ $(generate-md5)
endef
ifneq (,$(objpfx))
# Continuation lines here are dangerous because they introduce spaces!