Skip to content

Commit acc1e85

Browse files
committed
[css-inline] Some extra rules in the Makefile
1 parent 899a9e1 commit acc1e85

File tree

1 file changed

+54
-14
lines changed

1 file changed

+54
-14
lines changed

css-inline/Makefile

Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,79 @@
11
# 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)
33
#
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:
612
# -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
722

823
%.html: %.src.html
924
@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
1128
%.err: %.src.html
1229
@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/
1439

40+
# For Dispositions of Comments in css3-background:
41+
%.html: %.txt; awk -f issues-txt-to-html.awk $< >$@
1542

43+
# Rule to create PNG from FIG
44+
%.png: %.fig; fig2dev -L png -m 0.8 -S 4 $< $@
1645

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 $< $@
1951

20-
check: Overview.err
21-
@cat $<
22-
@grep -q '^No errors$$' $< # Force a non-zero exit code if errors
2352

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
2460

2561

2662
# A handy shortcut:
2763

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
3067

3168
update:
32-
cvs update
69+
hg pull
70+
hg update
3371

3472
clean:
35-
rm Overview.html
73+
rm -f $(target).html $(target).err
3674

3775

3876

3977
.PHONY: check commit update clean
78+
.DELETE_ON_ERROR:
79+
.PRECIOUS: %.png

0 commit comments

Comments
 (0)