File tree 1 file changed +25
-15
lines changed
1 file changed +25
-15
lines changed Original file line number Diff line number Diff line change 10
10
#
11
11
# Possible other options to add to the curl command below:
12
12
# -F ids=on
13
+ # -F omitdchtml=on
14
+ # e.g., like this: make opts="-F ids=on -F omitdchtml=on"
13
15
14
- cdate = $(shell date +% Y% m% d)
15
- status = ED
16
+ cdate =
17
+ status =
18
+ opts =
16
19
17
20
% .html : % .src.html
18
21
@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
22
25
% .err : % .src.html
23
26
@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
29
30
30
31
all : check Overview.html
31
- @echo Done.
32
32
33
+ # egrep will exit with a zero exit code if there is anything left
33
34
check : Overview.err
34
35
@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
37
38
38
39
39
40
# A handy shortcut:
40
41
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
+
41
50
clean :
42
- - rm Overview.html
51
+ rm -f Overview.html Overview.err
43
52
44
53
45
54
46
- .PHONY : check clean
55
+ .PHONY : check commit update clean
56
+ .DELETE_ON_ERROR :
You can’t perform that action at this time.
0 commit comments