Commit Graph

92 Commits

Author SHA1 Message Date
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