Skip to content

Commit

Permalink
Move oniguruma and decNumber to vendor directory (#3234)
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny authored Feb 5, 2025
1 parent 2755664 commit 9727721
Show file tree
Hide file tree
Showing 38 changed files with 14 additions and 16 deletions.
4 changes: 1 addition & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.gitattributes export-ignore
.gitignore export-ignore
* text=auto eol=lf

# vendored files
src/decNumber/** linguist-vendored
vendor/** linguist-vendored

# generated files
src/lexer.[ch] linguist-generated=true
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "modules/oniguruma"]
path = modules/oniguruma
[submodule "vendor/oniguruma"]
path = vendor/oniguruma
url = https://github.com/kkos/oniguruma.git
14 changes: 7 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ 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 src/decNumber/decContext.h src/decNumber/decNumber.h \
src/decNumber/decNumberLocal.h src/jv_dtoa_tsd.h src/jv_thread.h \
src/jv_private.h
src/util.h src/jv_dtoa_tsd.h src/jv_thread.h src/jv_private.h \
vendor/decNumber/decContext.h vendor/decNumber/decNumber.h \
vendor/decNumber/decNumberLocal.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 \
src/decNumber/decContext.c src/decNumber/decNumber.c \
src/jv_dtoa_tsd.c \
vendor/decNumber/decContext.c vendor/decNumber/decNumber.c \
${LIBJQ_INCS}

### C build options
Expand Down Expand Up @@ -69,7 +69,7 @@ if ENABLE_UBSAN
AM_CFLAGS += -fsanitize=undefined
endif

AM_CPPFLAGS = -I$(srcdir)/src
AM_CPPFLAGS = -I$(srcdir)/src -I$(srcdir)/vendor

### Running tests under Valgrind

Expand Down Expand Up @@ -176,8 +176,8 @@ CLEANFILES += jq.1
### Build oniguruma

if BUILD_ONIGURUMA
libjq_la_LIBADD += modules/oniguruma/src/.libs/libonig.la
SUBDIRS = modules/oniguruma
libjq_la_LIBADD += vendor/oniguruma/src/.libs/libonig.la
SUBDIRS = vendor/oniguruma
endif

AM_CFLAGS += $(onig_CFLAGS)
Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ AS_IF([test "x$with_oniguruma" != xno], [
AC_MSG_NOTICE([Oniguruma was not found. Will use the packaged oniguruma.])
])
])
AS_IF([test "x$build_oniguruma" = xyes && test -f "${srcdir}/modules/oniguruma/configure.ac" ], [
onig_CFLAGS="-I${srcdir}/modules/oniguruma/src"
onig_LDFLAGS="-L${srcdir}/modules/oniguruma/src -Wl,-rpath,${libdir}"
AC_CONFIG_SUBDIRS([modules/oniguruma])
AS_IF([test "x$build_oniguruma" = xyes && test -f "${srcdir}/vendor/oniguruma/configure.ac" ], [
onig_CFLAGS="-I${srcdir}/vendor/oniguruma/src"
onig_LDFLAGS="-L${srcdir}/vendor/oniguruma/src -Wl,-rpath,${libdir}"
AC_CONFIG_SUBDIRS([vendor/oniguruma])
AC_DEFINE([HAVE_LIBONIG],1,[Define to 1 if the system includes libonig])
])
CFLAGS="$save_CFLAGS"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9727721

Please sign in to comment.