Procházet zdrojové kódy

alter processing of tagmap to keep shell arguments uder 128KB

tags/stw2018
Paul Hänsch před 1 rokem
rodič
revize
75c600cc34
1 změnil soubory, kde provedl 6 přidání a 10 odebrání
  1. 6
    10
      Makefile

+ 6
- 10
Makefile Zobrazit soubor

@@ -51,12 +51,8 @@ all: d_year.en.xml d_month.en.xml d_day.en.xml
51 51
 # -----------------------------------------------------------------------------
52 52
 
53 53
 # use shell globbing to work around faulty globbing in gnu make
54
-SOURCEDIRS = $(shell sed -rn 's;^(.*/)[^/]*:(\[\]|global)$$;\1;gp' $@ \
55
-               | while read glob; do \
56
-                 printf '%s\n' $$glob; \
57
-               done \
58
-              )
59
-SOURCEREQS = $(shell ./build/source_globber.sh sourceglobs $@ |sed -r 's;$$;.??.xml;g')
54
+SOURCEDIRS = $(shell sed -rn 's;^(.*/)[^/]*:(\[\]|global)$$;\1;gp' $@ )
55
+SOURCEREQS = $(shell ./build/source_globber.sh sourceglobs $@ |sed 's;$$;.??.xml;g' )
60 56
 
61 57
 all: $(shell find ./ -name '*.sources')
62 58
 
@@ -66,11 +62,11 @@ all: $(shell find ./ -name '*.sources')
66 62
 
67 63
 TAGMAP := $(shell find ./ -name '*.xml' \
68 64
              | xargs ./build/source_globber.sh map_tags \
65
+             | sed -r "s;';'\'';g; s;[^ ]+;'&';g;" \
69 66
             )
70 67
 
71
-TAGNAMES := $(shell printf %s '$(TAGMAP)' \
72
-              | cut -d" " -f2- \
73
-              | tr ' ' '\n' \
68
+TAGNAMES := $(shell printf '%s\n' $(TAGMAP) \
69
+              | sed '/\...\.xml$$/d' \
74 70
               | grep -vE '[\$%/:()]' \
75 71
               | sort -u \
76 72
              )
@@ -88,7 +84,7 @@ tags/tagged-%.sources:
88 84
 	printf '%s:[$*]\n' 'news/*/news' news/generated_xml/ news/nl/nl 'events/*/event' >$@
89 85
 	printf 'd_day:[]' >>$@
90 86
 
91
-MAPREQS = $(shell printf %s '$(TAGMAP)' \
87
+MAPREQS = $(shell printf '%s ' $(TAGMAP) \
92 88
             | sed -r 's;[^ ]+\...\.xml;\n&;g' \
93 89
             | grep ' $*' \
94 90
             | cut -d' ' -f1 \

Načítá se…
Zrušit
Uložit