From 75c600cc3402bb87c57c574880a4b9d918e8343a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20H=C3=A4nsch?= Date: Thu, 14 Dec 2017 14:05:20 +0100 Subject: [PATCH] alter processing of tagmap to keep shell arguments uder 128KB --- Makefile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 21561a7399..e63f8feaff 100644 --- a/Makefile +++ b/Makefile @@ -51,12 +51,8 @@ all: d_year.en.xml d_month.en.xml d_day.en.xml # ----------------------------------------------------------------------------- # use shell globbing to work around faulty globbing in gnu make -SOURCEDIRS = $(shell sed -rn 's;^(.*/)[^/]*:(\[\]|global)$$;\1;gp' $@ \ - | while read glob; do \ - printf '%s\n' $$glob; \ - done \ - ) -SOURCEREQS = $(shell ./build/source_globber.sh sourceglobs $@ |sed -r 's;$$;.??.xml;g') +SOURCEDIRS = $(shell sed -rn 's;^(.*/)[^/]*:(\[\]|global)$$;\1;gp' $@ ) +SOURCEREQS = $(shell ./build/source_globber.sh sourceglobs $@ |sed 's;$$;.??.xml;g' ) all: $(shell find ./ -name '*.sources') @@ -66,11 +62,11 @@ all: $(shell find ./ -name '*.sources') TAGMAP := $(shell find ./ -name '*.xml' \ | xargs ./build/source_globber.sh map_tags \ + | sed -r "s;';'\'';g; s;[^ ]+;'&';g;" \ ) -TAGNAMES := $(shell printf %s '$(TAGMAP)' \ - | cut -d" " -f2- \ - | tr ' ' '\n' \ +TAGNAMES := $(shell printf '%s\n' $(TAGMAP) \ + | sed '/\...\.xml$$/d' \ | grep -vE '[\$%/:()]' \ | sort -u \ ) @@ -88,7 +84,7 @@ tags/tagged-%.sources: printf '%s:[$*]\n' 'news/*/news' news/generated_xml/ news/nl/nl 'events/*/event' >$@ printf 'd_day:[]' >>$@ -MAPREQS = $(shell printf %s '$(TAGMAP)' \ +MAPREQS = $(shell printf '%s ' $(TAGMAP) \ | sed -r 's;[^ ]+\...\.xml;\n&;g' \ | grep ' $*' \ | cut -d' ' -f1 \