c/src/Makefile: Split a `CFLAGS` line
[sunny256-utils.git] / Lib / std / c / Makefile
blobe7f384fa5d6a3cec39e2fdf73871b0c25b40aac8
1 # File ID: STDuuidDTS
2 # Author: Øyvind A. Holm <sunny@sunbase.org>
4 IGNFILES =
5 IGNFILES += -e ^COPYING
7 .PHONY: all
8 all:
9 cd src && $(MAKE)
11 %.html: FORCE
12 test -e "$*.md"
13 echo '<html>' >$@.tmp
14 echo '<head>' >>$@.tmp
15 echo '<meta charset="UTF-8" />' >>$@.tmp
16 echo '<title>$* - STDexecDTS</title>' >>$@.tmp
17 echo '</head>' >>$@.tmp
18 echo '<body>' >>$@.tmp
19 cmark $*.md >>$@.tmp
20 if test -n "$$(git log -1 --format=%h $*.md 2>/dev/null)"; then \
21 (echo 'Generated from `$*.md`'; \
22 git log -1 --format='revision `%h` (%ci)' \
23 $*.md) | cmark >>$@.tmp; \
25 echo '</body>' >>$@.tmp
26 echo '</html>' >>$@.tmp
27 mv $@.tmp $@
29 %.pdf: FORCE
30 $(MAKE) $*.html
31 wkhtmltopdf $*.html $@
33 tags: src/*.[ch]
34 ctags src/*.[ch]
36 .PHONY: clean
37 clean:
38 rm -f README.html
39 rm -f README.pdf
40 cd src && $(MAKE) clean
42 .PHONY: edit
43 edit: tags
44 $(EDITOR) $$(git ls-files | grep -v $(IGNFILES))
45 rm tags
47 .PHONY: FORCE
48 FORCE:
50 .PHONY: test
51 test:
52 cd src && $(MAKE) test
54 .PHONY: testall
55 testall:
56 cd src && $(MAKE) testall
58 .PHONY: tlok
59 tlok:
60 @cd src && $(MAKE) -s tlok
62 .PHONY: valgrind
63 valgrind:
64 cd src && $(MAKE) valgrind
66 .PHONY: valgrindall
67 valgrindall:
68 cd src && $(MAKE) valgrindall