diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .travis.yml | 7 | ||||
-rw-r--r-- | Makefile.am | 46 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/builtin.c (renamed from builtin.c) | 0 | ||||
-rw-r--r-- | src/builtin.h (renamed from builtin.h) | 0 | ||||
-rw-r--r-- | src/bytecode.c (renamed from bytecode.c) | 0 | ||||
-rw-r--r-- | src/bytecode.h (renamed from bytecode.h) | 0 | ||||
-rw-r--r-- | src/compile.c (renamed from compile.c) | 0 | ||||
-rw-r--r-- | src/compile.h (renamed from compile.h) | 0 | ||||
-rw-r--r-- | src/exec_stack.h (renamed from exec_stack.h) | 0 | ||||
-rw-r--r-- | src/execute.c (renamed from execute.c) | 0 | ||||
-rw-r--r-- | src/inject_errors.c (renamed from inject_errors.c) | 0 | ||||
-rw-r--r-- | src/jq.h (renamed from jq.h) | 0 | ||||
-rw-r--r-- | src/jq_parser.h (renamed from jq_parser.h) | 0 | ||||
-rw-r--r-- | src/jq_test.c (renamed from jq_test.c) | 0 | ||||
-rw-r--r-- | src/jv.c (renamed from jv.c) | 0 | ||||
-rw-r--r-- | src/jv.h (renamed from jv.h) | 0 | ||||
-rw-r--r-- | src/jv_alloc.c (renamed from jv_alloc.c) | 0 | ||||
-rw-r--r-- | src/jv_alloc.h (renamed from jv_alloc.h) | 0 | ||||
-rw-r--r-- | src/jv_aux.c (renamed from jv_aux.c) | 0 | ||||
-rw-r--r-- | src/jv_dtoa.c (renamed from jv_dtoa.c) | 0 | ||||
-rw-r--r-- | src/jv_dtoa.h (renamed from jv_dtoa.h) | 0 | ||||
-rw-r--r-- | src/jv_file.c (renamed from jv_file.c) | 0 | ||||
-rw-r--r-- | src/jv_parse.c (renamed from jv_parse.c) | 0 | ||||
-rw-r--r-- | src/jv_print.c (renamed from jv_print.c) | 0 | ||||
-rw-r--r-- | src/jv_unicode.c (renamed from jv_unicode.c) | 0 | ||||
-rw-r--r-- | src/jv_unicode.h (renamed from jv_unicode.h) | 0 | ||||
-rw-r--r-- | src/jv_utf8_tables.h (renamed from jv_utf8_tables.h) | 0 | ||||
-rw-r--r-- | src/lexer.c (renamed from lexer.c) | 0 | ||||
-rw-r--r-- | src/lexer.h (renamed from lexer.h) | 0 | ||||
-rw-r--r-- | src/lexer.l (renamed from lexer.l) | 0 | ||||
-rw-r--r-- | src/libm.h (renamed from libm.h) | 0 | ||||
-rw-r--r-- | src/linker.c (renamed from linker.c) | 0 | ||||
-rw-r--r-- | src/linker.h (renamed from linker.h) | 0 | ||||
-rw-r--r-- | src/locfile.c (renamed from locfile.c) | 0 | ||||
-rw-r--r-- | src/locfile.h (renamed from locfile.h) | 0 | ||||
-rw-r--r-- | src/main.c (renamed from main.c) | 0 | ||||
-rw-r--r-- | src/opcode_list.h (renamed from opcode_list.h) | 0 | ||||
-rw-r--r-- | src/parser.c (renamed from parser.c) | 0 | ||||
-rw-r--r-- | src/parser.h (renamed from parser.h) | 0 | ||||
-rw-r--r-- | src/parser.y (renamed from parser.y) | 0 | ||||
-rw-r--r-- | src/util.c (renamed from util.c) | 0 | ||||
-rw-r--r-- | src/util.h (renamed from util.h) | 0 |
44 files changed, 31 insertions, 25 deletions
@@ -19,6 +19,7 @@ jq.1 # Autotools junk .libs .deps +.dirstamp libtool *.log stamp-h1 diff --git a/.travis.yml b/.travis.yml index 32074e25..0dbcd9c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ addons: - valgrind before_install: - - rm lexer.h lexer.c parser.h parser.c + - rm src/{lexer,parser}.{c,h} install: - bundle install --gemfile=docs/Gemfile @@ -41,8 +41,9 @@ script: after_script: - | if [ -n "$COVERAGE" ]; then - rm -rf .libs usr # don't care about coverage for libjq and bison - coveralls -e lexer.c -e parser.c -e jv_dtoa.c --gcov-options '\-lp' + rm -rf src/.libs usr # don't care about coverage for libjq and bison + coveralls --gcov-options '\-lp' \ + -e src/lexer.c -e src/parser.c -e src/jv_dtoa.c fi after_failure: diff --git a/Makefile.am b/Makefile.am index b4f0e3aa..60d6de93 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,13 +1,17 @@ ### C source files to be built and distributed. -LIBJQ_INCS = builtin.h bytecode.h compile.h exec_stack.h jq_parser.h \ - jv_alloc.h jv_dtoa.h jv_unicode.h jv_utf8_tables.h lexer.l \ - libm.h linker.h locfile.h opcode_list.h parser.y util.h - -LIBJQ_SRC = builtin.c bytecode.c compile.c execute.c jq_test.c jv.c \ - jv_alloc.c jv_aux.c jv_dtoa.c jv_file.c jv_parse.c jv_print.c \ - jv_unicode.c linker.c locfile.c util.c ${LIBJQ_INCS} +LIBJQ_INCS = src/builtin.h src/bytecode.h src/compile.h \ + src/exec_stack.h src/jq_parser.h src/jv_alloc.h src/jv_dtoa.h \ + src/jv_unicode.h src/jv_utf8_tables.h src/lexer.l src/libm.h \ + src/linker.h src/locfile.h src/opcode_list.h src/parser.y \ + src/util.h + +LIBJQ_SRC = src/builtin.c src/bytecode.c src/compile.c src/execute.c \ + src/jq_test.c src/jv.c src/jv_alloc.c src/jv_aux.c \ + src/jv_dtoa.c src/jv_file.c src/jv_parse.c src/jv_print.c \ + src/jv_unicode.c src/linker.c src/locfile.c src/util.c \ + ${LIBJQ_INCS} ### C build options @@ -21,10 +25,10 @@ ACLOCAL_AMFLAGS = -I config/m4 # While there is some autoconf macro support for lex/flex, it doesn't support # header file creation so we'll use good old make if MAINTAINER_MODE -BUILT_SOURCES = lexer.h lexer.c parser.h parser.c version.h -lexer.c: lexer.l - $(AM_V_LEX) flex -o lexer.c --header-file=lexer.h $< -lexer.h: lexer.c +BUILT_SOURCES = src/lexer.h src/lexer.c src/parser.h src/parser.c src/version.h +src/lexer.c: src/lexer.l + $(AM_V_LEX) flex -o src/lexer.c --header-file=src/lexer.h $< +src/lexer.h: src/lexer.c else BUILT_SOURCES = .y.c: @@ -45,7 +49,7 @@ libjq_la_SOURCES = ${LIBJQ_SRC} libjq_la_LIBADD = -lm libjq_la_LDFLAGS = -export-symbols-regex '^j[qv]_' -version-info 1:4:0 -include_HEADERS = jv.h jq.h +include_HEADERS = src/jv.h src/jq.h ### Running tests under Valgrind @@ -65,7 +69,7 @@ endif if ENABLE_ERROR_INJECTION lib_LTLIBRARIES += libinject_errors.la -libinject_errors_la_SOURCES = inject_errors.c +libinject_errors_la_SOURCES = src/inject_errors.c libinject_errors_la_LIBADD = -ldl libinject_errors_la_LDFLAGS = -module endif @@ -77,13 +81,13 @@ endif .FORCE: generate_ver = ver="`{ $(srcdir)/scripts/version || echo '$(VERSION)' ; } | sed 's/.*/\#define JQ_VERSION \"&\"/'`" .remake-version-h: .FORCE - @ $(generate_ver); test "x`cat version.h 2>/dev/null`" = "x$$ver" || touch .remake-version-h -version.h: .remake-version-h + @ $(generate_ver); test "x`cat src/version.h 2>/dev/null`" = "x$$ver" || touch .remake-version-h +src/version.h: .remake-version-h $(AM_V_GEN) $(generate_ver); echo "$$ver" > $@ -main.c: version.h +src/main.c: src/version.h bin_PROGRAMS = jq -jq_SOURCES = main.c version.h +jq_SOURCES = src/main.c src/version.h jq_LDFLAGS = -static-libtool-libs jq_LDADD = libjq.la -lm @@ -146,8 +150,8 @@ DOC_FILES = docs/content docs/public docs/templates docs/site.yml \ docs/default_manpage.md jq.1.default EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \ - jq.1.prebuilt jq.spec lexer.c lexer.h parser.c parser.h \ - scripts/version tests/jq.test tests/modules/.jq \ + jq.1.prebuilt jq.spec src/lexer.c src/lexer.h src/parser.c \ + src/parser.h scripts/version tests/jq.test tests/modules/.jq \ tests/modules/a.jq tests/modules/b/b.jq tests/modules/c/c.jq \ tests/modules/c/d.jq tests/modules/data.json \ tests/modules/lib/jq/e/e.jq tests/modules/lib/jq/f.jq \ @@ -185,9 +189,9 @@ if ENABLE_DOCS endif clean-local-gcov: - rm -f *.gcno *.gcda *.gcov + rm -f src/*.gcno src/*.gcda src/*.gcov clean-local: clean-local-docs clean-local-gcov - rm -f version.h .remake-version-h + rm -f src/version.h .remake-version-h .PHONY: clean-local-docs clean-local-gcov diff --git a/configure.ac b/configure.ac index b8aaa706..93a2fb6e 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ m4_include([m4/ax_prog_bison_version.m4]) dnl Created autoconf implementation thompson@dtosolutions, 26NOV12 AC_PREREQ([2.64]) AC_CONFIG_AUX_DIR([config]) -AM_INIT_AUTOMAKE([1.11.2 parallel-tests foreign -Wall]) +AM_INIT_AUTOMAKE([1.11.2 subdir-objects parallel-tests foreign -Wall]) AM_SILENT_RULES([yes]) AM_PROG_AR AM_MAINTAINER_MODE([enable]) diff --git a/builtin.c b/src/builtin.c index 990e24a9..990e24a9 100644 --- a/builtin.c +++ b/src/builtin.c diff --git a/builtin.h b/src/builtin.h index bca9bae1..bca9bae1 100644 --- a/builtin.h +++ b/src/builtin.h diff --git a/bytecode.c b/src/bytecode.c index 0ef154b8..0ef154b8 100644 --- a/bytecode.c +++ b/src/bytecode.c diff --git a/bytecode.h b/src/bytecode.h index 6cb49f7a..6cb49f7a 100644 --- a/bytecode.h +++ b/src/bytecode.h diff --git a/compile.c b/src/compile.c index 05f070cd..05f070cd 100644 --- a/compile.c +++ b/src/compile.c diff --git a/compile.h b/src/compile.h index 4572c9cc..4572c9cc 100644 --- a/compile.h +++ b/src/compile.h diff --git a/exec_stack.h b/src/exec_stack.h index 57e13650..57e13650 100644 --- a/exec_stack.h +++ b/src/exec_stack.h diff --git a/execute.c b/src/execute.c index 1a84f4c4..1a84f4c4 100644 --- a/execute.c +++ b/src/execute.c diff --git a/inject_errors.c b/src/inject_errors.c index b61a2713..b61a2713 100644 --- a/inject_errors.c +++ b/src/inject_errors.c diff --git a/jq_parser.h b/src/jq_parser.h index 809ace06..809ace06 100644 --- a/jq_parser.h +++ b/src/jq_parser.h diff --git a/jq_test.c b/src/jq_test.c index 7a396b94..7a396b94 100644 --- a/jq_test.c +++ b/src/jq_test.c diff --git a/jv_alloc.c b/src/jv_alloc.c index fd7b2579..fd7b2579 100644 --- a/jv_alloc.c +++ b/src/jv_alloc.c diff --git a/jv_alloc.h b/src/jv_alloc.h index 0e383794..0e383794 100644 --- a/jv_alloc.h +++ b/src/jv_alloc.h diff --git a/jv_dtoa.c b/src/jv_dtoa.c index 187a9d2d..187a9d2d 100644 --- a/jv_dtoa.c +++ b/src/jv_dtoa.c diff --git a/jv_dtoa.h b/src/jv_dtoa.h index 7aa5f08a..7aa5f08a 100644 --- a/jv_dtoa.h +++ b/src/jv_dtoa.h diff --git a/jv_file.c b/src/jv_file.c index 33d327c7..33d327c7 100644 --- a/jv_file.c +++ b/src/jv_file.c diff --git a/jv_parse.c b/src/jv_parse.c index 3102ed4f..3102ed4f 100644 --- a/jv_parse.c +++ b/src/jv_parse.c diff --git a/jv_print.c b/src/jv_print.c index 5f4f234b..5f4f234b 100644 --- a/jv_print.c +++ b/src/jv_print.c diff --git a/jv_unicode.c b/src/jv_unicode.c index fbf7454b..fbf7454b 100644 --- a/jv_unicode.c +++ b/src/jv_unicode.c diff --git a/jv_unicode.h b/src/jv_unicode.h index 579c910e..579c910e 100644 --- a/jv_unicode.h +++ b/src/jv_unicode.h diff --git a/jv_utf8_tables.h b/src/jv_utf8_tables.h index f1a4252f..f1a4252f 100644 --- a/jv_utf8_tables.h +++ b/src/jv_utf8_tables.h diff --git a/locfile.c b/src/locfile.c index 97bb3482..97bb3482 100644 --- a/locfile.c +++ b/src/locfile.c diff --git a/locfile.h b/src/locfile.h index 9931b009..9931b009 100644 --- a/locfile.h +++ b/src/locfile.h diff --git a/opcode_list.h b/src/opcode_list.h index e38d6843..e38d6843 100644 --- a/opcode_list.h +++ b/src/opcode_list.h |