File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010#
1111# Possible other options to add to the curl command below:
1212# -F ids=on
13+ # -F omitdchtml=on
14+ # e.g., like this: make opts="-F ids=on -F omitdchtml=on"
1315
14- cdate = $(shell date +% Y% m% d)
15- status = ED
16+ cdate =
17+ status =
18+ opts =
1619
1720% .html : % .src.html
1821 @echo " Calling post-processor to generate $@ ..."
19- @curl -F file=@ $< -F group=CSS -F output=html -F method= file -s \
20- -F date=$(cdate ) -F status=$(status ) \
21- -K ~ /.curl-w3.org https://www.w3.org/Style/Group/process.cgi > $@
22+ @curl -K ~ /.curl-w3.org -s -S -F output=html -F file=@ $< -F group=CSS \
23+ -F method=file -F date=$(cdate ) -F status=$(status ) $( opts ) -o $@ \
24+ https://www.w3.org/Style/Group/process.cgi
2225% .err : % .src.html
2326 @echo " Calling post-processor to check $<..."
24- @curl -F file=@$< -F group=CSS -F output=err -F method=file -s \
25- -F date=$(cdate ) -F status=$(status ) \
26- -K ~ /.curl-w3.org https://www.w3.org/Style/Group/process.cgi > $@
27-
28-
27+ @curl -K ~ /.curl-w3.org -s -S -F output=err -F file=@$< -F group=CSS \
28+ -F method=file -F date=$(cdate ) -F status=$(status ) $(opts ) -o $@ \
29+ https://www.w3.org/Style/Group/process.cgi
2930
3031all : check Overview.html
31- @echo Done.
3232
33+ # egrep will exit with a zero exit code if there is anything left
3334check : Overview.err
3435 @cat $<
35- @grep -q ' ^No errors$$ ' $< # Force a non-zero exit code if errors
36-
36+ @if egrep -v ' ^(Warning:|\(Processed in .* seconds\)| No errors) ' $< ; \
37+ then false ; else true ; fi
3738
3839
3940# A handy shortcut:
4041
42+ commit : update all
43+ hg commit -m ' Generated. Do not edit!' Overview.html || true
44+ hg push
45+
46+ update :
47+ hg pull
48+ hg update
49+
4150clean :
42- - rm Overview.html
51+ rm -f Overview.html Overview.err
4352
4453
4554
46- .PHONY : check clean
55+ .PHONY : check commit update clean
56+ .DELETE_ON_ERROR :
You can’t perform that action at this time.
0 commit comments