about summary refs log tree commit diff stats
path: root/lisp/js
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2023-02-18 00:42:40 -0500
committerelioat <elioat@tilde.institute>2023-02-18 00:42:40 -0500
commitadf69cfa110088bb3d366683ccd105a5807edf23 (patch)
tree39cd3c70ae0c2bd1d0d0c61ff656286b4c1a1199 /lisp/js
parent58f4d66590cdb6d5595fc65c95c12669131911a6 (diff)
downloadtour-adf69cfa110088bb3d366683ccd105a5807edf23.tar.gz
*
Diffstat (limited to 'lisp/js')
0 files changed, 0 insertions, 0 deletions
97f69507 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
                                                                           
                                                                    
 




                     


















                                                                                                           
                         
tangle: makefile type_list function_list file_list test_file_list test_list
	c++ -O3 -Wall -Wextra -fno-strict-aliasing boot.cc -o tangle

.PHONY: test

test: tangle
	./tangle test

type_list: boot.cc [0-9]*.cc
	@# assumes struct decl has space before '{'
	@grep -h "^struct .* {" [0-9]*.cc |perl -pwe 's/(struct *[^ ]*).*/$$1;/' > type_list
	@grep -h typedef [0-9]*.cc >> type_list

function_list: boot.cc [0-9]*.cc
	@# assumes function decl has space before '{'
	@grep -h "^[^ #].*) {" [0-9]*.cc |perl -pwe 's/ {.*/;/' > function_list

file_list: boot.cc [0-9]*.cc
	@ls [0-9]*.cc |grep -v "\.test\.cc$$" |perl -pwe 's/.*/#include "$$&"/' > file_list

test_file_list: [0-9]*.test.cc
	@ls [0-9]*.test.cc |perl -pwe 's/.*/#include "$$&"/' > test_file_list

test_list: [0-9]*.cc
	@grep -h "^[[:space:]]*void test_" [0-9]*.cc |perl -pwe 's/^\s*void (.*)\(\) {$$/$$1,/' > test_list

clean:
	-rm tangle *_list