aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile110
1 files changed, 98 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 1ba2431ba2..3781d06a6c 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,6 @@ ifeq (,$(BUILD_TOOL))
endif
endif
-
# Only need to handle Ninja here. Make will inherit the VERBOSE variable, and the -j, -l, and -n flags.
ifeq ($(CMAKE_GENERATOR),Ninja)
ifneq ($(VERBOSE),)
@@ -114,37 +113,124 @@ build/.ran-deps-cmake::
# TODO: cmake 3.2+ add_custom_target() has a USES_TERMINAL flag.
oldtest: | nvim build/runtime/doc/tags
- +$(SINGLE_MAKE) -C src/nvim/testdir clean
+ +$(SINGLE_MAKE) -C test/old/testdir clean
ifeq ($(strip $(TEST_FILE)),)
- +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG=$(NVIM_PRG) $(MAKEOVERRIDES)
+ +$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) $(MAKEOVERRIDES)
else
@# Handle TEST_FILE=test_foo{,.res,.vim}.
- +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst %.vim,%,$(patsubst %.res,%,$(TEST_FILE)))
+ +$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst %.vim,%,$(patsubst %.res,%,$(TEST_FILE)))
endif
# Build oldtest by specifying the relative .vim filename.
.PHONY: phony_force
-src/nvim/testdir/%.vim: phony_force
- +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst src/nvim/testdir/%.vim,%,$@)
+test/old/testdir/%.vim: phony_force nvim
+ +$(SINGLE_MAKE) -C test/old/testdir NVIM_PRG=$(NVIM_PRG) SCRIPTS= $(MAKEOVERRIDES) $(patsubst test/old/testdir/%.vim,%,$@)
functionaltest-lua: | nvim
- $(BUILD_TOOL) -C build $@
+ $(BUILD_TOOL) -C build functionaltest
FORMAT=formatc formatlua format
-LINT=lintlua lintsh lintc check-single-includes lintcommit lint
+LINT=lintlua lintsh lintc clang-analyzer lintcommit lint
TEST=functionaltest unittest
-generated-sources benchmark $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake
+generated-sources benchmark $(FORMAT) $(LINT) $(TEST) doc: | build/.ran-cmake
$(CMAKE_PRG) --build build --target $@
test: $(TEST)
+# The ignored header files should be synced with the `check_includes_ignore`
+# array in src/clint.py
iwyu: build/.ran-cmake
- cmake --workflow --fresh --preset iwyu > build/iwyu.log
- iwyu-fix-includes --only_re="src/nvim" --ignore_re="src/nvim/(auto|map.h|eval/encode.c)" --safe_headers < build/iwyu.log
+ cmake --preset iwyu
+ cmake --build build > build/iwyu.log
+ iwyu-fix-includes --only_re="src/nvim" --ignore_re="(src/nvim/eval/encode.c|src/nvim/auto/|src/nvim/os/lang.c|src/nvim/map.c\
+ |src/nvim/api/extmark.h\
+ |src/nvim/api/private/dispatch.h\
+ |src/nvim/api/private/helpers.h\
+ |src/nvim/api/private/validate.h\
+ |src/nvim/api/ui.h\
+ |src/nvim/ascii_defs.h\
+ |src/nvim/assert_defs.h\
+ |src/nvim/autocmd.h\
+ |src/nvim/autocmd_defs.h\
+ |src/nvim/buffer.h\
+ |src/nvim/buffer_defs.h\
+ |src/nvim/channel.h\
+ |src/nvim/charset.h\
+ |src/nvim/cmdexpand.h\
+ |src/nvim/cmdhist.h\
+ |src/nvim/decoration.h\
+ |src/nvim/diff.h\
+ |src/nvim/drawline.h\
+ |src/nvim/drawscreen.h\
+ |src/nvim/eval.h\
+ |src/nvim/eval/encode.h\
+ |src/nvim/eval/typval.h\
+ |src/nvim/eval/typval_defs.h\
+ |src/nvim/eval/userfunc.h\
+ |src/nvim/eval/window.h\
+ |src/nvim/event/libuv_process.h\
+ |src/nvim/event/loop.h\
+ |src/nvim/event/multiqueue.h\
+ |src/nvim/event/process.h\
+ |src/nvim/event/rstream.h\
+ |src/nvim/event/signal.h\
+ |src/nvim/event/socket.h\
+ |src/nvim/event/stream.h\
+ |src/nvim/event/time.h\
+ |src/nvim/event/wstream.h\
+ |src/nvim/ex_cmds.h\
+ |src/nvim/ex_cmds_defs.h\
+ |src/nvim/ex_docmd.h\
+ |src/nvim/extmark.h\
+ |src/nvim/file_search.h\
+ |src/nvim/fileio.h\
+ |src/nvim/fold.h\
+ |src/nvim/garray.h\
+ |src/nvim/getchar.h\
+ |src/nvim/globals.h\
+ |src/nvim/grid.h\
+ |src/nvim/highlight.h\
+ |src/nvim/highlight_group.h\
+ |src/nvim/input.h\
+ |src/nvim/insexpand.h\
+ |src/nvim/keycodes.h\
+ |src/nvim/log.h\
+ |src/nvim/lua/executor.h\
+ |src/nvim/main.h\
+ |src/nvim/mark.h\
+ |src/nvim/mouse.h\
+ |src/nvim/move.h\
+ |src/nvim/msgpack_rpc/channel.h\
+ |src/nvim/msgpack_rpc/channel_defs.h\
+ |src/nvim/msgpack_rpc/helpers.h\
+ |src/nvim/msgpack_rpc/unpacker.h\
+ |src/nvim/option.h\
+ |src/nvim/os/fileio.h\
+ |src/nvim/os/input.h\
+ |src/nvim/os/pty_conpty_win.h\
+ |src/nvim/os/pty_process_unix.h\
+ |src/nvim/os/pty_process_win.h\
+ |src/nvim/path.h\
+ |src/nvim/plines.h\
+ |src/nvim/popupmenu.h\
+ |src/nvim/search.h\
+ |src/nvim/spell.h\
+ |src/nvim/syntax.h\
+ |src/nvim/textobject.h\
+ |src/nvim/tui/input.h\
+ |src/nvim/tui/tui.h\
+ |src/nvim/ui.h\
+ |src/nvim/ui_client.h\
+ |src/nvim/ui_compositor.h\
+ |src/nvim/viml/parser/expressions.h\
+ |src/nvim/viml/parser/parser.h\
+ |src/nvim/window.h\
+ )" --nosafe_headers < build/iwyu.log
cmake -B build -U ENABLE_IWYU
+ cmake --build build
clean:
+test -d build && $(BUILD_TOOL) -C build clean || true
- $(MAKE) -C src/nvim/testdir clean
+ $(MAKE) -C test/old/testdir clean
$(MAKE) -C runtime/indent clean
distclean: