|
11 | 11 | # Possible other options to add to the curl command below: |
12 | 12 | # -F ids=on |
13 | 13 | # -F omitdchtml=on |
| 14 | +# e.g., like this: make opts="-F ids=on -F omitdchtml=on" |
14 | 15 |
|
15 | | -opts = |
16 | | - |
17 | | -cdate = $(shell date +%Y%m%d) |
| 16 | +cdate ?= |
| 17 | +status ?= |
| 18 | +group ?= CSS |
| 19 | +opts ?= |
| 20 | +target ?= Overview |
| 21 | +markup ?= html |
18 | 22 |
|
19 | 23 | %.html: %.src.html |
20 | 24 | @echo "Calling post-processor to generate $@..." |
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://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 |
24 | 28 | %.err: %.src.html |
25 | 29 | @echo "Calling post-processor to check $<..." |
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://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/ |
29 | 39 |
|
30 | 40 | # For Dispositions of Comments in css3-background: |
31 | 41 | %.html: %.txt; awk -f issues-txt-to-html.awk $< >$@ |
32 | 42 |
|
| 43 | +# Rule to create PNG from FIG |
| 44 | +%.png: %.fig; fig2dev -L png -m 0.8 -S 4 $< $@ |
| 45 | + |
33 | 46 | # Rule to create EPS from FIG |
34 | 47 | %.eps: %.fig; fig2dev -m 0.8 -L eps -F -c $< $@ |
35 | 48 |
|
36 | | -# Rule to create raster image versions of EPS images |
| 49 | +# Rule to create PNG from EPS |
37 | 50 | %.png: %.eps; convert -density 96x96 $< $@ |
38 | 51 |
|
39 | 52 |
|
40 | | -all: check Overview.html |
| 53 | +all: check $(target).html |
41 | 54 |
|
42 | 55 | # egrep will exit with a zero exit code if there is anything left |
43 | | -check: Overview.err |
| 56 | +check: $(target).err |
44 | 57 | @cat $< |
45 | | - @if egrep -v '^(Warning:|\(Processed in .* seconds\)|No errors)' $<;\ |
| 58 | + @if egrep -qv '^(Warning:|\(Processed in .* seconds\)|No errors)' $<;\ |
46 | 59 | then false; else true; fi |
47 | 60 |
|
48 | 61 |
|
49 | 62 | # A handy shortcut: |
50 | 63 |
|
51 | 64 | commit: update all |
52 | | - hg commit -m 'Generated. Do not edit!' Overview.html || true |
| 65 | + hg commit -m 'Generated. Do not edit!' $(target).html || true |
53 | 66 | hg push |
54 | 67 |
|
55 | 68 | update: |
56 | | - hg pull -u |
| 69 | + hg pull |
| 70 | + hg update |
57 | 71 |
|
58 | 72 | clean: |
59 | | - rm -f Overview.html Overview.err |
| 73 | + rm -f $(target).html $(target).err |
60 | 74 |
|
61 | 75 |
|
62 | 76 |
|
|
0 commit comments