Skip to content

Commit 3aeff0f

Browse files
committed
Added some rules from the Makefile in ../css3-layout
1 parent 240e409 commit 3aeff0f

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

css-module/Makefile

+25-15
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,47 @@
1010
#
1111
# Possible other options to add to the curl command below:
1212
# -F ids=on
13+
# -F omitdchtml=on
14+
# e.g., like this: make opts="-F ids=on -F omitdchtml=on"
1315

14-
cdate = $(shell date +%Y%m%d)
15-
status = ED
16+
cdate =
17+
status =
18+
opts =
1619

1720
%.html: %.src.html
1821
@echo "Calling post-processor to generate $@..."
19-
@curl -F file=@$< -F group=CSS -F output=html -F method=file -s \
20-
-F date=$(cdate) -F status=$(status) \
21-
-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
2225
%.err: %.src.html
2326
@echo "Calling post-processor to check $<..."
24-
@curl -F file=@$< -F group=CSS -F output=err -F method=file -s \
25-
-F date=$(cdate) -F status=$(status) \
26-
-K ~/.curl-w3.org https://www.w3.org/Style/Group/process.cgi >$@
27-
28-
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
2930

3031
all: check Overview.html
31-
@echo Done.
3232

33+
# egrep will exit with a zero exit code if there is anything left
3334
check: Overview.err
3435
@cat $<
35-
@grep -q '^No errors$$' $< # Force a non-zero exit code if errors
36-
36+
@if egrep -v '^(Warning:|\(Processed in .* seconds\)|No errors)' $<;\
37+
then false; else true; fi
3738

3839

3940
# A handy shortcut:
4041

42+
commit: update all
43+
hg commit -m 'Generated. Do not edit!' Overview.html || true
44+
hg push
45+
46+
update:
47+
hg pull
48+
hg update
49+
4150
clean:
42-
-rm Overview.html
51+
rm -f Overview.html Overview.err
4352

4453

4554

46-
.PHONY: check clean
55+
.PHONY: check commit update clean
56+
.DELETE_ON_ERROR:

0 commit comments

Comments
 (0)