generation of separate tag pages

svn path=/trunk/; revision=35382
This commit is contained in:
paul 2017-05-22 15:25:26 +00:00
parent f552b7c26f
commit 9cc46f5eb3

View File

@ -73,23 +73,34 @@ TAGNAMES := $(shell printf %s '$(TAGMAP)' \
| tr ' ' '\n' \
| grep -vE '[\$%/:()]' \
| sort -u \
| xargs printf 'tools/tagmaps/%s.map ' \
)
MAPNAMES := $(shell printf 'tools/tagmaps/%s.map ' $(TAGNAMES))
INDEXNAMES := $(shell printf 'tags/tagged-%s.en.xhtml ' $(TAGNAMES))
INDEXSOURCES := $(shell printf 'tags/tagged-%s.sources ' $(TAGNAMES))
all: $(INDEXNAMES)
tags/tagged-%.en.xhtml: tags/tagged.en.xhtml
cp $< $@
all: $(INDEXSOURCES)
tags/tagged-%.sources:
printf '%s:[$*]\n' 'news/*/news' news/generated_xml/ news/nl/nl 'events/*/event' >$@
MAPREQS = $(shell printf %s '$(TAGMAP)' \
| sed -r 's;[^ ]+\...\.xml;\n&;g' \
| grep ' $*' \
| cut -d' ' -f1 \
)
all: $(TAGNAMES)
all: $(MAPNAMES)
# -----------------------------------------------------------------------------
# Second Expansion rules
# -----------------------------------------------------------------------------
.SECONDEXPANSION:
%.sources: $$(SOURCEDIRS) $$(SOURCEREQS) | $(TAGNAMES)
%.sources: $$(SOURCEDIRS) $$(SOURCEREQS) | $(MAPNAMES) $(INDEXSOURCES)
touch $@
tools/tagmaps/%.map: $$(MAPREQS) | $(SUBDIRS)