diff options
Diffstat (limited to 'http-status-codes/Makefile')
-rw-r--r-- | http-status-codes/Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/http-status-codes/Makefile b/http-status-codes/Makefile new file mode 100644 index 0000000..cea962b --- /dev/null +++ b/http-status-codes/Makefile | |||
@@ -0,0 +1,31 @@ | |||
1 | FILES=registry.rec http-status-codes.h | ||
2 | all: check $(FILES) | ||
3 | check: registry.rec | ||
4 | recfix --check registry.rec | ||
5 | |||
6 | # http-status-codes-1.csv is from IANA! | ||
7 | iana.tmp: http-status-codes-1.csv | ||
8 | cat $^ | grep -v Unassigned | csv2rec > $@ | ||
9 | |||
10 | # extend by all-caps descriptions suitable for C-style identifier generation | ||
11 | iana-extended.tmp: iana.tmp | ||
12 | ./extend.sh $@ $^ | ||
13 | |||
14 | registry.rec: types.rec iana-extended.tmp extras.rec | ||
15 | cat $^ > $@ | ||
16 | |||
17 | distclean: | ||
18 | rm -f *.tmp | ||
19 | |||
20 | clean: | ||
21 | rm -f $(FILES) *.tmp | ||
22 | |||
23 | |||
24 | http-status-codes.h.tmp: registry.rec h.template | ||
25 | ../format.sh h.template < registry.rec > $@ | ||
26 | |||
27 | http-status-codes.h: h.header http-status-codes.h.tmp h.footer | ||
28 | cat $^ > $@ | ||
29 | |||
30 | |||
31 | .PHONY: check clean distclean | ||