From b96af395b9af2ff9df94b3e82213171f30827c8d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 5 May 2015 21:17:24 -0700 Subject: 1276 - make C++ version the default I've tried to update the Readme, but there are at least a couple of issues. --- tangle/makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tangle/makefile (limited to 'tangle/makefile') diff --git a/tangle/makefile b/tangle/makefile new file mode 100644 index 00000000..cf4c3a88 --- /dev/null +++ b/tangle/makefile @@ -0,0 +1,23 @@ +tangle: makefile type_list function_list file_list test_file_list test_list + g++ -g -O3 -Wall -Wextra -fno-strict-aliasing boot.cc -o tangle + +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 -- cgit 1.4.1-2-gfad0