Commit Graph

163 Commits

Author SHA1 Message Date
dundargoc
af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00
dundargoc
4cf4ae93df
build: cmake cleanup (#22251)
- Remove unused code
- Use consistent casing. Variable names such as LibLuV_LIBRARIES is
  needlessly jarring, even if the name might be technically correct.
- Use title casing for packages. find_package(unibilium) requires the
  find_module to be named "Findunibilium.cmake", which makes it harder
  to spot when scanning the files. Instead, use "Unibilium".
2023-03-02 22:50:43 +01:00
dundargoc
d6d3a92013
build: replace check-single-includes with clang-tidy (#22061)
Clang-tidy already does what check-single-includes does automatically on
top of its regular linting. It is also generator independent, so it
doesn't take an eternity to run on slower generators such as Visual
Studio.
2023-02-08 18:16:48 +01:00
dundargoc
979b7b0c49
build: add uninstall make target (#22059)
We already have a "make install", it makes sense to also have a "make
uninstall".
2023-01-30 18:45:07 +01:00
dundargoc
775e292290
build: remove nvim as a dependency of unittests (#21903)
Unittests rely on nvim-test and not nvim, leading to both nvim and
nvim-test being compiled each time a file is changed. Furthermore, the
dependencies are already specified by CMakeLists.txt and shouldn't need
to be specified in Makefile as it's only meant to be syntactic sugar.
2023-01-19 22:12:27 +01:00
dundargoc
00a976129b
build: enable cmake workflow presets (#21860)
Workflow presets allows combining configure, build, test and packaging
steps and makes it possible to run everything in a single command. So

cmake --preset iwyu
cmake --build --preset iwyu

instead becomes

cmake --workflow --preset iwyu

Workflow presets requires at least cmake version 3.25 to use.
2023-01-19 10:34:45 +01:00
dundargoc
9220755302
build: remove clint error suppression #21782
Fix remaining clint errors and remove error suppression completely.

Rename the lint targets to align with the established naming convention:

- lintc-clint lints with clint.py.
- lintc-uncrustify lints with uncrustify.
- lintc runs both targets.

lintc is also provided as a make target for convenience.

After this change we can remove these files:
https://github.com/neovim/doc/tree/gh-pages/reports/clint
https://github.com/neovim/doc/blob/main/ci/clint-errors.sh
2023-01-13 15:48:10 -08:00
dundargoc
66360675cf build: allow IWYU to fix includes for all .c files
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.

Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
2022-11-15 10:30:03 +01:00
dundargoc
1d625a3cf7
build: remove python linting #20851
This includes both the `lintpy` make target and for CI. We're actively
trying to reduce our python usage, so this only seems to give warnings
for unimportant things such as exceeding the line after deleting python
code.
2022-10-29 10:42:10 -07:00
Justin M. Keyes
c651152a9d fix(build): "make clean" fails
Problem:
"make clean" fails since 03bc23de36.

    make -C runtime/doc clean
    make[1]: *** No rule to make target `clean'.  Stop.
    make: *** [clean] Error 2

Solution:
Update the "clean" target.
2022-10-04 18:37:59 +02:00
Justin M. Keyes
09b64d75bd feat(docs): gen_help_html.lua
Problem:
The :help docs HTML generated is driven by an old awk script
`runtime/doc/makehtml.awk` that is hard to maintain (ad hoc parser and
no one has touched it in decades) and has bugs like:
- https://github.com/neovim/neovim.github.io/issues/96
- https://github.com/neovim/neovim.github.io/issues/97

Solution:
Use Lua + treesitter (https://github.com/vigoux/tree-sitter-vimdoc) to
generate :help docs HTML.  Also validates tag links.

fix https://github.com/neovim/neovim.github.io/issues/96
fix https://github.com/neovim/neovim.github.io/issues/97

TODO:
- delete doc_html build task
- delete runtime/doc/Makefile
- delete makehtml.awk
- delete maketags.awk

OUTPUT:

    $ nvim -V1 -es --clean +"lua require('scripts.gen_help_html')"
    output dir: /…/neovim.github.io/_site/doc/
    generated (207  errors): api.txt         => api.html
    generated (122  errors): arabic.txt      => arabic.html
    generated (285  errors): autocmd.txt     => autocmd.html
    generated (641  errors): builtin.txt     => builtin.html
    generated (623  errors): change.txt      => change.html
    generated (65   errors): channel.txt     => channel.html
    generated (353  errors): cmdline.txt     => cmdline.html
    generated (3    errors): debug.txt       => debug.html
    generated (28   errors): deprecated.txt  => deprecated.html
    generated (193  errors): dev_style.txt   => dev_style.html
    generated (460  errors): develop.txt     => develop.html
    generated (19   errors): diagnostic.txt  => diagnostic.html
    generated (57   errors): diff.txt        => diff.html
    generated (818  errors): digraph.txt     => digraph.html
    generated (330  errors): editing.txt     => editing.html
    generated (368  errors): eval.txt        => eval.html
    generated (184  errors): fold.txt        => fold.html
    generated (61   errors): ft_ada.txt      => ft_ada.html
    generated (0    errors): ft_ps1.txt      => ft_ps1.html
    generated (20   errors): ft_raku.txt     => ft_raku.html
    generated (5    errors): ft_rust.txt     => ft_rust.html
    generated (41   errors): ft_sql.txt      => ft_sql.html
    generated (110  errors): gui.txt         => gui.html
    generated (79   errors): hebrew.txt      => hebrew.html
    generated (17   errors): help.txt        => index.html
    generated (104  errors): helphelp.txt    => helphelp.html
    generated (0    errors): if_cscop.txt    => if_cscop.html
    generated (23   errors): if_perl.txt     => if_perl.html
    generated (16   errors): if_pyth.txt     => if_pyth.html
    generated (9    errors): if_ruby.txt     => if_ruby.html
    generated (216  errors): indent.txt      => indent.html
    generated (634  errors): index.txt       => vimindex.html
    generated (320  errors): insert.txt      => insert.html
    generated (265  errors): intro.txt       => intro.html
    generated (9    errors): job_control.txt => job_control.html
    generated (0    errors): lsp-extension.txt => lsp-extension.html
    generated (214  errors): lsp.txt         => lsp.html
    generated (311  errors): lua.txt         => lua.html
    generated (592  errors): luaref.txt      => luaref.html
    generated (798  errors): luvref.txt      => luvref.html
    generated (663  errors): map.txt         => map.html
    generated (228  errors): mbyte.txt       => mbyte.html
    generated (228  errors): message.txt     => message.html
    generated (0    errors): mlang.txt       => mlang.html
    generated (761  errors): motion.txt      => motion.html
    generated (4    errors): nvim.txt        => nvim.html
    generated (226  errors): nvim_terminal_emulator.txt => nvim_terminal_emulator.html
    generated (988  errors): options.txt     => options.html
    generated (567  errors): pattern.txt     => pattern.html
    generated (15   errors): pi_gzip.txt     => pi_gzip.html
    generated (10   errors): pi_health.txt   => pi_health.html
    generated (27   errors): pi_msgpack.txt  => pi_msgpack.html
    generated (2177 errors): pi_netrw.txt    => pi_netrw.html
    generated (41   errors): pi_paren.txt    => pi_paren.html
    generated (9    errors): pi_spec.txt     => pi_spec.html
    generated (218  errors): pi_tar.txt      => pi_tar.html
    generated (0    errors): pi_tutor.txt    => pi_tutor.html
    generated (235  errors): pi_zip.txt      => pi_zip.html
    generated (265  errors): print.txt       => print.html
    generated (31   errors): provider.txt    => provider.html
    generated (335  errors): quickfix.txt    => quickfix.html
    generated (572  errors): quickref.txt    => quickref.html
    generated (109  errors): recover.txt     => recover.html
    generated (14   errors): remote.txt      => remote.html
    generated (14   errors): remote_plugin.txt => remote_plugin.html
    generated (351  errors): repeat.txt      => repeat.html
    generated (23   errors): rileft.txt      => rileft.html
    generated (12   errors): russian.txt     => russian.html
    generated (6    errors): scroll.txt      => scroll.html
    generated (106  errors): sign.txt        => sign.html
    generated (347  errors): spell.txt       => spell.html
    generated (784  errors): starting.txt    => starting.html
    generated (1499 errors): syntax.txt      => syntax.html
    generated (23   errors): tabpage.txt     => tabpage.html
    generated (257  errors): tagsrch.txt     => tagsrch.html
    generated (31   errors): term.txt        => term.html
    generated (0    errors): testing.txt     => testing.html
    generated (96   errors): tips.txt        => tips.html
    generated (57   errors): treesitter.txt  => treesitter.html
    generated (71   errors): uganda.txt      => uganda.html
    generated (74   errors): ui.txt          => ui.html
    generated (87   errors): undo.txt        => undo.html
    generated (17   errors): userfunc.txt    => userfunc.html
    generated (1    errors): usr_01.txt      => usr_01.html
    generated (89   errors): usr_02.txt      => usr_02.html
    generated (293  errors): usr_03.txt      => usr_03.html
    generated (46   errors): usr_04.txt      => usr_04.html
    generated (96   errors): usr_05.txt      => usr_05.html
    generated (54   errors): usr_06.txt      => usr_06.html
    generated (20   errors): usr_07.txt      => usr_07.html
    generated (241  errors): usr_08.txt      => usr_08.html
    generated (130  errors): usr_09.txt      => usr_09.html
    generated (50   errors): usr_10.txt      => usr_10.html
    generated (33   errors): usr_11.txt      => usr_11.html
    generated (32   errors): usr_12.txt      => usr_12.html
    generated (22   errors): usr_20.txt      => usr_20.html
    generated (75   errors): usr_21.txt      => usr_21.html
    generated (8    errors): usr_22.txt      => usr_22.html
    generated (3    errors): usr_23.txt      => usr_23.html
    generated (163  errors): usr_25.txt      => usr_25.html
    generated (13   errors): usr_26.txt      => usr_26.html
    generated (84   errors): usr_27.txt      => usr_27.html
    generated (173  errors): usr_28.txt      => usr_28.html
    generated (285  errors): usr_29.txt      => usr_29.html
    generated (280  errors): usr_30.txt      => usr_30.html
    generated (11   errors): usr_31.txt      => usr_31.html
    generated (13   errors): usr_32.txt      => usr_32.html
    generated (156  errors): usr_40.txt      => usr_40.html
    generated (134  errors): usr_41.txt      => usr_41.html
    generated (35   errors): usr_42.txt      => usr_42.html
    generated (19   errors): usr_43.txt      => usr_43.html
    generated (60   errors): usr_44.txt      => usr_44.html
    generated (13   errors): usr_45.txt      => usr_45.html
    generated (1    errors): usr_toc.txt     => usr_toc.html
    generated (69   errors): various.txt     => various.html
    generated (68   errors): vi_diff.txt     => vi_diff.html
    generated (437  errors): vim_diff.txt    => vim_diff.html
    generated (296  errors): visual.txt      => visual.html
    generated (181  errors): windows.txt     => windows.html
    generated 119 html pages
    total errors: 23862
    invalid tags: 537
2022-09-22 15:36:27 +02:00
dundargoc
8ce7e7409f
build: add formatting targets for c and lua files (#19488)
The targets will only format files that have been changed in current
branch compared to the master branch. This includes unstaged, staged and
committed files.

Add following make and cmake targets:
formatc   - format changed c files
formatlua - format changed lua files
format    - run formatc and formatlua

Remove scripts/uncrustify.sh as this deprecates it.
2022-08-02 12:32:57 +02:00
dundargoc
9b4d0137b8
build: move lint target to cmake #19169
This will ensure less verbose output and faster linting.
2022-07-01 09:15:04 -07:00
Justin M. Keyes
f05a2891d3 build: rename build-related dirs
Problem:
Dirs "config", "packaging", and "third-party" are all closely related
but this is not obvious from the layout. This adds friction for new
contributors.

Solution:
- rename config/ to cmake.config/
- rename test/config/ to test/cmakeconfig/ because it is used in Lua
  tests: require('test.cmakeconfig.paths').
- rename packaging/ to cmake.packaging/
- rename third-party/ to cmake.deps/ (parallel with .deps/)
2022-06-28 04:02:29 -07:00
dundargoc
6d57bb89c1
build: add a cmake target for all used linters #18543
* build: move the logic for linters to cmake
Cmake is our source of truth. We should have as much of our build
process there as possible so everyone can make use of it.

* build: remove redundant check for ninja generator
The minimum cmake version as of writing this is 3.10, which has ninja
support.
2022-06-09 08:09:24 -07:00
Christian Clason
676e9e9334 ci: lint runtime with stylua 2022-05-09 16:31:55 +02:00
Dundar Göc
680970bfbc ci(commitlint): use -u NONE instead of --clean
I get a weird error about syntax.vim not being installed when using
--clean when running it locally.
2022-03-27 18:28:11 +02:00
Eisuke Kawashima
7014731035
build: enhance Makefile
- fix regression where `-j` is not passed to ninja
  (39c886551b, #15708)
- enable to pass `-l` (load) to ninja as well
- s/BUILD_TYPE/CMAKE_GENERATOR/
2021-09-21 15:54:14 +09:00
Justin M. Keyes
41da72ffb6 build(lint): commit linter 2021-09-19 16:39:34 -07:00
kylo252
39c886551b
refactor(Makefile): use built-in make commands #15708
Changes to the main Makefile:
- add `MAKEFILE_PATH` and `MAKEFILE_DIR` that are set with native commands
- add `NVIM_PRG`
- rename `BUILD_TYPE` to `CMAKE_GENERATOR` to align with CMake naming
- remove the misleading `BUILD_CMD` and use `BUILD_TOOL` instead

Add the following phony target to quickly test the changes

```make
debug-print:
	@echo makefile path: $(MAKEFILE_PATH)
	@echo makefile dir: $(MAKEFILE_DIR)
	@echo build dir: $(BUILD_DIR)
	@echo cmake generator tool: $(CMAKE_GENERATOR)
	@echo build-tool: $(BUILD_TOOL)
	@echo nvim-prg: $(NVIM_PRG)
```
2021-09-19 15:53:48 -07:00
dundargoc
65572c719a
build(lint): commit linter #15620 2021-09-19 09:27:08 -07:00
Eisuke Kawashima
250e4e699f
build: Inherit -n and -jN flags if Ninja #12219 2020-05-01 07:36:56 -07:00
Daniel Hahler
0b7a7b23cc
oldtest: support for running by filename (#11473)
Follow-up to 8969efca8 (Vim patch 8.1.0723)

NOTE: This changes the main entrypoint for running single oldtest files
to not use/require the ".res" extension anymore.  But it is handled for
B/C.

Adds a phony rule to run oldtest by filename.
Not going through "$(MAKE)" avoids GNUmakefile being used then (which I
use for WIP things), and it seems like SINGLE_MAKE should be used anyway
probably.
2019-12-02 17:18:37 +01:00
Jan Edmund Lazo
8969efca8c
vim-patch:8.1.0723: cannot easily run specific test when in src/testdir
Problem:    Cannot run specific test when in src/testdir the same was as in
            the src directory.
Solution:   Move build rule to src/testdir/Makefile.
ec50401e1e

Developer can omit '.res' suffix now.
TEST_FILE=test_syntax make oldtest
or
make -C src/nvim/testdir test_syntax
2019-11-22 20:10:12 -05:00
Jan Edmund Lazo
5689008060 build: add shlint target for shellcheck (#11350) 2019-11-09 13:39:01 +01:00
Daniel Hahler
48b2d21d5e vim-patch:8.1.1213: "make clean" in top dir does not cleanup indent test output
Problem:    "make clean" in top dir does not cleanup indent test output.
Solution:   Clean the indent test output.  Do not rely on the vim executable
            for that. (closes vim/vim#4307)
e13a3901ca
2019-09-18 22:46:47 +02:00
Daniel Hahler
6cc76194b2
tests: use runtime from build for doc/tags with :help (#10479)
This is better practice in general, and allows to remove the "helptags
ALL" hacks.

Ref: https://github.com/neovim/neovim/issues/8824
Ref: https://github.com/neovim/neovim/commit/f1b67c3453c

* Makefile: fix dependencies with regard to helptags

- use the file as the main target to avoid unnecessary triggering
- use "make oldtest" on Travis to ensure it gets built
2019-08-28 22:47:54 +02:00
Daniel Hahler
0288ba6e38
build: Makefile: use _opt_pylint [ci skip] (#10720)
A separate rule it clearer, and allows for `make --keep-going lint` in
general later.

Ref: https://github.com/neovim/neovim/pull/10714
2019-08-08 16:02:59 +02:00
Daniel Hahler
95e1ce24e8 build: lint: fix exit with optional pylint
Ref: https://github.com/neovim/neovim/pull/10714#issuecomment-518932355
2019-08-07 12:27:59 +02:00
Daniel Hahler
8218d474fa
build: move pylint to Makefile, optional with "make lint" (#10714)
This avoids errors when using "make lint", but "flake8" is not
available.  We do not want to install it then via third-party.
On CI "make pylint" is used explicitly.
2019-08-06 18:53:51 +02:00
Daniel Hahler
4c35e6fe67
Makefile: only use pattern rules with BUILD_TYPE=Ninja (#10687)
While not doing any harm with "Unix Makefiles", they do not work there
as-is.  Therefore just do not use them then.

Followup to #10366 (7f6ff829a).
2019-08-04 17:13:04 +02:00
Daniel Hahler
7f6ff829aa
Makefile: use pattern rules for build/.deps [ci skip] (#10366)
This allows for `make build/bin/nvim`,
`make build/src/nvim/auto/funcs.generated.h` etc.
2019-07-30 13:53:33 +02:00
Daniel Hahler
d651710de1 ci: pylint target via flake8
Ref: https://github.com/neovim/neovim/pull/10631#issuecomment-515756591
2019-07-29 22:14:23 +02:00
Daniel Hahler
b41507927b
build: fix handling of install prefix with CMAKE_EXTRA_FLAGS (#10530)
Append `CMAKE_INSTALL_PREFIX` to any given `CMAKE_EXTRA_FLAGS` always.

Regressed in 5031e3298.

Fixes https://github.com/neovim/neovim/issues/10524.
2019-07-17 16:38:11 +02:00
Daniel Hahler
32361a1245 Improve luacheck setup [skip appveyor]
- Move .luacheckrc to root, add read_globals=vim
- Simplify lualint target, run it on all lua files
- Lint preload.lua, but ignore W211
- Remove testlint target, included in lualint (and lint)
- Clean up .luacheckrc
2019-07-04 12:29:54 +02:00
Eisuke Kawashima
61790c7b3c build: Fix rule of build/.ran-third-party-cmake #10402
In order that `$(DEPS_BUILD_DIR)/Makefile` exists under parallel make
2019-07-03 00:25:49 +02:00
Daniel Hahler
72ae0a6e5e
Makefile: CMAKE_INSTALL_PREFIX: skip parsing CMAKE_EXTRA_FLAGS if set (#10374)
Fixes:

>  Recursive variable 'CMAKE_EXTRA_FLAGS' references itself (eventually).  Stop.
2019-06-30 01:29:10 +02:00
Daniel Hahler
75be0f0bbb Makefile: move all target to the top [ci skip] #10375
Fixes "make: Nothing to be done for 'checkprefix'." after 5031e3298.
2019-06-30 00:13:53 +02:00
Daniel Hahler
5031e32986
Makefile: revisit/improve checkprefix handling (#10348)
Main improvement: do not error out, but re-run CMake in case
CMAKE_INSTALL_PREFIX changed, and only check it for "install".

- only look at CMAKE_EXTRA_FLAGS via shell if not empty
- add CMAKE_INSTALL_PREFIX to CMAKE_EXTRA_FLAGS (not CMAKE_FLAGS), to
  override it being set in CMAKE_EXTRA_FLAGS from local.mk
- use an empty "checkprefix" target if CMAKE_INSTALL_PREFIX is not
  provided
- skip checking of cached value without build/.ran-cmake; it will be run
  then anyway
- only use it with "install" target; it is only relevant there
- do not error, but re-run CMake (by removing the stamp file)
2019-06-29 21:48:40 +02:00
Daniel Hahler
a924650d98
Makefile: fix regression with "make functionaltest-lua" (#10346)
Regressed in 69eb4fa0c.
2019-06-26 22:44:48 +02:00
Daniel Hahler
10c983fabe
build: Makefile: fix distclean [ci skip] (#10336)
Do not run CMake in build before deleting it unnecessarily:

    % make distclean
    test -d build && ninja -C build clean || true
    ninja: Entering directory `build'
    [0/1] Re-running CMake...
2019-06-25 19:51:28 +02:00
Daniel Hahler
69eb4fa0c5
build: Makefile: handle "rm -rf .deps" (#10305)
- make `build/.ran-third-party-cmake` depend on `$(DEPS_BUILD_DIR)`.
  It still creates `build` there as a side-effect, which does not
  belong there really, but is OK for now.

- add an explicit target for `$(DEPS_BUILD_DIR)` (".deps"), only with
  USE_BUNDLED=1  (the default).

This makes it easier to rebuild deps cleanly, by using `rm -rf .deps; make`.
2019-06-24 04:13:57 +02:00
Daniel Hahler
9ce34050e5 Makefile: fix trailing space in BUILD_CMD #10312
Only append flag for verbosity with ninja if non-empty.

Fixes the trailing space with `ninja  -C .deps`.
2019-06-23 15:25:29 +02:00
Justin M. Keyes
ad3b312cf5 build: do not pass empty CMAKE_INSTALL_PREFIX
ref #9748
ref #9743
2019-03-19 02:51:33 +01:00
Justin M. Keyes
29d6993ccd
build: pass CMAKE_INSTALL_PREFIX explicitly #9748
On some (but not all) systems this works implicitly.

fixes #9743
2019-03-17 23:35:56 +01:00
Daniel Hahler
6b827bb664 build: checkprefix: skip if empty #9624
This regressed in 3b473bb14f:
```
% make 'CMAKE_BUILD_TYPE=RelWithDebInfo' 'CMAKE_EXTRA_FLAGS=-DCMAKE_INSTALL_PREFIX=/vim-build/neovim/neovim/master -DENABLE_JEMALLOC=OFF' 'DEPS_CMAKE_FLAGS=-DUSE_BUNDLED=OFF'

error: CMAKE_INSTALL_PREFIX '/vim-build/neovim/neovim/master' does not match cached value ''
       Run this command, then try again:
         cmake build -DCMAKE_INSTALL_PREFIX=/vim-build/neovim/neovim/master
make: *** [Makefile:169: checkprefix] Error 1
```

It was checking before for non-empty also [1].

1: https://github.com/neovim/neovim/pull/9621/files#diff-b67911656ef5d18c4ae36cb6741b7965L22
2019-02-17 21:41:42 +01:00
Justin M. Keyes
3b473bb14f
build/Makefile: validate prefix for specific targets (#9621)
`clean` and `distclean` should not check CMAKE_INSTALL_PREFIX.
ref #9615

Helped-by: bruce-hill
2019-02-17 05:28:32 +01:00
Justin M. Keyes
05c6c6ae08 build/Makefile: check CMAKE_INSTALL_PREFIX
closes #9615
2019-02-16 00:49:53 +01:00
Justin M. Keyes
685b2028dc build: fix doc_html target
ref 24f2cc55a8 #9430
2019-01-04 02:17:23 +01:00
Justin M. Keyes
1bbbd5f0ff build: make helphtml 2018-11-05 22:45:48 +01:00
Justin M. Keyes
200c8b9cca
build: Unify USE_BUNDLED, USE_BUNDLED_DEPS (#9046)
It's confusing that the Makefile uses a different name than CMake.
2018-09-24 23:18:48 +02:00
Björn Linse
9e8f9dd5d4 cmake: add "generated-sources" target
This is intended to be used with source introspection tools like
clangd, where it would useful to regenerate headers and source files,
which introspection results depend on, without making a full
rebuild which takes much longer time than just generating headers.
2018-09-06 20:54:53 +02:00
Justin M. Keyes
9a0147754c build: respect $DEPS_BUILD_DIR
Without this, the CI_TARGET=lint travis job cant't find the cached deps
(in $HOME/nvim-deps), nor can it update the cache.
2018-03-11 15:38:18 +01:00
Justin M. Keyes
968c7ab17e ci/travis: use ninja instead of make 2018-03-11 12:45:15 +01:00
James McCoy
9dc3cc2c68
genappimage: Include update information for releases/nightlies
This will allow users to use AppImageUpdate to update their AppImage.
It requires publishing the created zsync file alongside the appimage
file for the releases.
2018-03-09 20:49:26 -05:00
ZyX
58f6ef50a8 ci: Also lint lua code in src/nvim/lua 2017-05-25 16:50:06 +03:00
AdnoC
3c0cc028b7 dist: AppImage #6638
scripts/genappimage.sh produces an executable:
    nvim-${NVIM_VERSION}-glibc${GLIBC_VERSION}-${ARCHITECTURE}.AppImage

Closes #6083
2017-05-04 14:43:41 +02:00
ZyX
1e87061294 makefile: Make lint target depend on clint 2017-03-31 16:08:02 +03:00
ZyX
c61858a997 cmake: Replace RunLint.cmake with code in src/nvim/CMakeLists.txt
This also removes LINT_FILE environment variable, other then that functionality 
is kept. It is expected that developers needing partial linting will use `make 
lint`, touching interesting file before (if not done already by writing to 
them).
2017-03-31 16:04:18 +03:00
Justin M. Keyes
afacda046d ci: Run check-single-includes in "lint" build only 2017-03-29 18:02:09 +02:00
Eiichi NISHINA
62774e4356 ci: Check that #include "*.h" works as a single include
Lesser form of include-what-you-use: at least guarantees that header
file did not forget to include something through some other included
file.

Activate run_single_includes_tests on CI.
Fix some IWYU violations.

References #5321
2017-03-27 13:51:05 +02:00
Christian Stigen Larsen
6041fd7a86 build: Makefile: Try other cmake names, or override. #6163
Distributions like RHEL7 (yum) install CMake as `cmake3`.

Closes #6163
2017-02-27 14:28:15 +01:00
Justin M. Keyes
30826cb2d6 build: oldtest target: TEST_FILE, NVIM_PRG (#6098)
- Add support for TEST_FILE to the `oldtest` target, for consistency
  with the busted/lua tests.
  Caveat: with the busted/lua tests TEST_FILE takes a full path, whereas
  for `oldtest` it must be "test_foo.res".
- Add support for NVIM_PRG, again so that all test-related targets are
  consistent.
- Use consistent name for NVIM_PRG. But still need to support NVIM_PROG
  for QuickBuild CI.

Note: The `oldtest` target is driven by the top-level Makefile, because
it requires a TTY. CMake 3.2 added a USES_TERMINAL flag to
add_custom_target(). But we support CMake 2.8...

    add_custom_target(oldtest
      COMMAND make clean
      COMMAND make NVIM_PRG=$<TARGET_FILE:nvim> $ENV{MAKEOVERRIDES}
      DEPENDS nvim
      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/testdir"
      USES_TERMINAL true
    )
2017-02-12 01:02:54 +01:00
James McCoy
d98ebd6ab9
build: Make clean targets more thorough 2016-12-02 20:38:55 -05:00
Marco Hinz
0fa4f98a05
Revert "Makefile: add PREFIX variable"
This reverts commit c13f72ee0a.

References #5447.
2016-10-16 12:17:00 +02:00
Marco Hinz
c13f72ee0a
Makefile: add PREFIX variable
We use a Makefile which in turn uses cmake. If we wanted to set the install
prefix for cmake, we had to do this so far:

  make CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/tmp/nvim"

That's long and hard to remember. Following the conventions of other Makefiles,
this now works as well and is equivalent:

  make PREFIX=/tmp/nvim
2016-10-08 18:39:35 +02:00
Florian Walch
3d1084f264 Travis: Fix accidental building of 3rd-party dependencies.
Running tests from the top-level Makefile will use the third-party
dependencies from .deps instead of the ones from the Travis cache.
2016-07-30 10:21:04 +02:00
Justin M. Keyes
704b58e54a build: define helptags target which always runs.
Specify that the ${GENERATED_HELP_TAGS} "command" (output) depends on
`helptags` so that it always regenerates the doc/ tags. (cmake "targets"
always run, whereas "commands" are contingent on their dependencies. But
we don't define doc/ dependencies because they are circular.)
2016-06-06 11:05:09 -04:00
Justin M. Keyes
f421757e57 reorg 2016-06-03 14:15:36 -04:00
James McCoy
5bd65e31da Makefile: Ensure tags are generated before running oldtest 2016-05-17 00:04:40 -04:00
Björn Linse
2a74cba614 Makefile: let "lint" target run both clint and testlint 2016-05-10 23:25:34 +02:00
Thiago de Arruda
646ab30858 Add Lua 5.1 as a third party dep
Also add a functionaltest-lua target to run the functional tests using the lua
interpreter and corresponding helper to top-level Makefile
2016-03-07 14:38:39 -03:00
Michael Reed
54b0c09685 Make make test run unit tests too
refs https://github.com/neovim/neovim/pull/2124#discussion_r26107174

Unlike Travis, `make test` currently only runs functional tests.
This can cause confusion since one might (understandably) think that `make
test` runs unit tests too, which it doesn't.

The `oldtest` target is still left out because it's quite slow and
Travis already runs it.
2015-11-27 18:08:15 -05:00
Marco Hinz
818f926eb0 Tests: add luacheck for linting tests
Source: https://github.com/mpeterv/luacheck
Docs:   http://luacheck.readthedocs.org/en/0.12.0/index.html

Run via "make testlint".
2015-11-23 13:57:21 +01:00
ZyX
57eaefbb23 ci: Use error suppression in place of ignored files list. #3185
Fixes #3174
2015-08-20 23:40:15 -04:00
David Bürgin
d3bb177f1e vim-patch:7.4.497 #2295
Problem:    With some regexp patterns the NFA engine uses many states and
            becomes very slow.  To the user it looks like Vim freezes.
Solution:   When the number of states reaches a limit fall back to the old
            engine. (Christian Brabandt)

https://github.com/vim/vim/releases/tag/v7-4-497

Helped-by: David Bürgin <676c7473@gmail.com>
Helped-by: Justin M. Keyes <justinkz@gmail.com>
Helped-by: Scott Prager <splinterofchaos@gmail.com>
2015-04-05 19:24:58 -04:00
Michael Reed
e2a8692e72 contrib: Added local.mk.example
[ci skip]
2015-03-17 04:23:52 -04:00
Florian Walch
e21f6e754d Linting: Integrate into CMake, enable by default. 2014-12-24 00:32:26 -05:00
Rui Abreu Ferreira
64d78c0b7d Dont force ../.deps in third-party/CMakeLists.txt
- third-party is built under .deps by default instead of using its own
  ${CMAKE_BINARY_DIR}, move this default setting out of the cmake
  settings and into the Makefile.
- As a consequence the workflow of building third-party using CMake
  should feel more natural, avoid the additional folder or setting
  DEPS_DIR from the command line.
- This commit does not change the default behaviour when calling the
  Makefile wrapper.
2014-12-16 10:28:43 +00:00
oakes
dd9e5a3d7a Allow building as a static -fPIC library 2014-12-12 14:48:39 -05:00
Florian Walch
b904c33e41 CMake: Rename target "test" to "functionaltest".
Remove build warning:

    The target name "test" is reserved or not valid for certain CMake
    features, such as generator expressions, and may result in undefined
    behavior.
2014-11-05 11:54:20 +01:00
Thiago de Arruda
42d5b526b9 test: Replace vroom by lua/busted for functional tests
The 'lupa' python package provides a simple way to seamless integrate lua and
python code.

This commit replaces vroom by a python script that exposes the 'neovim' package
to a lua state, and invokes busted to run functional tests. This is a temporary
solution that will enable writing functional tests using lua/bused while a lua
client library is not available.

The reason for dropping vroom is flexibility: Lua/busted has a nice DSL-style
syntax while also providing the customization power of a full programming
language. Another reason is to use a single framework for unit/functional tests.

Two other changes were performed in this commit:

- Instead of "gcc-unittest/gcc-ia32", the travis builds for gcc are now
  identified by "gcc/gcc-32". They will run unit/functional tests for both 64
  and 32 bits.
- Old integration tests(in src/nvim/testdir) are now ran by the 'oldtest' target
2014-09-30 17:37:16 -03:00
Thiago de Arruda
353bb20ff7 build/test: setup functional tests using vroom 2014-08-09 15:10:56 -03:00
ZyX
1302702586 Make indentation consistent: use 2-space indent always 2014-06-18 16:21:12 -04:00
ZyX
2653cebcd7 Use MAKEOVERRIDES to pass SCRIPTS/TESTNUM arguments for make test 2014-06-18 16:21:12 -04:00
ZyX
b0641510b6 Avoid ever creating .deps directory
Thanks to @jszakmeister this uses make own features.
2014-06-18 16:21:11 -04:00
John Szakmeister
4e1ca460e3 Make it easier to change CMAKE_BUILD_TYPE in your local.mk. 2014-05-31 08:13:49 -04:00
Eliseo Martínez
a6734844ca Introduce nvim namespace: Fix build process.
- Leave src as include dir (for includes to recognize 'nvim/' prefix).
- Change subdirectory from src to src/nvim.
- Fix msgpack generation.
- Fix some other paths to new locations.
2014-05-15 20:46:01 +02:00
John Szakmeister
c79d27ee07 build: remove unnecessary flag from CMAKE_FLAGS
We now append the deps install area into CMAKE_PREFIX_PATH.
2014-04-30 05:41:14 -04:00
John Szakmeister
247984d132 Make it easy to get a verbose build of Neovim.
This allows you to do

    make VERBOSE=1

from the top-level and see the actual compile lines.
2014-04-23 07:08:12 -04:00
John Szakmeister
0f6323b8e5 Force the cmake target to re-run the CMake configuration.
This makes it more handy when files are added or removed from the source
tree.  A simple `make cmake` will re-configure and pick up the change.
2014-03-31 04:41:26 -04:00
John Szakmeister
0b2f6a0cf4 Revamp the build system.
This achieves several goals:

 * Less reliance on scripts so we have better portability to Windows
   (though we still have a ways to go for proper Windows support).
   Luajit, luarocks, moonscript, and busted are all installed via CMake
   now.
 * Trying to make use of pkg-config to get the correct libraries.  The
   latest libuv is still broken in this regard, but we'll at least be in
   a position to use it.
 * Allow the use of Ninja or make.  The former runs faster in many
   environments, and automatically makes use of parallel builds.

This also allows for system installed dependencies--though not through
the Makefile just yet--and adds support for FreeBSD.

This also make us build libuv and luajit as static libraries only, since
we're only concerned about having static libraries for our bundled
dependencies.
2014-03-21 15:22:00 -04:00
Thomas Wienecke
1f578ec5a1 Add unit tests for mch_[gs]etperm.
Use preprocessor trick proposed by @mahkoh to import 'defines' like
S_IRUSR.
2014-03-15 11:50:22 -03:00
John Szakmeister
a90c5aa2fc Use $(MAKE) instead of ${MAKE}, and fixup two more make invocations.
Include a new SINGLE_MAKE which can be used to invoke make but using
only a single job, and in way that avoids any warnings from make.
Use SINGLE_MAKE to execute the tests, since they're meant to be run
serially.

Also, prefer the use of $(MAKE) to avoid invoking an extra subshell
(saves some time).
2014-03-01 16:53:14 -03:00
Thiago de Arruda
fd448123aa Add more example unit tests and run with travis 2014-02-27 18:31:45 -03:00
Thiago de Arruda
d04ca90f5c Add basic infrastructure for unit testing
Tests will be written using the [moonscript](http://moonscript.org/) language,
a lua 'dialect' that is whitespace-significant and has a syntax similar to
coffeescript. The test framework used is [busted](http://olivinelabs.com/busted/),
a bdd framework for lua/moonscript.

Luajit has a nice ffi module, which lets lua programs link shared libraries and
call it's functions without writing any C code.

To take advantage of this fact for testing C functions, a new target was added
to CMakeLists.txt, which compiles neovim as a shared library that is loaded by
the process running the tests.

This commit adds necessary code for downloading and installing a lua package
manager(luarocks) locally. It wasn't added as a subtree because there are quite
a few blobs in its source tree.
2014-02-27 17:55:10 -03:00
Thiago de Arruda
a97c1754ad Add test reporting to travis script 2014-02-26 21:33:39 -03:00
Thiago de Arruda
baaf24acea Add valgrind suppression file 2014-02-26 16:21:20 -03:00
Thiago de Arruda
cb9a368445 Add configuration to help debug memory leaks 2014-02-26 15:48:26 -03:00
Rich Wareham
8975e143d4 Makefile: use static linkage with bundled libuv
Use the new LibUV_USE_STATIC configuration flag to use static linkage
when using the bundled libuv.
2014-02-26 17:37:22 +00:00