summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1993-05-20 22:33:05 +0000
committerRoland McGrath <roland@gnu.org>1993-05-20 22:33:05 +0000
commit65a5193c6185f377ee1548e106b6bed0aae753da (patch)
tree45813a05bb9318f19673995e6b2a41e1618bd4ec /Makefile
parent1e0106ebb3cbe5e5a2e078c7f067bb857f9741f0 (diff)
Formerly Makefile.~71~
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 14 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 7b862c7d35..e88a322915 100644
--- a/Makefile
+++ b/Makefile
@@ -140,14 +140,20 @@ info dvi:
$(MAKE) -C manual $@
# This makes all the subdirectory targets.
-.PHONY: $(+subdir_targets)
-$(+subdir_targets):
- @lose=nil; \
- for dir in $(subdirs); do \
- $(+cmdecho) $(MAKE) -C $$dir $@;\
- $(MAKE) -C $$dir $@ || lose=t; \
- done; \
- test $$lose = nil
+
+# For each target, make it depend on DIR/target for each subdirectory DIR.
+$(+subdir_targets): %: $(addsuffix /%,$(subdirs))
+
+# Compute a list of all those targets.
+all-subdirs-targets := $(foreach dir,$(subdirs),\
+ $(addprefix $(dir)/,$(+subdir_targets)))
+
+# The action for each of those is to cd into the directory and make the
+# target there.
+$(all-subdirs-targets):
+ $(MAKE) -C $(@D) $(@F)
+
+.PHONY: $(+subdir_targets) $(all-subdirs-targets)
# This clobbers everything that can be regenerated.
.PHONY: clean realclean distclean