Separate the tests and the main program.
This commit is contained in:
1 parent
46af5238ce
commit
20e45f363c
5 files changed
+141
-117
No files matched your search
@@ -8,8 +8,6 @@ clean:
|
||||
sed 's/.*`\(.*\)'\''.*/\1/' | grep -v '^all$$' | \
|
||||
xargs rm
|
||||
|
||||
jv_utf8_tables.gen.h: gen_utf8_tables.py
|
||||
python $^ > $@
|
||||
|
||||
lexer.gen.c: lexer.l
|
||||
flex -o lexer.gen.c --header-file=lexer.gen.h lexer.l
|
||||
@@ -19,21 +17,20 @@ parser.gen.c: parser.y lexer.gen.h
|
||||
bison -W -d parser.y -v --report-file=parser.gen.info -o $@
|
||||
parser.gen.h: parser.gen.c
|
||||
|
||||
jv_utf8_tables.gen.h: gen_utf8_tables.py
|
||||
python $^ > $@
|
||||
jv_unicode.c: jv_utf8_tables.gen.h
|
||||
|
||||
parsertest: parser.gen.c lexer.gen.c main.c opcode.c bytecode.c compile.c execute.c builtin.c jv.c jv_parse.c jv_print.c jv_dtoa.c jv_unicode.c
|
||||
JQ_SRC=parser.gen.c lexer.gen.c opcode.c bytecode.c compile.c execute.c builtin.c jv.c jv_parse.c jv_print.c jv_dtoa.c jv_unicode.c
|
||||
|
||||
|
||||
jq_test: $(JQ_SRC) jq_test.c
|
||||
$(CC) -DJQ_DEBUG=1 -o $@ $^
|
||||
|
||||
jq: parser.gen.c lexer.gen.c main.c opcode.c bytecode.c compile.c execute.c builtin.c jv.c jv_parse.c jv_print.c jv_dtoa.c jv_unicode.c
|
||||
jq: $(JQ_SRC) main.c
|
||||
$(CC) -DJQ_DEBUG=0 -o $@ $^
|
||||
|
||||
jv_test: jv_test.c jv.c jv_print.c jv_dtoa.c jv_unicode.c
|
||||
$(CC) -DNO_JANSSON -o $@ $^
|
||||
|
||||
jv_parse: jv_parse.c jv.c jv_print.c jv_dtoa.c
|
||||
$(CC) -DNO_JANSSON -o $@ $^ -DJV_PARSE_MAIN
|
||||
|
||||
|
||||
test: jv_test
|
||||
valgrind --error-exitcode=1 -q --leak-check=full ./jv_test
|
||||
test: jq_test
|
||||
valgrind --error-exitcode=1 -q --leak-check=full ./jq_test >/dev/null
|
||||
|
||||
Reference in new issue
Block a user