@@ -114,33 +114,37 @@ meta-data/section.data: meta-data/annex-f meta-data/networking-section.data bin/
114114
115115dates : meta-data/dates
116116
117+ optcmd = $(shell command -v $(1 ) || echo :)
118+
117119# Generate file with issue number and unix timestamp of last change.
118- meta-data/dates : xml/issue[0-9]* .xml
120+ python := $(call optcmd,python)
121+ meta-data/dates : xml/issue[0-9]* .xml bin/make_dates.py
119122 @echo " Refreshing 'Last modified' timestamps for issues..."
120- @for i in xml/issue[0-9]* .xml ; do \
121- n=" $$ {i#xml/issue}" ; n=" $$ {n%.xml}" ; \
122- grep -s -q " ^$$ n " $@ && test $$ i -ot $@ && continue ; \
123- echo $$ i >&2 ; \
124- git log -1 --pretty=" format:$$ n %ct%n" $$ i ; \
125- done > $@ .new
126- @cat $@ $@ .new | sort -n -r | sort -n -k 1 -u > $@ .tmp
127- @rm $@ .new
128- @$(call update,$@ )
129-
123+ @if [ " $( python) " = " :" ]; then \
124+ for i in xml/issue[0-9]* .xml ; do \
125+ n=" $$ {i#xml/issue}" ; n=" $$ {n%.xml}" ; \
126+ grep -s -q " ^$$ n " $@ && test $$ i -ot $@ && continue ; \
127+ echo $$ i >&2 ; \
128+ git log -1 --pretty=" format:$$ n %ct%n" $$ i ; \
129+ done > $@ .new; \
130+ cat $@ $@ .new | sort -n -r | sort -n -k 1 -u > $@ .tmp; \
131+ rm $@ .new; \
132+ $(call update,$@ ) ; \
133+ else \
134+ git whatchanged --no-show-signature --pretty=%ct | $(python ) bin/make_dates.py > $@ ; \
135+ fi
130136
131137new-papers :
132138 rm -f meta-data/index.json meta-data/paper_titles.txt
133139 $(MAKE ) meta-data/paper_titles.txt
134140
135- optcmd = $(shell command -v $(1 ) || echo :)
136-
137- # If python is not installed then create an empty meta-data/paper_titles.txt
141+ # If curl is not installed then create an empty meta-data/paper_titles.txt
138142meta-data/index.json :
139143 $(call optcmd,curl) https://wg21.link/index.json > $@
140144
141145# If python is not installed then create an empty meta-data/paper_titles.txt
142146meta-data/paper_titles.txt : | meta-data/index.json
143- $(call optcmd, python) bin/make_paper_titles.py $| > $@
147+ $(python ) bin/make_paper_titles.py $| > $@
144148
145149.PRECIOUS : meta-data/dates
146150.PRECIOUS : meta-data/paper_titles.txt
0 commit comments