Skip to content

Commit 2317e1d

Browse files
committed
Added the same enhancements as in ../css3-layout/Makefile: support for
status on the command line, more documentation, no more warnings counted as errors...
1 parent 6ba9921 commit 2317e1d

File tree

1 file changed

+44
-10
lines changed

1 file changed

+44
-10
lines changed

css-text-decor/Makefile

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,67 @@
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+
opts =
719

820
%.html: %.src.html
921
@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
1125
%.err: %.src.html
1226
@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 $< >$@
1433

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

1640

1741
all: check Overview.html
18-
@echo Done.
1942

43+
# egrep will exit with a zero exit code if there is anything left
2044
check: Overview.err
2145
@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
2448

2549

2650
# A handy shortcut:
2751

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+
2860
clean:
29-
rm Overview.html
61+
rm -f Overview.html Overview.err
3062

3163

3264

33-
.PHONY: check clean
65+
.PHONY: check commit update clean
66+
.DELETE_ON_ERROR:
67+
.PRECIOUS: %.png

0 commit comments

Comments
 (0)