@@ -114,33 +114,37 @@ meta-data/section.data: meta-data/annex-f meta-data/networking-section.data bin/
114
114
115
115
dates : meta-data/dates
116
116
117
+ optcmd = $(shell command -v $(1 ) || echo :)
118
+
117
119
# 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
119
122
@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
130
136
131
137
new-papers :
132
138
rm -f meta-data/index.json meta-data/paper_titles.txt
133
139
$(MAKE ) meta-data/paper_titles.txt
134
140
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
138
142
meta-data/index.json :
139
143
$(call optcmd,curl) https://wg21.link/index.json > $@
140
144
141
145
# If python is not installed then create an empty meta-data/paper_titles.txt
142
146
meta-data/paper_titles.txt : | meta-data/index.json
143
- $(call optcmd, python) bin/make_paper_titles.py $| > $@
147
+ $(python ) bin/make_paper_titles.py $| > $@
144
148
145
149
.PRECIOUS : meta-data/dates
146
150
.PRECIOUS : meta-data/paper_titles.txt
0 commit comments