Commit Graph

26 Commits

Author SHA1 Message Date
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
Rich Wareham
d12322c5b7 Makefile: use "make -C build" idiom
Change an explicit ``cd build && make`` into the more usual
``${MAKE} -C build`` style of invoking make in a subdirectory. This
should mean that ``make -jN`` from the top-level Makefile should work.

Closes #162.
2014-02-26 10:30:05 +00:00
Rich Wareham
598f9fba86 Makefile: fetch deps before running CMake
CMake now required libuv so fetch it first.
2014-02-26 07:08:44 -03:00
Rich Wareham
8aa1d8c71a Makefile: add .deps/ to CMake prefix path
The CMake prefix path is the set of directories CMake searches for
libraries, header files, etc. Use the .deps directory we create when
building libuv as one of those locations.
2014-02-26 07:08:44 -03:00
Thiago de Arruda
72c6523da5 Merge branch 'bundle-libuv' of github.com:rjw57/neovim into rjw57-bundle-libuv 2014-02-26 05:46:10 -03:00
Rich Wareham
0a15feee9d Makefile: allow configuration of CMake flags
Although CMAKE_FLAGS was already a Makefile variable, it didn't have an
empty default value meaning that extending the flags to CMake in a clean
way was difficult. Add a CMAKE_EXTRA_FLAGS variable which is appended to
the default flags.
2014-02-25 13:20:14 -03:00
Rich Wareham
cf3322f8c2 Makefile: add install target
This simply calls the install target in the build directory. IMHO I
think it's looking a bit hacky having a separate Makefile target to do
this rather than using the usual CMake workflow but mine is not to
reason why... [Also, I've copied ``cd build && make ...`` although I'm
sure ``$MAKE -C build/ ...`` is probably the Right Thing (TM).]

Note that you'll have to set CMAKE_INSTALL_PREFIX on the cmake command
line to change where this installs to.
2014-02-25 13:20:14 -03:00
Thiago de Arruda
de7d5cec8e Add local.mk include in makefile
This can be used by devs that need their own custom targets
2014-02-25 11:55:36 -03:00
scott-linder
9db0fc3582 Changed name of binary (vim -> nvim).
Also updated affected config files and test49.vim
2014-02-24 18:48:51 -03:00
jdiez17
be3ce617c7 Changed binary output directory from src/ to bin/ 2014-02-24 14:45:07 -03:00
Rich Wareham
aad5f6341e Makefile: refer to renamed compile-libuv.sh
get-libuv.sh was renamed to compile-libuv.sh
2014-02-24 10:09:07 +00:00
Thiago de Arruda
9f380dda82 Set vim binary as default make target 2014-02-01 11:27:24 -03:00
Thiago de Arruda
6b0b466585 Automate libuv download and build 2014-02-01 11:20:02 -03:00
Thiago de Arruda
72cf89bce8 Import vim from changeset v5628:c9cad40b4181
- Cleanup source tree, leaving only files necessary for compilation/testing
- Process files through unifdef to remove tons of FEAT_* macros
- Process files through uncrustify to normalize source code formatting.
- Port the build system to cmake
2014-01-31 10:39:15 -03:00