|
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 | 4 | # To set a date other than today, use: make cdate=YYYYMMDD |
5 | 5 | # |
6 | | -# Possible other options: |
| 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: |
7 | 12 | # -F ids=on |
| 13 | +# -F omitdchtml=on |
| 14 | + |
| 15 | +opts = |
8 | 16 |
|
9 | 17 | cdate = $(shell date +%Y%m%d) |
10 | 18 |
|
11 | 19 | %.html: %.src.html |
12 | 20 | @echo "Calling post-processor to generate $@..." |
13 | | - @curl -F file=@$< -F group=CSS -F output=html -F method=file -s \ |
14 | | - -F date=$(cdate) \ |
15 | | - -K ~/.curl-w3.org http://cgi.w3.org/member-bin/process.cgi >$@ |
| 21 | + @curl -K ~/.curl-w3.org -s -S -F output=html -F file=@$< -F group=CSS \ |
| 22 | + -F method=file -F date=$(cdate) -F status=$(status) $(opts) -o $@ \ |
| 23 | + https://cgi.w3.org/member-bin/process.cgi |
16 | 24 | %.err: %.src.html |
17 | 25 | @echo "Calling post-processor to check $<..." |
18 | | - @curl -F file=@$< -F group=CSS -F output=err -F method=file -s \ |
19 | | - -F date=$(cdate) \ |
20 | | - -K ~/.curl-w3.org http://cgi.w3.org/member-bin/process.cgi >$@ |
| 26 | + @curl -K ~/.curl-w3.org -s -S -F output=err -F file=@$< -F group=CSS \ |
| 27 | + -F method=file -F date=$(cdate) -F status=$(status) $(opts) -o $@ \ |
| 28 | + https://cgi.w3.org/member-bin/process.cgi |
21 | 29 |
|
| 30 | +# For Dispositions of Comments in css3-background: |
| 31 | +%.html: %.txt; awk -f issues-txt-to-html.awk $< >$@ |
| 32 | + |
| 33 | +# Rule to create EPS from FIG |
| 34 | +%.eps: %.fig; fig2dev -m 0.8 -L eps -F -c $< $@ |
| 35 | + |
| 36 | +# Rule to create raster image versions of EPS images |
| 37 | +%.png: %.eps; convert -density 96x96 $< $@ |
22 | 38 |
|
23 | 39 |
|
24 | 40 | all: check Overview.html |
25 | | - @echo Done. |
26 | 41 |
|
| 42 | +# egrep will exit with a zero exit code if there is anything left |
27 | 43 | check: Overview.err |
28 | 44 | @cat $< |
29 | | - @grep -q '^No errors$$' $< # Force a non-zero exit code if errors |
30 | | - |
| 45 | + @if egrep -v '^(Warning:|\(Processed in .* seconds\)|No errors)' $<;\ |
| 46 | + then false; else true; fi |
31 | 47 |
|
32 | 48 |
|
33 | 49 | # A handy shortcut: |
34 | 50 |
|
35 | | -commit: update clean all |
36 | | - cvs commit -m 'Generated. Do not edit!' Overview.html |
| 51 | +commit: update all |
| 52 | + hg commit -m 'Generated. Do not edit!' Overview.html || true |
| 53 | + hg push |
37 | 54 |
|
38 | 55 | update: |
39 | | - cvs update |
| 56 | + hg pull -u |
40 | 57 |
|
41 | 58 | clean: |
42 | | - rm Overview.html |
| 59 | + rm -f Overview.html Overview.err |
43 | 60 |
|
44 | 61 |
|
45 | 62 |
|
46 | 63 | .PHONY: check commit update clean |
| 64 | +.DELETE_ON_ERROR: |
| 65 | +.PRECIOUS: %.png |
0 commit comments