fix: add find_file helper and optional src dirs to amalgamation script

The amalgamation script now searches for files across src/include, src/vm,
and src/optional directories using a new find_file function, and replaces
full paths with basenames in begin/end comments for reproducible output.
The Makefile also creates the build directory if missing and includes
src/optional/*.h and src/optional/*.c in the amalgamation target.
This commit is contained in:
Lukas Joeressen
2018-05-12 07:14:27 +00:00
parent 52d65d48df
commit 10a1f3093d
2 changed files with 21 additions and 6 deletions
+2 -1
View File
@@ -101,7 +101,8 @@ gh-pages: docs
$(V) cp -r build/docs/. build/gh-pages
# Build amalgamation of all Wren library files.
amalgamation: src/include/wren.h src/vm/*.h src/vm/*.c
amalgamation: src/include/wren.h src/vm/*.h src/vm/*.c src/optional/*.h src/vm/*.c
mkdir -p build
./util/generate_amalgamation.py > build/wren.c
.PHONY: all amalgamation builtin clean debug docs gh-pages release test vm watchdocs ci ci_32 ci_64