summaryrefslogtreecommitdiff
path: root/src/backend/common.mk
diff options
context:
space:
mode:
authorPeter Eisentraut2010-11-12 20:15:16 +0000
committerPeter Eisentraut2010-11-12 20:15:16 +0000
commit19e231bbdaef792dce22100012b504e2fb72f971 (patch)
tree011823e7b1b882972eaff7c4f3a6b18571030e4a /src/backend/common.mk
parentd6754f67b08ad6a05640fc5d9d97c6f225512ea0 (diff)
Improved parallel make support
Replace for loops in makefiles with proper dependencies. Parallel make can now span across directories. Also, make -k and make -q work properly. GNU make 3.80 or newer is now required.
Diffstat (limited to 'src/backend/common.mk')
-rw-r--r--src/backend/common.mk6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/backend/common.mk b/src/backend/common.mk
index 5ba8822b4f..4e0a5da333 100644
--- a/src/backend/common.mk
+++ b/src/backend/common.mk
@@ -34,15 +34,13 @@ objfiles.txt: Makefile $(SUBDIROBJS) $(OBJS)
expand_subsys = $(foreach file,$(1),$(if $(filter %/objfiles.txt,$(file)),$(patsubst ../../src/backend/%,%,$(addprefix $(top_builddir)/,$(shell cat $(file)))),$(file)))
# Parallel make trickery
-$(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;
+$(SUBDIROBJS): | $(SUBDIRS:%=%-recursive) ;
.PHONY: $(SUBDIRS:%=%-recursive)
$(SUBDIRS:%=%-recursive):
$(MAKE) -C $(subst -recursive,,$@) all
+$(call recurse,clean)
clean: clean-local
clean-local:
-ifdef SUBDIRS
- for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean || exit; done
-endif
rm -f $(subsysfilename) $(OBJS)