tackle delayed front-page problem: force processing order for recursive Make jobs
svn path=/trunk/; revision=35050
This commit is contained in:
13
Makefile
13
Makefile
@@ -6,12 +6,15 @@ all: subdirs localmenus date_today SOURCEUPDATES
|
||||
# Dive into subdirectories
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
SUBDIRS := $(shell find */* -name "Makefile" | xargs --max-args=1 dirname)
|
||||
SUBDIRS := $(shell find */* -name "Makefile" | xargs dirname)
|
||||
|
||||
.PHONY: subdirs $(SUBDIRS)
|
||||
|
||||
subdirs: $(SUBDIRS)
|
||||
|
||||
# run jobs for tools/ only after events/ and news/ have been completed
|
||||
tools: | events news
|
||||
|
||||
$(SUBDIRS):
|
||||
$(MAKE) -k -C $@ || true
|
||||
|
||||
@@ -54,11 +57,13 @@ d_year.en.xml: d_month.en.xml
|
||||
grep -q '$(YEAR)' $@ || echo '$(YEAR)' >$@
|
||||
|
||||
.PHONY: SOURCEUPDATES
|
||||
|
||||
# finish jobs in subdirs before updating .sources
|
||||
SOURCEUPDATES: | subdirs
|
||||
|
||||
SOURCEUPDATES: $(shell find ./ -name '*.sources')
|
||||
SOURCEREQS = $(shell ./build/source_globber.sh sourceglobs $@ |sed -r 's;$$;.??.xml;g')
|
||||
SOURCEDIRS = $(shell sed -rn 's;^(.*/)[^/]*:(\[\]|global)$$;\1;gp' $@)
|
||||
.SECONDEXPANSION:
|
||||
%.sources: $$(SOURCEREQS)
|
||||
touch $@
|
||||
%.sources: $$(SOURCEDIRS)
|
||||
%.sources: $$(SOURCEDIRS) $$(SOURCEREQS)
|
||||
touch $@
|
||||
|
Reference in New Issue
Block a user