diff options
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 96 |
1 files changed, 86 insertions, 10 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 24eaaf1..31fd6b5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,7 @@ CXXFLAGS = SUBDIRS = \ fmtlib \ third-party/base64/lib \ + third-party/date/src \ third-party/scnlib/src \ pcrepp \ base \ @@ -42,6 +43,7 @@ default-formats.cc: $(BIN2C_PATH) $(FORMAT_FILES) $(BIN2C_V)$(BIN2C_PATH) -n lnav_format_json default-formats $(FORMAT_FILES) include keymaps/keymaps.am +include prql/prql.am include themes/themes.am CONFIG_FILES = \ @@ -53,6 +55,9 @@ CONFIG_FILES = \ default-config.cc: $(BIN2C_PATH) $(CONFIG_FILES) $(BIN2C_V)$(BIN2C_PATH) -n lnav_config_json default-config $(CONFIG_FILES) +prql-modules.cc: $(BIN2C_PATH) $(PRQL_FILES) + $(BIN2C_V)$(BIN2C_PATH) -n lnav_prql_modules prql-modules $(PRQL_FILES) + include scripts/scripts.am builtin-scripts.cc: $(BIN2C_PATH) $(BUILTIN_LNAVSCRIPTS) @@ -73,6 +78,9 @@ builtin-sh-scripts.cc: $(BIN2C_PATH) $(BUILTIN_SHSCRIPTS) %-sql.cc: $(srcdir)/%.sql $(BIN2C_PATH) $(BIN2C_V)$(BIN2C_PATH) $(*)-sql $< +%-prql.cc: $(srcdir)/%.prql $(BIN2C_PATH) + $(BIN2C_V)$(BIN2C_PATH) $(*)-prql $< + %-lnav.cc: $(srcdir)/%.lnav $(BIN2C_PATH) $(BIN2C_V)$(BIN2C_PATH) $(*)-lnav $< @@ -86,7 +94,7 @@ time_fmts.cc: ptimec$(BUILD_EXEEXT) if HAVE_RE2C %.cc: %.re - $(RE2C_V)$(RE2C_CMD) --bit-vectors -W --tags -8 -o $@ $< + $(RE2C_V)$(RE2C_CMD) --bit-vectors -W -8 -c -o $@ $< $(REC2_V)test $@ -ef $(srcdir)/$*.cc || cp $@ $(srcdir)/$*.cc endif @@ -95,6 +103,7 @@ LNAV_BUILT_FILES = \ ansi-palette-json.cc \ builtin-scripts.cc \ builtin-sh-scripts.cc \ + css-color-names-json.cc \ default-config.cc \ default-formats.cc \ diseases-json.cc \ @@ -102,6 +111,7 @@ LNAV_BUILT_FILES = \ words-json.cc \ help-md.cc \ init-sql.cc \ + prql-modules.cc \ time_fmts.cc \ xml-entities-json.cc \ xterm-palette-json.cc @@ -112,6 +122,22 @@ AM_LIBS = $(CODE_COVERAGE_LIBS) AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) $(USER_CXXFLAGS) +if HAVE_CARGO +RUST_DEPS_CPPFLAGS = -DHAVE_RUST_DEPS=1 +PRQLC_DIR = third-party/prqlc-c/target +RUST_DEPS_LIBS = $(PRQLC_DIR)/release/libprqlc_c.a + +$(RUST_DEPS_LIBS): $(srcdir)/third-party/prqlc-c/src/lib.rs $(srcdir)/third-party/prqlc-c/Cargo.toml + mkdir -p $(PRQLC_DIR) + env CARGO_TARGET_DIR=third-party/prqlc-c/target $(CARGO_CMD) build --manifest-path \ + $(srcdir)/third-party/prqlc-c/Cargo.toml --package prqlc-c --release + +else +RUST_DEPS = +RUST_DEPS_CPPFLAGS = +RUST_DEPS_LIBS = +endif + AM_LDFLAGS = \ $(STATIC_LDFLAGS) \ $(LIBARCHIVE_LDFLAGS) \ @@ -125,6 +151,8 @@ AM_CPPFLAGS = \ -I$(srcdir)/fmtlib \ -I$(srcdir)/third-party \ -I$(srcdir)/third-party/base64/include \ + -I$(srcdir)/third-party/date/include \ + -I$(srcdir)/third-party/prqlc-c \ -I$(srcdir)/third-party/rapidyaml \ -I$(top_srcdir)/src/third-party/scnlib/include \ -Wall \ @@ -133,7 +161,8 @@ AM_CPPFLAGS = \ $(READLINE_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(PCRE_CFLAGS) \ - $(LIBCURL_CPPFLAGS) + $(LIBCURL_CPPFLAGS) \ + $(RUST_DEPS_CPPFLAGS) LDADD = \ libdiag.a \ @@ -141,6 +170,7 @@ LDADD = \ base/libbase.a \ formats/logfmt/liblogfmt.a \ fmtlib/libcppfmt.a \ + third-party/date/src/libdatepp.a \ third-party/scnlib/src/libscnlib.a \ pcrepp/libpcrepp.a \ pugixml/libpugixml.a \ @@ -150,6 +180,7 @@ LDADD = \ yajl/libyajl.a \ yajlpp/libyajlpp.a \ third-party/base64/lib/libbase64.a \ + $(RUST_DEPS_LIBS) \ $(READLINE_LIBS) \ $(CURSES_LIB) \ $(SQLITE3_LIBS) \ @@ -158,23 +189,29 @@ LDADD = \ # emojis.json is from https://gist.github.com/oliveratgithub/0bf11a9aff0d6da7b46f1490f86a71eb/ # xml-entities.json is from https://html.spec.whatwg.org/entities.json +# css-color-names.json is from https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json dist_noinst_DATA = \ alpha-release.sh \ animals.json \ ansi-palette.json \ + css-color-names.json \ diseases.json \ emojis.json \ $(BUILTIN_LNAVSCRIPTS) \ $(BUILTIN_SHSCRIPTS) \ $(CONFIG_FILES) \ $(FORMAT_FILES) \ + $(PRQL_FILES) \ words.json \ xml-entities.json \ xterm-palette.json noinst_HEADERS = \ third-party/md4c/md4c.h \ + third-party/prqlc-c/prqlc.h \ + third-party/prqlc-c/prqlc.hpp \ + third-party/prqlc-c/prqlc.cxx.hh \ third-party/rapidyaml/ryml_all.hpp \ all_logs_vtab.hh \ archive_manager.hh \ @@ -182,6 +219,7 @@ noinst_HEADERS = \ big_array.hh \ bin2c.hh \ bookmarks.hh \ + bookmarks.json.hh \ bottom_status_source.hh \ bound_tags.hh \ breadcrumb.hh \ @@ -201,7 +239,9 @@ noinst_HEADERS = \ environ_vtab.hh \ field_overlay_source.hh \ file_collection.hh \ + file_converter_manager.hh \ file_format.hh \ + file_options.hh \ file_vtab.cfg.hh \ files_sub_source.hh \ filter_observer.hh \ @@ -209,8 +249,11 @@ noinst_HEADERS = \ filter_sub_source.hh \ fstat_vtab.hh \ fts_fuzzy_match.hh \ + gantt_source.hh \ + gantt_status_source.hh \ grep_highlighter.hh \ grep_proc.hh \ + hasher.hh \ help.md \ help.txt \ help_text.hh \ @@ -232,6 +275,8 @@ noinst_HEADERS = \ lnav_config.hh \ lnav_config_fwd.hh \ lnav_util.hh \ + log.annotate.hh \ + log.annotate.cfg.hh \ log.watch.hh \ log_accel.hh \ log_actions.hh \ @@ -258,8 +303,8 @@ noinst_HEADERS = \ md2attr_line.hh \ md4cpp.hh \ optional.hpp \ - pcap_manager.hh \ - piper_proc.hh \ + piper.looper.hh \ + piper.looper.cfg.hh \ plain_text_source.hh \ pollable.hh \ pretty_printer.hh \ @@ -290,6 +335,7 @@ noinst_HEADERS = \ spectro_source.hh \ sqlitepp.hh \ sqlitepp.client.hh \ + sql_execute.hh \ sql_help.hh \ sql_util.hh \ sqlite-extension-func.hh \ @@ -303,6 +349,7 @@ noinst_HEADERS = \ term_extra.hh \ text_anonymizer.hh \ text_format.hh \ + text_overlay_menu.hh \ textfile_highlighters.hh \ textfile_sub_source.hh \ textview_curses.hh \ @@ -312,6 +359,7 @@ noinst_HEADERS = \ top_status_source.hh \ top_status_source.cfg.hh \ unique_path.hh \ + url_handler.cfg.hh \ url_loader.hh \ view_curses.hh \ view_helpers.hh \ @@ -363,6 +411,7 @@ THIRD_PARTY_SRCS = \ third-party/doctest-root/doctest/doctest.h \ third-party/intervaltree/IntervalTree.h \ third-party/md4c/md4c.c \ + third-party/prqlc-c/prqlc.cxx.cc \ third-party/robin_hood/robin_hood.h \ third-party/sqlite/ext/dbdump.c \ third-party/sqlite/ext/series.c @@ -390,7 +439,9 @@ libdiag_a_SOURCES = \ extension-functions.cc \ field_overlay_source.cc \ file_collection.cc \ + file_converter_manager.cc \ file_format.cc \ + file_options.cc \ files_sub_source.cc \ filter_observer.cc \ filter_status_source.cc \ @@ -398,6 +449,7 @@ libdiag_a_SOURCES = \ fstat_vtab.cc \ fs-extension-functions.cc \ fts_fuzzy_match.cc \ + gantt_source.cc \ grep_proc.cc \ help_text.cc \ help_text_formatter.cc \ @@ -411,6 +463,7 @@ libdiag_a_SOURCES = \ lnav_commands.cc \ lnav_config.cc \ lnav_util.cc \ + log.annotate.cc \ log.watch.cc \ log_accel.cc \ log_actions.cc \ @@ -427,7 +480,7 @@ libdiag_a_SOURCES = \ md4cpp.cc \ network-extension-functions.cc \ data_parser.cc \ - pcap_manager.cc \ + piper.looper.cc \ plain_text_source.cc \ pollable.cc \ pretty_printer.cc \ @@ -454,9 +507,9 @@ libdiag_a_SOURCES = \ styling.cc \ text_anonymizer.cc \ text_format.cc \ + text_overlay_menu.cc \ textfile_sub_source.cc \ timer.cc \ - piper_proc.cc \ sql_commands.cc \ sql_util.cc \ state-extension-functions.cc \ @@ -496,14 +549,23 @@ lnav_test_SOURCES = \ test_override.c \ $(PLUGIN_SRCS) +if CROSS_COMPILING ptimec$(BUILD_EXEEXT): ptimec.c - $(AM_V_CC) $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -g3 -o $@ $? + $(AM_V_CC) $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -g3 -o $@ $? -fPIE +else +ptimec$(BUILD_EXEEXT): ptimec.c + $(AM_V_CC) $(CC) $(CPPFLAGS) $(LDFLAGS) -g3 -o $@ $? -fPIE +endif if HAVE_RE2C RE2C_FILES = data_scanner_re.cc log_level_re.cc endif EXTRA_DIST = \ + third-party/prqlc-c/Cargo.lock \ + third-party/prqlc-c/Cargo.toml \ + third-party/prqlc-c/cbindgen.toml \ + third-party/prqlc-c/src/lib.rs \ ptimec.c CLEANFILES = \ @@ -515,6 +577,7 @@ DISTCLEANFILES = \ ansi-palette-json.h \ builtin-scripts.h \ builtin-sh-scripts.h \ + css-color-names-json.h \ default-config.h \ default-formats.h \ diseases-json.h \ @@ -522,11 +585,18 @@ DISTCLEANFILES = \ words-json.h \ help-md.h \ init-sql.h \ + prql-modules.h \ time_fmts.h \ xml-entities-json.h \ xterm-palette-json.h \ $(RE2C_FILES) +if HAVE_CARGO +clean-local: + env CARGO_TARGET_DIR=third-party/prqlc-c/target $(CARGO_CMD) clean --manifest-path \ + $(srcdir)/third-party/prqlc-c/Cargo.toml +endif + distclean-local: $(RM_V)rm -rf *.dSYM @@ -534,14 +604,20 @@ uncrusty: (cd $(srcdir) && uncrustify -c ../lnav.cfg --replace $(SOURCES) \ $(HEADERS)) -if !DISABLE_DOCUMENTATION -all-local: $(LNAV_BUILT_FILES) lnav +if !CROSS_COMPILING +all-local: $(LNAV_BUILT_FILES) lnav $(RUST_DEPS) if test -w $(srcdir)/internals; then \ env DUMP_INTERNALS_DIR=$(srcdir)/internals DUMP_CRASH=1 ./lnav Makefile; \ mv $(srcdir)/internals/*.schema.json $(top_srcdir)/docs/schemas; \ fi else -all-local: $(LNAV_BUILT_FILES) +all-local: $(LNAV_BUILT_FILES) $(RUST_DEPS) +endif + +check-local: +if HAVE_CHECK_JSONSCHEMA + $(CHECK_JSONSCHEMA) --schemafile $(top_srcdir)/docs/schemas/format-v1.schema.json $(FORMAT_FILES) + $(CHECK_JSONSCHEMA) --schemafile $(top_srcdir)/docs/schemas/config-v1.schema.json $(CONFIG_FILES) endif install-exec-hook: |