aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2008-01-30 00:24:16 +0000
committerRoland McGrath <roland@gnu.org>2008-01-30 00:24:16 +0000
commit16cd816fd04bd3982c5333c2df76c88e39031522 (patch)
treeb5f21deb153bc5f4e60aa1bc235b9d123d121543 /Makerules
parentf641ffccd8cdad83f403fe44e14ab0748c8bb39a (diff)
downloadglibc-16cd816fd04bd3982c5333c2df76c88e39031522.tar
glibc-16cd816fd04bd3982c5333c2df76c88e39031522.tar.gz
glibc-16cd816fd04bd3982c5333c2df76c88e39031522.tar.bz2
glibc-16cd816fd04bd3982c5333c2df76c88e39031522.zip
* Makeconfig (sysd-rules-patterns): New variable.
* Makerules ($(common-objpfx)sysd-rules): Drive the loop from that. (check-inhibit-asm): New canned sequence, replaces ... (open-check-inhibit-asm, close-check-inhibit-asm): ... these, removed. * elf/rtld-Rules ($(objpfx)rtld-%.os): Use $(rtld-CPPFLAGS) in commands. (rtld-CPPFLAGS): Renamed from CPPFLAGS-rtld. (CFLAGS-rtld): Variable removed.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules53
1 files changed, 19 insertions, 34 deletions
diff --git a/Makerules b/Makerules
index db83b24ffe..3661ad4e9d 100644
--- a/Makerules
+++ b/Makerules
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1991-2006, 2007, 2008 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -207,10 +207,9 @@ endif
# patterns matching sysdep directories whose assembly source files should
# be suppressed.
ifdef inhibit-sysdep-asm
-define open-check-inhibit-asm
-case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) : ;; *)
+define check-inhibit-asm
+case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) asm= ;; esac;
endef
-close-check-inhibit-asm = ;; esac ;
endif
-include $(common-objpfx)sysd-rules
@@ -229,36 +228,22 @@ $(common-objpfx)sysd-rules: $(common-objpfx)config.make $(..)Makerules \
/*) ;; \
*) dir="\$$(..)$$dir" ;; \
esac; \
- for o in $(all-object-suffixes); do \
- $(open-check-inhibit-asm) \
- echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
- \$$(compile-command.S)"; \
- echo "\$$(objpfx)%$$o: $$dir/%.s \$$(before-compile); \
- \$$(compile-command.s)"; \
- echo "\$$(objpfx)rtld-%$$o: $$dir/%.S \$$(before-compile); \
- \$$(compile-command.S)"; \
- echo "\$$(objpfx)rtld-%$$o: $$dir/%.s \$$(before-compile); \
- \$$(compile-command.s)"; \
- echo "\$$(objpfx)ptw-%$$o: $$dir/%.S \$$(before-compile); \
- \$$(compile-command.S) -DPTW"; \
- echo "\$$(objpfx)ptw-%$$o: $$dir/%.s \$$(before-compile); \
- \$$(compile-command.s) -DPTW"; \
- echo "\$$(objpfx)m_%$$o: $$dir/s_%.S \$$(before-compile); \
- \$$(compile-command.S)"; \
- echo "\$$(objpfx)m_%$$o: $$dir/s_%.s \$$(before-compile); \
- \$$(compile-command.s)"; \
- $(close-check-inhibit-asm) \
- echo "\$$(objpfx)%$$o: $$dir/%.c \$$(before-compile); \
- \$$(compile-command.c)"; \
- echo "\$$(objpfx)rtld-%$$o: $$dir/%.c \$$(before-compile); \
- \$$(compile-command.c)"; \
- echo "\$$(objpfx)ptw-%$$o: $$dir/%.c \$$(before-compile); \
- \$$(compile-command.c) -DPTW"; \
- echo "\$$(objpfx)m_%$$o: $$dir/s_%.c \$$(before-compile); \
- \$$(compile-command.c)"; \
- done; \
- echo "\$$(inst_includedir)/%.h: $$dir/%.h \$$(+force); \
- \$$(do-install)"; \
+ asm='.S .s'; \
+ $(check-inhibit-asm) \
+ for o in $(all-object-suffixes); do \
+ set $(subst :, ,$(sysd-rules-patterns)); \
+ while [ $$# -ge 2 ]; do \
+ t=$$1; shift; \
+ d=$$1; shift; \
+ v=$${t%%%}; [ x"$$v" = x ] || v="\$$($${v}CPPFLAGS)"; \
+ for s in $$asm .c; do \
+ echo "\$$(objpfx)$$t$$o: $$dir/$$d$$s \$$(before-compile)"; \
+ echo " \$$(compile-command$$s) $$v"; \
+ done; \
+ done; \
+ done; \
+ echo "\$$(inst_includedir)/%.h: $$dir/%.h \$$(+force)"; \
+ echo " \$$(do-install)"; \
done; \
echo 'sysd-rules-done = t') > $@T
mv -f $@T $@