Skip to content

Commit bb67876

Browse files
committed
[css-box-3] Synchronized Makefile with the one in ../css-template
1 parent 8f1054d commit bb67876

1 file changed

Lines changed: 30 additions & 16 deletions

File tree

css-box/Makefile

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,52 +11,66 @@
1111
# Possible other options to add to the curl command below:
1212
# -F ids=on
1313
# -F omitdchtml=on
14+
# e.g., like this: make opts="-F ids=on -F omitdchtml=on"
1415

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
1822

1923
%.html: %.src.html
2024
@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
2428
%.err: %.src.html
2529
@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/
2939

3040
# For Dispositions of Comments in css3-background:
3141
%.html: %.txt; awk -f issues-txt-to-html.awk $< >$@
3242

43+
# Rule to create PNG from FIG
44+
%.png: %.fig; fig2dev -L png -m 0.8 -S 4 $< $@
45+
3346
# Rule to create EPS from FIG
3447
%.eps: %.fig; fig2dev -m 0.8 -L eps -F -c $< $@
3548

36-
# Rule to create raster image versions of EPS images
49+
# Rule to create PNG from EPS
3750
%.png: %.eps; convert -density 96x96 $< $@
3851

3952

40-
all: check Overview.html
53+
all: check $(target).html
4154

4255
# egrep will exit with a zero exit code if there is anything left
43-
check: Overview.err
56+
check: $(target).err
4457
@cat $<
45-
@if egrep -v '^(Warning:|\(Processed in .* seconds\)|No errors)' $<;\
58+
@if egrep -qv '^(Warning:|\(Processed in .* seconds\)|No errors)' $<;\
4659
then false; else true; fi
4760

4861

4962
# A handy shortcut:
5063

5164
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
5366
hg push
5467

5568
update:
56-
hg pull -u
69+
hg pull
70+
hg update
5771

5872
clean:
59-
rm -f Overview.html Overview.err
73+
rm -f $(target).html $(target).err
6074

6175

6276

0 commit comments

Comments
 (0)