mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
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.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user