|
1 | 1 | # Calling the post-processor with file-upload. Assumes the username
|
2 |
| -# and password are in ~/.curl-w3.org |
| 2 | +# and password are in ~/.curl-w3.org (user = USER:PASS) |
3 | 3 | #
|
4 |
| -# Possible other options: |
5 |
| -# -F date=YYYY-MM-DD |
| 4 | +# To set a date other than today, use: make cdate=YYYYMMDD |
| 5 | +# |
| 6 | +# To set the status, modify one of the "this version" URLs: |
| 7 | +# http://www.w3.org/TR/[YEAR]/CR-[SHORTNAME]-[CDATE]/ |
| 8 | +# Or set that URL to [VERSION] and call Make as: make status=CR |
| 9 | +# |
| 10 | +# |
| 11 | +# Possible other options to add to the curl command below: |
6 | 12 | # -F ids=on
|
| 13 | +# -F omitdchtml=on |
| 14 | +# e.g., like this: make opts="-F ids=on -F omitdchtml=on" |
| 15 | + |
| 16 | +cdate = |
| 17 | +status = |
| 18 | +opts = |
7 | 19 |
|
8 | 20 | %.html: %.src.html
|
9 | 21 | @echo "Calling post-processor to generate $@..."
|
10 |
| - @curl -F file=@$< -F group=CSS -F output=html -F method=file -s -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 |
11 | 25 | %.err: %.src.html
|
12 | 26 | @echo "Calling post-processor to check $<..."
|
13 |
| - @curl -F file=@$< -F group=CSS -F output=err -F method=file -s -K ~/.curl-w3.org https://www.w3.org/Style/Group/process.cgi >$@ |
| 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 |
| 30 | + |
| 31 | +# For Dispositions of Comments in css3-background: |
| 32 | +%.html: %.txt; awk -f issues-txt-to-html.awk $< >$@ |
14 | 33 |
|
| 34 | +# Rule to make PNG from FIG |
| 35 | +%.png: %.fig; fig2dev -L png -m 0.8 -S 4 $< $@ |
| 36 | + |
| 37 | +# Rule to make PNG from EPS |
| 38 | +%.png: %.eps; convert -density 96x96 $< $@ |
15 | 39 |
|
16 | 40 |
|
17 | 41 | all: check Overview.html
|
18 |
| - @echo Done. |
19 | 42 |
|
| 43 | +# egrep will exit with a zero exit code if there is anything left |
20 | 44 | check: Overview.err
|
21 | 45 | @cat $<
|
22 |
| - @grep -q '^No errors$$' $< # Force a non-zero exit code if errors |
23 |
| - |
| 46 | + @if egrep -v '^(Warning:|\(Processed in .* seconds\)|No errors)' $<;\ |
| 47 | + then false; else true; fi |
24 | 48 |
|
25 | 49 |
|
26 | 50 | # A handy shortcut:
|
27 | 51 |
|
| 52 | +commit: update all |
| 53 | + hg commit -m 'Generated. Do not edit!' Overview.html || true |
| 54 | + hg push |
| 55 | + |
| 56 | +update: |
| 57 | + hg pull |
| 58 | + hg update |
| 59 | + |
28 | 60 | clean:
|
29 |
| - rm Overview.html |
| 61 | + rm -f Overview.html Overview.err |
30 | 62 |
|
31 | 63 |
|
32 | 64 |
|
33 |
| -.PHONY: check clean |
| 65 | +.PHONY: check commit update clean |
| 66 | +.DELETE_ON_ERROR: |
| 67 | +.PRECIOUS: %.png |
0 commit comments