]> granicus.if.org Git - jq/commitdiff
Move source files to src/
authorDavid Tolnay <dtolnay@gmail.com>
Mon, 24 Aug 2015 03:36:11 +0000 (20:36 -0700)
committerDavid Tolnay <dtolnay@gmail.com>
Mon, 24 Aug 2015 03:36:11 +0000 (20:36 -0700)
44 files changed:
.gitignore
.travis.yml
Makefile.am
configure.ac
src/builtin.c [moved from builtin.c with 100% similarity]
src/builtin.h [moved from builtin.h with 100% similarity]
src/bytecode.c [moved from bytecode.c with 100% similarity]
src/bytecode.h [moved from bytecode.h with 100% similarity]
src/compile.c [moved from compile.c with 100% similarity]
src/compile.h [moved from compile.h with 100% similarity]
src/exec_stack.h [moved from exec_stack.h with 100% similarity]
src/execute.c [moved from execute.c with 100% similarity]
src/inject_errors.c [moved from inject_errors.c with 100% similarity]
src/jq.h [moved from jq.h with 100% similarity]
src/jq_parser.h [moved from jq_parser.h with 100% similarity]
src/jq_test.c [moved from jq_test.c with 100% similarity]
src/jv.c [moved from jv.c with 100% similarity]
src/jv.h [moved from jv.h with 100% similarity]
src/jv_alloc.c [moved from jv_alloc.c with 100% similarity]
src/jv_alloc.h [moved from jv_alloc.h with 100% similarity]
src/jv_aux.c [moved from jv_aux.c with 100% similarity]
src/jv_dtoa.c [moved from jv_dtoa.c with 100% similarity]
src/jv_dtoa.h [moved from jv_dtoa.h with 100% similarity]
src/jv_file.c [moved from jv_file.c with 100% similarity]
src/jv_parse.c [moved from jv_parse.c with 100% similarity]
src/jv_print.c [moved from jv_print.c with 100% similarity]
src/jv_unicode.c [moved from jv_unicode.c with 100% similarity]
src/jv_unicode.h [moved from jv_unicode.h with 100% similarity]
src/jv_utf8_tables.h [moved from jv_utf8_tables.h with 100% similarity]
src/lexer.c [moved from lexer.c with 100% similarity]
src/lexer.h [moved from lexer.h with 100% similarity]
src/lexer.l [moved from lexer.l with 100% similarity]
src/libm.h [moved from libm.h with 100% similarity]
src/linker.c [moved from linker.c with 100% similarity]
src/linker.h [moved from linker.h with 100% similarity]
src/locfile.c [moved from locfile.c with 100% similarity]
src/locfile.h [moved from locfile.h with 100% similarity]
src/main.c [moved from main.c with 100% similarity]
src/opcode_list.h [moved from opcode_list.h with 100% similarity]
src/parser.c [moved from parser.c with 100% similarity]
src/parser.h [moved from parser.h with 100% similarity]
src/parser.y [moved from parser.y with 100% similarity]
src/util.c [moved from util.c with 100% similarity]
src/util.h [moved from util.h with 100% similarity]

index ef64ea1880912694f5062574b78c6ca762fc6b46..0e6c3362ed95022a427a5afbc46fe11abd7fd1f1 100644 (file)
@@ -19,6 +19,7 @@ jq.1
 # Autotools junk
 .libs
 .deps
+.dirstamp
 libtool
 *.log
 stamp-h1
index 32074e25aca4ccf6bbd713921caa68fc9aaf175a..0dbcd9c0b2ff4af40ab0510288633ca1fb4986e7 100644 (file)
@@ -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:
index b4f0e3aa8020c36cafc06873e2fa3c955c4b8290..60d6de934c2c64cf822d2be268327e616a7c586e 100644 (file)
@@ -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
index b8aaa706883a6060b7032c10d432f4c3d0ca5f09..93a2fb6e4b393e6ce03a5f6875603b391bc24c68 100644 (file)
@@ -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])
similarity index 100%
rename from builtin.c
rename to src/builtin.c
similarity index 100%
rename from builtin.h
rename to src/builtin.h
similarity index 100%
rename from bytecode.c
rename to src/bytecode.c
similarity index 100%
rename from bytecode.h
rename to src/bytecode.h
similarity index 100%
rename from compile.c
rename to src/compile.c
similarity index 100%
rename from compile.h
rename to src/compile.h
similarity index 100%
rename from exec_stack.h
rename to src/exec_stack.h
similarity index 100%
rename from execute.c
rename to src/execute.c
similarity index 100%
rename from inject_errors.c
rename to src/inject_errors.c
diff --git a/jq.h b/src/jq.h
similarity index 100%
rename from jq.h
rename to src/jq.h
similarity index 100%
rename from jq_parser.h
rename to src/jq_parser.h
similarity index 100%
rename from jq_test.c
rename to src/jq_test.c
diff --git a/jv.c b/src/jv.c
similarity index 100%
rename from jv.c
rename to src/jv.c
diff --git a/jv.h b/src/jv.h
similarity index 100%
rename from jv.h
rename to src/jv.h
similarity index 100%
rename from jv_alloc.c
rename to src/jv_alloc.c
similarity index 100%
rename from jv_alloc.h
rename to src/jv_alloc.h
similarity index 100%
rename from jv_aux.c
rename to src/jv_aux.c
similarity index 100%
rename from jv_dtoa.c
rename to src/jv_dtoa.c
similarity index 100%
rename from jv_dtoa.h
rename to src/jv_dtoa.h
similarity index 100%
rename from jv_file.c
rename to src/jv_file.c
similarity index 100%
rename from jv_parse.c
rename to src/jv_parse.c
similarity index 100%
rename from jv_print.c
rename to src/jv_print.c
similarity index 100%
rename from jv_unicode.c
rename to src/jv_unicode.c
similarity index 100%
rename from jv_unicode.h
rename to src/jv_unicode.h
similarity index 100%
rename from jv_utf8_tables.h
rename to src/jv_utf8_tables.h
similarity index 100%
rename from lexer.c
rename to src/lexer.c
similarity index 100%
rename from lexer.h
rename to src/lexer.h
similarity index 100%
rename from lexer.l
rename to src/lexer.l
similarity index 100%
rename from libm.h
rename to src/libm.h
similarity index 100%
rename from linker.c
rename to src/linker.c
similarity index 100%
rename from linker.h
rename to src/linker.h
similarity index 100%
rename from locfile.c
rename to src/locfile.c
similarity index 100%
rename from locfile.h
rename to src/locfile.h
similarity index 100%
rename from main.c
rename to src/main.c
similarity index 100%
rename from opcode_list.h
rename to src/opcode_list.h
similarity index 100%
rename from parser.c
rename to src/parser.c
similarity index 100%
rename from parser.h
rename to src/parser.h
similarity index 100%
rename from parser.y
rename to src/parser.y
similarity index 100%
rename from util.c
rename to src/util.c
similarity index 100%
rename from util.h
rename to src/util.h