|
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 | +group ?= CSS |
| 19 | +opts ?= |
| 20 | +target ?= Overview |
| 21 | +markup ?= html |
7 | 22 |
|
8 | 23 | %.html: %.src.html
|
9 | 24 | @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 >$@ |
| 25 | + @curl -K ~/.curl-w3.org -s -S -F output=html -F file=@$< \ |
| 26 | + -F group=$(group) -F method=file -F date=$(cdate) -F status=$(status) \ |
| 27 | + $(opts) -o $@ https://www.w3.org/Style/Group/process.cgi |
11 | 28 | %.err: %.src.html
|
12 | 29 | @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 >$@ |
| 30 | + @curl -K ~/.curl-w3.org -s -S -F output=err -F file=@$< \ |
| 31 | + -F group=$(group) -F method=file -F date=$(cdate) -F status=$(status) \ |
| 32 | + $(opts) -o $@ https://www.w3.org/Style/Group/process.cgi |
| 33 | +%.html: %.bs |
| 34 | + curl -s -L -F file=@$< -F time=$(cdate) -F output=html \ |
| 35 | + -F paragraph=$(markup) $(opts) -o $@ http://api.csswg.org/bikeshed/ |
| 36 | +%.err: %.bs |
| 37 | + curl -s -L -F file=@$< -F time=$(cdate) -F output=err \ |
| 38 | + -F paragraph=$(markup) $(opts) -o $@ http://api.csswg.org/bikeshed/ |
14 | 39 |
|
| 40 | +# For Dispositions of Comments in css3-background: |
| 41 | +%.html: %.txt; awk -f issues-txt-to-html.awk $< >$@ |
15 | 42 |
|
| 43 | +# Rule to create PNG from FIG |
| 44 | +%.png: %.fig; fig2dev -L png -m 0.8 -S 4 $< $@ |
16 | 45 |
|
17 |
| -all: check Overview.html |
18 |
| - @echo Done. |
| 46 | +# Rule to create EPS from FIG |
| 47 | +%.eps: %.fig; fig2dev -m 0.8 -L eps -F -c $< $@ |
| 48 | + |
| 49 | +# Rule to create PNG from EPS |
| 50 | +%.png: %.eps; convert -density 96x96 $< $@ |
19 | 51 |
|
20 |
| -check: Overview.err |
21 |
| - @cat $< |
22 |
| - @grep -q '^No errors$$' $< # Force a non-zero exit code if errors |
23 | 52 |
|
| 53 | +all: check $(target).html |
| 54 | + |
| 55 | +# egrep will exit with a zero exit code if there is anything left |
| 56 | +check: $(target).err |
| 57 | + @cat $< |
| 58 | + @if egrep -qv '^(Warning:|\(Processed in .* seconds\)|No errors)' $<;\ |
| 59 | + then false; else true; fi |
24 | 60 |
|
25 | 61 |
|
26 | 62 | # A handy shortcut:
|
27 | 63 |
|
28 |
| -commit: update clean all |
29 |
| - cvs commit -m 'Generated. Do not edit!' Overview.html |
| 64 | +commit: update all |
| 65 | + hg commit -m 'Generated. Do not edit!' $(target).html || true |
| 66 | + hg push |
30 | 67 |
|
31 | 68 | update:
|
32 |
| - cvs update |
| 69 | + hg pull |
| 70 | + hg update |
33 | 71 |
|
34 | 72 | clean:
|
35 |
| - rm Overview.html |
| 73 | + rm -f $(target).html $(target).err |
36 | 74 |
|
37 | 75 |
|
38 | 76 |
|
39 | 77 | .PHONY: check commit update clean
|
| 78 | +.DELETE_ON_ERROR: |
| 79 | +.PRECIOUS: %.png |
0 commit comments