This partially reverts commit d8463c2549.
Revert reason: version string should be updated more often.
This commit is contained in:
1 parent
aea8efaf0b
commit
abde27d0f5
4 files changed
+27
-11
No files matched your search
+3
-2
@@ -18,8 +18,7 @@ jq.1
|
|||||||
|
|
||||||
# Generated source
|
# Generated source
|
||||||
src/builtin.inc
|
src/builtin.inc
|
||||||
src/config.h.in
|
src/config_opts.inc
|
||||||
src/config.h
|
|
||||||
*.pc
|
*.pc
|
||||||
|
|
||||||
# Autotools junk
|
# Autotools junk
|
||||||
@@ -41,6 +40,8 @@ jq-*.zip
|
|||||||
configure
|
configure
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
version.h
|
||||||
|
.remake-version-h
|
||||||
config.cache
|
config.cache
|
||||||
*.rpm
|
*.rpm
|
||||||
m4/libtool.m4
|
m4/libtool.m4
|
||||||
|
|||||||
+22
-4
@@ -34,12 +34,12 @@ ACLOCAL_AMFLAGS = -I config/m4
|
|||||||
# header file creation so we'll use good old make
|
# header file creation so we'll use good old make
|
||||||
if MAINTAINER_MODE
|
if MAINTAINER_MODE
|
||||||
BUILT_SOURCES = src/lexer.h src/lexer.c src/parser.h src/parser.c \
|
BUILT_SOURCES = src/lexer.h src/lexer.c src/parser.h src/parser.c \
|
||||||
src/builtin.inc
|
src/builtin.inc src/config_opts.inc src/version.h
|
||||||
src/lexer.c: src/lexer.l
|
src/lexer.c: src/lexer.l
|
||||||
$(AM_V_LEX) flex -o src/lexer.c --header-file=src/lexer.h $<
|
$(AM_V_LEX) flex -o src/lexer.c --header-file=src/lexer.h $<
|
||||||
src/lexer.h: src/lexer.c
|
src/lexer.h: src/lexer.c
|
||||||
else
|
else
|
||||||
BUILT_SOURCES = src/builtin.inc
|
BUILT_SOURCES = src/builtin.inc src/config_opts.inc src/version.h
|
||||||
.y.c:
|
.y.c:
|
||||||
$(AM_V_YACC) echo "NOT building parser.c!"
|
$(AM_V_YACC) echo "NOT building parser.c!"
|
||||||
.l.c:
|
.l.c:
|
||||||
@@ -96,6 +96,23 @@ endif
|
|||||||
|
|
||||||
### Building the jq binary
|
### Building the jq binary
|
||||||
|
|
||||||
|
# Remake the version.h header file if, and only if, the git ID has changed
|
||||||
|
.PHONY: .FORCE
|
||||||
|
.FORCE:
|
||||||
|
generate_ver = ver="`{ $(srcdir)/scripts/version || echo '$(VERSION)' ; } | sed 's/.*/\x23define JQ_VERSION \"&\"/'`"
|
||||||
|
.remake-version-h: .FORCE
|
||||||
|
@ $(generate_ver); test "x`cat src/version.h 2>/dev/null`" = "x$$ver" || touch .remake-version-h
|
||||||
|
src/version.h: .remake-version-h
|
||||||
|
mkdir -p src
|
||||||
|
$(AM_V_GEN) $(generate_ver); echo "$$ver" > $@
|
||||||
|
src/config_opts.inc:
|
||||||
|
mkdir -p src
|
||||||
|
$(AM_V_GEN) if test -x ./config.status; then \
|
||||||
|
./config.status --config; \
|
||||||
|
else echo "(unknown)"; \
|
||||||
|
fi | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/"/' -e 's/^/#define JQ_CONFIG /' > $@
|
||||||
|
src/main.c: src/version.h src/config_opts.inc
|
||||||
|
|
||||||
src/builtin.inc: $(srcdir)/src/builtin.jq
|
src/builtin.inc: $(srcdir)/src/builtin.jq
|
||||||
mkdir -p src
|
mkdir -p src
|
||||||
$(AM_V_GEN) od -v -A n -t o1 -- $< | \
|
$(AM_V_GEN) od -v -A n -t o1 -- $< | \
|
||||||
@@ -106,7 +123,7 @@ src/builtin.inc: $(srcdir)/src/builtin.jq
|
|||||||
-e 's/ \([123456789]\)/ 0\1/g' > $@
|
-e 's/ \([123456789]\)/ 0\1/g' > $@
|
||||||
src/builtin.o: src/builtin.inc
|
src/builtin.o: src/builtin.inc
|
||||||
|
|
||||||
CLEANFILES = src/builtin.inc
|
CLEANFILES = src/version.h .remake-version-h src/builtin.inc src/config_opts.inc
|
||||||
|
|
||||||
bin_PROGRAMS = jq
|
bin_PROGRAMS = jq
|
||||||
jq_SOURCES = src/main.c
|
jq_SOURCES = src/main.c
|
||||||
@@ -197,7 +214,8 @@ DOC_FILES = docs/content docs/public docs/templates \
|
|||||||
|
|
||||||
EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \
|
EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \
|
||||||
jq.1.prebuilt jq.spec src/lexer.c src/lexer.h src/parser.c \
|
jq.1.prebuilt jq.spec src/lexer.c src/lexer.h src/parser.c \
|
||||||
src/parser.h src/builtin.jq scripts/version libjq.pc \
|
src/parser.h src/version.h src/builtin.jq scripts/version \
|
||||||
|
libjq.pc \
|
||||||
tests/modules/a.jq tests/modules/b/b.jq tests/modules/c/c.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/c/d.jq tests/modules/data.json \
|
||||||
tests/modules/home1/.jq tests/modules/home2/.jq/g.jq \
|
tests/modules/home1/.jq tests/modules/home2/.jq/g.jq \
|
||||||
|
|||||||
@@ -236,9 +236,6 @@ AC_C_BIGENDIAN(
|
|||||||
AC_MSG_ERROR(universal endianness not supported)
|
AC_MSG_ERROR(universal endianness not supported)
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([JQ_CONFIG], ["$ac_cs_config"], [The options jq was configured with.])
|
|
||||||
AH_BOTTOM([#define JQ_VERSION PACKAGE_VERSION])
|
|
||||||
|
|
||||||
dnl Oniguruma
|
dnl Oniguruma
|
||||||
AC_ARG_WITH([oniguruma],
|
AC_ARG_WITH([oniguruma],
|
||||||
[AS_HELP_STRING([--with-oniguruma=prefix],
|
[AS_HELP_STRING([--with-oniguruma=prefix],
|
||||||
@@ -287,8 +284,6 @@ AM_CONDITIONAL([BUILD_ONIGURUMA], [test "x$build_oniguruma" = xyes])
|
|||||||
AM_CONDITIONAL([WITH_ONIGURUMA], [test "x$with_oniguruma" != xno])
|
AM_CONDITIONAL([WITH_ONIGURUMA], [test "x$with_oniguruma" != xno])
|
||||||
|
|
||||||
AC_CONFIG_MACRO_DIRS([config/m4 m4])
|
AC_CONFIG_MACRO_DIRS([config/m4 m4])
|
||||||
AC_CONFIG_HEADERS([src/config.h])
|
|
||||||
CFLAGS="$CFLAGS --include src/config.h"
|
|
||||||
AC_CONFIG_FILES([Makefile libjq.pc])
|
AC_CONFIG_FILES([Makefile libjq.pc])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
@@ -33,6 +33,8 @@ extern void jv_tsd_dtoa_ctx_init();
|
|||||||
#include "jv.h"
|
#include "jv.h"
|
||||||
#include "jq.h"
|
#include "jq.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "src/version.h"
|
||||||
|
#include "src/config_opts.inc"
|
||||||
|
|
||||||
int jq_testsuite(jv lib_dirs, int verbose, int argc, char* argv[]);
|
int jq_testsuite(jv lib_dirs, int verbose, int argc, char* argv[]);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user