diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-02-17 16:57:37 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-02-17 17:14:45 -0800 |
commit | 515309164793b2e03c15954bf8a89f0f288a7f2c (patch) | |
tree | 7fd7ed06fc7a7a772c6002cbb57b59faafcd6ada /cpp/literate/tangle/makefile | |
parent | 6042828bdea2a1ed1da1b0d2013a4479fb3d005a (diff) | |
download | mu-515309164793b2e03c15954bf8a89f0f288a7f2c.tar.gz |
775 - starting to reorg C++ mu to use layers
Diffstat (limited to 'cpp/literate/tangle/makefile')
-rw-r--r-- | cpp/literate/tangle/makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cpp/literate/tangle/makefile b/cpp/literate/tangle/makefile new file mode 100644 index 00000000..3d938c09 --- /dev/null +++ b/cpp/literate/tangle/makefile @@ -0,0 +1,23 @@ +tangle: makefile type_list function_list file_list test_file_list test_list + 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 -rf tangle *_list |