-
-
Save Zetten/d9ab2ddb12abe8214221d8a577132b63 to your computer and use it in GitHub Desktop.
bazel build jq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
licenses(["notice"]) | |
cc_library( | |
name = "_jq_generated_hdrs", | |
hdrs = [ | |
"src/version.h", | |
":src/builtin.inc", | |
], | |
include_prefix = "src", | |
strip_include_prefix = "src", | |
) | |
cc_library( | |
name = "_jq", | |
srcs = [ | |
"src/builtin.c", | |
"src/builtin.h", | |
"src/bytecode.c", | |
"src/bytecode.h", | |
"src/compile.c", | |
"src/compile.h", | |
"src/exec_stack.h", | |
"src/execute.c", | |
"src/jq_parser.h", | |
"src/jq_test.c", | |
"src/jv.c", | |
"src/jv_alloc.c", | |
"src/jv_alloc.h", | |
"src/jv_aux.c", | |
"src/jv_dtoa.c", | |
"src/jv_dtoa.h", | |
"src/jv_file.c", | |
"src/jv_parse.c", | |
"src/jv_print.c", | |
"src/jv_unicode.c", | |
"src/jv_unicode.h", | |
"src/jv_utf8_tables.h", | |
"src/lexer.c", | |
"src/lexer.h", | |
"src/libm.h", | |
"src/linker.c", | |
"src/linker.h", | |
"src/locfile.c", | |
"src/locfile.h", | |
"src/opcode_list.h", | |
"src/parser.c", | |
"src/parser.h", | |
"src/util.c", | |
"src/util.h", | |
], | |
copts = [ | |
"-DPACKAGE_NAME=\"jq\"", | |
"-DPACKAGE_TARNAME=\"jq\"", | |
"-DPACKAGE_VERSION=\"1.6\"", | |
"-DPACKAGE_STRING=\"jq\ 1.6\"", | |
"-DPACKAGE_BUGREPORT=\"https://github.com/stedolan/jq/issues\"", | |
"-DPACKAGE_URL=\"https://stedolan.github.io/jq\"", | |
"-DPACKAGE=\"jq\"", | |
"-DVERSION=\"1.6\"", | |
"-DSTDC_HEADERS=1", | |
"-DHAVE_SYS_TYPES_H=1", | |
"-DHAVE_SYS_STAT_H=1", | |
"-DHAVE_STDLIB_H=1", | |
"-DHAVE_STRING_H=1", | |
"-DHAVE_MEMORY_H=1", | |
"-DHAVE_STRINGS_H=1", | |
"-DHAVE_INTTYPES_H=1", | |
"-DHAVE_STDINT_H=1", | |
"-DHAVE_UNISTD_H=1", | |
"-DHAVE_DLFCN_H=1", | |
"-DHAVE_MEMMEM=1", | |
"-DHAVE_MKSTEMP=1", | |
"-DHAVE_ALLOCA_H=1", | |
"-DHAVE_ALLOCA=1", | |
"-DHAVE_ISATTY=1", | |
"-DHAVE_STRPTIME=1", | |
"-DHAVE_STRFTIME=1", | |
"-DHAVE_TIMEGM=1", | |
"-DHAVE_GMTIME_R=1", | |
"-DHAVE_GMTIME=1", | |
"-DHAVE_LOCALTIME_R=1", | |
"-DHAVE_LOCALTIME=1", | |
"-DHAVE_GETTIMEOFDAY=1", | |
"-DHAVE_TM_TM_GMT_OFF=1", | |
"-DHAVE_ACOS=1", | |
"-DHAVE_ACOSH=1", | |
"-DHAVE_ASIN=1", | |
"-DHAVE_ASINH=1", | |
"-DHAVE_ATAN2=1", | |
"-DHAVE_ATAN=1", | |
"-DHAVE_ATANH=1", | |
"-DHAVE_CBRT=1", | |
"-DHAVE_CEIL=1", | |
"-DHAVE_COPYSIGN=1", | |
"-DHAVE_COS=1", | |
"-DHAVE_COSH=1", | |
"-DHAVE_DREM=1", | |
"-DHAVE_ERF=1", | |
"-DHAVE_ERFC=1", | |
"-DHAVE_EXP10=1", | |
"-DHAVE_EXP2=1", | |
"-DHAVE_EXP=1", | |
"-DHAVE_EXPM1=1", | |
"-DHAVE_FABS=1", | |
"-DHAVE_FDIM=1", | |
"-DHAVE_FLOOR=1", | |
"-DHAVE_FMA=1", | |
"-DHAVE_FMAX=1", | |
"-DHAVE_FMIN=1", | |
"-DHAVE_FMOD=1", | |
"-DHAVE_FREXP=1", | |
"-DHAVE_GAMMA=1", | |
"-DHAVE_HYPOT=1", | |
"-DHAVE_J0=1", | |
"-DHAVE_J1=1", | |
"-DHAVE_JN=1", | |
"-DHAVE_LDEXP=1", | |
"-DHAVE_LGAMMA=1", | |
"-DHAVE_LOG10=1", | |
"-DHAVE_LOG1P=1", | |
"-DHAVE_LOG2=1", | |
"-DHAVE_LOG=1", | |
"-DHAVE_LOGB=1", | |
"-DHAVE_MODF=1", | |
"-DHAVE_LGAMMA_R=1", | |
"-DHAVE_NEARBYINT=1", | |
"-DHAVE_NEXTAFTER=1", | |
"-DHAVE_NEXTTOWARD=1", | |
"-DHAVE_POW=1", | |
"-DHAVE_REMAINDER=1", | |
"-DHAVE_RINT=1", | |
"-DHAVE_ROUND=1", | |
"-DHAVE_SCALB=1", | |
"-DHAVE_SCALBLN=1", | |
"-DHAVE_SIGNIFICAND=1", | |
"-DHAVE_SIN=1", | |
"-DHAVE_SINH=1", | |
"-DHAVE_SQRT=1", | |
"-DHAVE_TAN=1", | |
"-DHAVE_TANH=1", | |
"-DHAVE_TGAMMA=1", | |
"-DHAVE_TRUNC=1", | |
"-DHAVE_Y0=1", | |
"-DHAVE_Y1=1", | |
"-DHAVE_YN=1", | |
"-DHAVE___THREAD=1", | |
"-DIEEE_8087=1", | |
"-DHAVE_LIBONIG=1", | |
], | |
deps = [ | |
":_jq_generated_hdrs", | |
"@onig", | |
], | |
) | |
cc_binary( | |
name = "jq", | |
srcs = [ | |
"src/main.c", | |
], | |
copts = ["-lm"], | |
visibility = ["//visibility:public"], | |
deps = ["_jq"], | |
) | |
genrule( | |
name = "_src_builtin_inc", | |
srcs = ["src/builtin.jq"], | |
outs = ["src/builtin.inc"], | |
cmd = "sed -e 's/\\\/\\\\\\\/g' -e 's/\"/\\\\\"/g' -e 's/^/\"/' -e 's/$$/\\\\n\"/' $< > $@", | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
def jq_repositories(): | |
http_archive( | |
name = "jq", | |
build_file = "//third_party/jq:jq.BUILD", | |
sha256 = "5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72", | |
strip_prefix = "jq-1.6", | |
urls = ["https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz"], | |
) | |
http_archive( | |
name = "onig", | |
build_file = "//third_party/jq:onig.BUILD", | |
sha256 = "4669d22ff7e0992a7e93e116161cac9c0949cd8960d1c562982026726f0e6d53", | |
strip_prefix = "onig-6.9.4", | |
urls = ["https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz"], | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
licenses(["notice"]) | |
cc_library( | |
name = "_config_h", | |
hdrs = [":src/config.h"], | |
strip_include_prefix = "src/", | |
) | |
cc_library( | |
name = "onig", | |
srcs = [ | |
"src/ascii.c", | |
"src/big5.c", | |
"src/cp1251.c", | |
"src/euc_jp.c", | |
"src/euc_jp_prop.c", | |
"src/euc_kr.c", | |
"src/euc_tw.c", | |
"src/gb18030.c", | |
"src/iso8859_1.c", | |
"src/iso8859_10.c", | |
"src/iso8859_11.c", | |
"src/iso8859_13.c", | |
"src/iso8859_14.c", | |
"src/iso8859_15.c", | |
"src/iso8859_16.c", | |
"src/iso8859_2.c", | |
"src/iso8859_3.c", | |
"src/iso8859_4.c", | |
"src/iso8859_5.c", | |
"src/iso8859_6.c", | |
"src/iso8859_7.c", | |
"src/iso8859_8.c", | |
"src/iso8859_9.c", | |
"src/koi8_r.c", | |
"src/onig_init.c", | |
"src/regcomp.c", | |
"src/regenc.c", | |
"src/regenc.h", | |
"src/regerror.c", | |
"src/regexec.c", | |
"src/regext.c", | |
"src/reggnu.c", | |
"src/regint.h", | |
"src/regparse.c", | |
"src/regparse.h", | |
"src/regposerr.c", | |
"src/regposix.c", | |
"src/regsyntax.c", | |
"src/regtrav.c", | |
"src/regversion.c", | |
"src/sjis.c", | |
"src/sjis_prop.c", | |
"src/st.c", | |
"src/st.h", | |
"src/unicode.c", | |
"src/unicode_fold1_key.c", | |
"src/unicode_fold2_key.c", | |
"src/unicode_fold3_key.c", | |
"src/unicode_unfold_key.c", | |
"src/utf16_be.c", | |
"src/utf16_le.c", | |
"src/utf32_be.c", | |
"src/utf32_le.c", | |
"src/utf8.c", | |
], | |
hdrs = ["src/oniguruma.h"], | |
copts = ["-DHAVE_CONFIG_H"], | |
strip_include_prefix = "src/", | |
textual_hdrs = [ | |
"src/unicode_egcb_data.c", | |
"src/unicode_fold_data.c", | |
"src/unicode_property_data.c", | |
"src/unicode_wb_data.c", | |
], | |
visibility = ["//visibility:public"], | |
deps = [":_config_h"], | |
) | |
genrule( | |
name = "_configure", | |
srcs = [ | |
"configure", | |
"install-sh", | |
"missing", | |
"onig-config.in", | |
"config.sub", | |
"config.guess", | |
"Makefile.in", | |
"src/Makefile.in", | |
"src/config.h.in", | |
"test/Makefile.in", | |
"sample/Makefile.in", | |
"ltmain.sh", | |
], | |
outs = ["src/config.h"], | |
cmd = "./$(location configure) && cp src/config.h $(location src/config.h)", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment