Skip to content
Myr

Makefile.am

This file

Path

Makefile.am

273 lines · 10.0 KiB

Last changed by

Drop the date from the committed man page (#3659)itchynybefore adoption17b87d2

History of this file

Take it

The walk stopped after 200 commits: lines older than fa6a2ff point at it.

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 1–7why, one step back
1
2### C source files to be built and distributed.34LIBJQ_INCS = src/builtin.h src/bytecode.h src/compile.h \5 src/exec_stack.h src/jq_parser.h src/jv_alloc.h src/jv_dtoa.h \6 src/jv_unicode.h src/jv_utf8_tables.h src/lexer.l src/libm.h \7 src/linker.h src/locfile.h src/opcode_list.h src/parser.y \

Parse the full ISO 8601 grammar in `fromdateiso8601` (#3617)itchynybefore adoptionfd25c3e

lines 8–9why, one step back
8 src/util.h src/iso8601.h \
9 src/jv_dtoa_tsd.h src/jv_thread.h src/jv_private.h \

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 10–16why, one step back
10 vendor/decNumber/decContext.h vendor/decNumber/decNumber.h \
11 vendor/decNumber/decNumberLocal.h1213LIBJQ_SRC = src/builtin.c src/bytecode.c src/compile.c src/execute.c \14 src/jq_test.c src/jv.c src/jv_alloc.c src/jv_aux.c \15 src/jv_dtoa.c src/jv_file.c src/jv_parse.c src/jv_print.c \16 src/jv_unicode.c src/linker.c src/locfile.c src/util.c \

Parse the full ISO 8601 grammar in `fromdateiso8601` (#3617)itchynybefore adoptionfd25c3e

line 17why, one step back
17 src/iso8601.c src/jv_dtoa_tsd.c \

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 18–23why, one step back
18 vendor/decNumber/decContext.c vendor/decNumber/decNumber.c \
19 ${LIBJQ_INCS}2021### C build options2223AM_CFLAGS = -Wextra -Wall -Wno-unused-parameter -Wno-unused-function \

Fix warning: a function definition without a prototype is deprecated (#3259)itchynybefore adoptiona8f27cc

line 24why, one step back
24 -Woverlength-strings -Wstrict-prototypes

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 25–37why, one step back
25
26if WIN3227AM_CFLAGS += -municode28endif2930ACLOCAL_AMFLAGS = -I config/m43132### Generating the lexer and parser3334# While there is some autoconf macro support for lex/flex, it doesn't support35# header file creation so we'll use good old make36if MAINTAINER_MODE37BUILT_SOURCES = src/lexer.h src/lexer.c src/parser.h src/parser.c \

Revert "Move closer to the standard autotools idiom. (#3187)" (#3255)itchynybefore adoptionabde27d

line 38why, one step back
38 src/builtin.inc src/config_opts.inc src/version.h

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 39–42why, one step back
39src/lexer.c: src/lexer.l
40 $(AM_V_LEX) flex -o src/lexer.c --header-file=src/lexer.h $<41src/lexer.h: src/lexer.c42else

Revert "Move closer to the standard autotools idiom. (#3187)" (#3255)itchynybefore adoptionabde27d

line 43why, one step back
43BUILT_SOURCES = src/builtin.inc src/config_opts.inc src/version.h

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

line 44why, one step back
44.y.c:

Support building with --disable-maintainer-mode and source != build dir (#3518)Peter Kjellerstedtbefore adoption27f417f

lines 45–48why, one step back
45 $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@
46 $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h47 $(AM_V_YACC) touch $@ $*.h48

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

line 49why, one step back
49.l.c:

Support building with --disable-maintainer-mode and source != build dir (#3518)Peter Kjellerstedtbefore adoption27f417f

lines 50–52why, one step back
50 $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@
51 $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h52 $(AM_V_LEX) touch $@ $*.h

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 53–75why, one step back
53endif
5455# Tell YACC (Bison) autoconf macros that you want a header file created.56# If the --warnings=all fails, you probably have an old version of Bison57# macOS ships an old Bison, so update with Homebrew or MacPorts.58AM_YFLAGS = --warnings=all -Wno-yacc -d5960### libjq6162lib_LTLIBRARIES = libjq.la63libjq_la_SOURCES = ${LIBJQ_SRC}64libjq_la_LIBADD = -lm65libjq_la_LDFLAGS = $(onig_LDFLAGS) -export-symbols-regex '^j[qv]_' -version-info 1:4:06667if WIN3268libjq_la_LIBADD += -lshlwapi69libjq_la_LDFLAGS += -no-undefined70endif7172include_HEADERS = src/jv.h src/jq.h7374AM_CPPFLAGS = -I$(srcdir)/src -I$(srcdir)/vendor75

Disable Valgrind by default during testing (#3269)itchynybefore adoption5df471f

line 76why, one step back
76### Address sanitizer (ASan)

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 77–80why, one step back
77
78if ENABLE_ASAN79AM_CFLAGS += -fsanitize=address80endif

Disable Valgrind by default during testing (#3269)itchynybefore adoption5df471f

lines 81–85why, one step back
81
82### Undefined Behavior Sanitizer8384if ENABLE_UBSAN85AM_CFLAGS += -fsanitize=undefined

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 86–104why, one step back
86endif
8788### Code coverage with gcov8990if ENABLE_GCOV91AM_CFLAGS += --coverage --no-inline92endif9394### Error injection for testing9596if ENABLE_ERROR_INJECTION97lib_LTLIBRARIES += libinject_errors.la98libinject_errors_la_SOURCES = src/inject_errors.c99libinject_errors_la_LIBADD = -ldl100libinject_errors_la_LDFLAGS = -module101endif102103### Building the jq binary104

Revert "Move closer to the standard autotools idiom. (#3187)" (#3255)itchynybefore adoptionabde27d

lines 105–107why, one step back
105# Remake the version.h header file if, and only if, the git ID has changed
106.PHONY: .FORCE107.FORCE:

Fix build on old Macs (#3336)Binbin Qianbefore adoption023f274

line 108why, one step back
108generate_ver = ver="`{ $(srcdir)/scripts/version || echo '$(VERSION)' ; } | xargs printf '\043define JQ_VERSION \"%s\"\n'`"

Revert "Move closer to the standard autotools idiom. (#3187)" (#3255)itchynybefore adoptionabde27d

lines 109–121why, one step back
109.remake-version-h: .FORCE
110 @ $(generate_ver); test "x`cat src/version.h 2>/dev/null`" = "x$$ver" || touch .remake-version-h111src/version.h: .remake-version-h112 mkdir -p src113 $(AM_V_GEN) $(generate_ver); echo "$$ver" > $@114src/config_opts.inc:115 mkdir -p src116 $(AM_V_GEN) if test -x ./config.status; then \117 ./config.status --config; \118 else echo "(unknown)"; \119 fi | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/"/' -e 's/^/#define JQ_CONFIG /' > $@120src/main.c: src/version.h src/config_opts.inc121

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 122–131why, one step back
122src/builtin.inc: $(srcdir)/src/builtin.jq
123 mkdir -p src124 $(AM_V_GEN) od -v -A n -t o1 -- $< | \125 sed -e 's/$$/ /' \126 -e 's/\([0123456789]\) /\1, /g' \127 -e 's/ $$//' \128 -e 's/ 0/ 0/g' \129 -e 's/ \([123456789]\)/ 0\1/g' > $@130src/builtin.o: src/builtin.inc131

Revert "Move closer to the standard autotools idiom. (#3187)" (#3255)itchynybefore adoptionabde27d

line 132why, one step back
132CLEANFILES = src/version.h .remake-version-h src/builtin.inc src/config_opts.inc

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 133–147why, one step back
133
134bin_PROGRAMS = jq135jq_SOURCES = src/main.c136jq_LDADD = libjq.la -lm137138if ENABLE_ALL_STATIC139jq_LDFLAGS = -all-static140endif141142### Tests (make check)143144TESTS = tests/mantest tests/jqtest tests/shtest tests/utf8test tests/base64test tests/uritest145if !WIN32146TESTS += tests/optionaltest147endif

Disable Valgrind by default during testing (#3269)itchynybefore adoption5df471f

lines 148–152why, one step back
148
149AM_TESTS_ENVIRONMENT = JQ=$(abs_builddir)/jq150if ENABLE_VALGRIND151AM_TESTS_ENVIRONMENT += ENABLE_VALGRIND=1152endif

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 153–192why, one step back
153
154# This is a magic make variable that causes it to treat tests/man.test as a155# DATA-type dependency for the check target. As a result, it will attempt to156# run any defined targets for tests/man.test as a dependency for check. This157# allows us to ensure that the tests are up-to-date if the manual has been updated158check_DATA = tests/man.test159160### Building the man tests161162# We use the examples in the manual as additional tests, to ensure they always work.163# As a result, we need to rebuild the tests if the manual has been updated.164# Making changes to the manpage without having the python deps means your165# tests won't run. If you aren't making changes to the examples, you probably166# don't care. But if you are, then you need to run the tests anyway.167tests/man.test tests/manonig.test: $(srcdir)/docs/content/manual/dev/manual.yml168if ENABLE_DOCS169 $(AM_V_GEN) ( cd ${abs_srcdir}/docs && \170 $(PIPENV) run python validate_manual_schema.py content/manual/dev/manual.yml && \171 $(PIPENV) run python build_mantests.py )172else173 @echo Changes to the manual.yml require docs to be enabled to update the manual test.174 @echo As a result, the manual test is out of date.175endif176177### Building the manpage178179# We build the docs from the manpage yml. If no changes have been made to the180# manpage, then we'll end up using the cached version. Otherwise, we need to181# rebuild it.182man_MANS = jq.1183jq.1.prebuilt: $(srcdir)/docs/content/manual/dev/manual.yml184if ENABLE_DOCS185 $(AM_V_GEN) ( cd ${abs_srcdir}/docs && \186 $(PIPENV) run python validate_manual_schema.py content/manual/dev/manual.yml && \187 $(PIPENV) run python build_manpage.py ) > $@188else189 @echo Changes to the manual.yml require docs to be enabled to update the manpage.190 @echo As a result, the manpage is out of date.191endif192

Drop the date from the committed man page (#3659)itchynybefore adoption17b87d2

lines 193–196why, one step back
193# The committed manpage has no date to avoid merge conflicts. Stamp the date
194# of the last commit when building in a git repository, including on make195# dist, so that release tarballs ship a dated jq.1. Respect SOURCE_DATE_EPOCH196# so that distribution builds can pin the date.

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

line 197why, one step back
197jq.1: jq.1.prebuilt

Drop the date from the committed man page (#3659)itchynybefore adoption17b87d2

lines 198–204why, one step back
198 $(AM_V_GEN) date=`if test -n "$$SOURCE_DATE_EPOCH"; then \
199 date -u -d "@$$SOURCE_DATE_EPOCH" +%F 2>/dev/null || \200 date -u -r "$$SOURCE_DATE_EPOCH" +%F 2>/dev/null; \201 elif test -e $(srcdir)/.git; then \202 cd $(srcdir) && git log -1 --format=%cd --date=short 2>/dev/null; \203 fi`; \204 sed 's/^\.TH "JQ" "1" ""/.TH "JQ" "1" "'"$$date"'"/' $(srcdir)/jq.1.prebuilt > $@

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 205–211why, one step back
205
206CLEANFILES += jq.1207208### Build oniguruma209210if BUILD_ONIGURUMA211libjq_la_LIBADD += vendor/oniguruma/src/.libs/libonig.la

Add oniguruma library path to link jq programitchynybefore adoption0b1ef46

line 212why, one step back
212jq_LDADD += vendor/oniguruma/src/.libs/libonig.la

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 213–233why, one step back
213SUBDIRS = vendor/oniguruma
214endif215216AM_CFLAGS += $(onig_CFLAGS)217218if WITH_ONIGURUMA219TESTS += tests/onigtest tests/manonigtest220endif221222### Packaging223224install-binaries: $(BUILT_SOURCES)225 $(MAKE) $(AM_MAKEFLAGS) install-exec226227DOC_FILES = docs/content docs/public docs/templates \228 docs/Pipfile docs/Pipfile.lock docs/build_manpage.py \229 docs/build_mantests.py docs/build_website.py docs/README.md \230 docs/validate_manual_schema.py docs/manual_schema.yml231232EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \233 jq.1.prebuilt jq.spec src/lexer.c src/lexer.h src/parser.c \

Revert "Move closer to the standard autotools idiom. (#3187)" (#3255)itchynybefore adoptionabde27d

lines 234–235why, one step back
234 src/parser.h src/version.h src/builtin.jq scripts/version \
235 libjq.pc \

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 236–237why, one step back
236 tests/modules/a.jq tests/modules/b/b.jq tests/modules/c/c.jq \
237 tests/modules/c/d.jq tests/modules/data.json \

Register imported libraries in dependency order (#3620)itchynybefore adoption12cdd95

lines 238–239why, one step back
238 tests/modules/deep1.jq tests/modules/deep2a.jq \
239 tests/modules/deep2b.jq tests/modules/deep3.jq \

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 240–247why, one step back
240 tests/modules/home1/.jq tests/modules/home2/.jq/g.jq \
241 tests/modules/lib/jq/e/e.jq tests/modules/lib/jq/f.jq \242 tests/modules/shadow1.jq tests/modules/shadow2.jq \243 tests/modules/syntaxerror/syntaxerror.jq \244 tests/modules/test_bind_order.jq \245 tests/modules/test_bind_order0.jq \246 tests/modules/test_bind_order1.jq \247 tests/modules/test_bind_order2.jq \

Detect circular module imports to prevent stack overflowitchynybefore adoptionf58787c

lines 248–249why, one step back
248 tests/modules/cycle_a.jq tests/modules/cycle_b.jq \
249 tests/modules/cycle_self.jq \

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 250–253why, one step back
250 tests/onig.supp tests/local.supp \
251 tests/setup tests/torture/input0.json \252 tests/optional.test tests/man.test tests/manonig.test \253 tests/jq.test tests/onig.test tests/base64.test tests/uri.test \

Fix slurping raw input not to corrupt multi-byte characters (fix #3389) (#3421)itchynybefore adoption5529788

line 254why, one step back
254 tests/jq-f-test.sh \

website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff

lines 255–273why, one step back
255 tests/no-main-program.jq tests/yes-main-program.jq
256257AM_DISTCHECK_CONFIGURE_FLAGS=--with-oniguruma=builtin258259# README.md is expected in GitHub projects, good stuff in it, so we'll260# distribute it and install it with the package in the doc directory.261dist_doc_DATA = README.md NEWS.md COPYING AUTHORS262263pkgconfigdir = $(libdir)/pkgconfig264pkgconfig_DATA = libjq.pc265266RELEASE ?= 1267rpm: dist jq.spec268 @echo "Packaging jq as an RPM ..."269 mkdir -p rpm/SOURCES rpm/BUILD rpm/BUILDROOT rpm/RPMS rpm/SPECS270 cp jq-$(VERSION).tar.gz rpm/SOURCES/271 rpmbuild -tb --define "_topdir ${PWD}/rpm" --define "_prefix /usr" --define "myver $(VERSION)" --define "myrel ${RELEASE}" rpm/SOURCES/jq-$(VERSION).tar.gz272 find rpm/RPMS/ -name "*.rpm" -exec mv {} ./ \;273 rm -rf rpm