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.
This commit is contained in:
John Szakmeister
2014-03-03 10:09:06 -05:00
parent 5dd0ce4263
commit 0b2f6a0cf4
449 changed files with 391 additions and 182056 deletions

View File

@@ -17,6 +17,14 @@ check_and_report() {
)
}
# Travis reports back that it has 32-cores via /proc/cpuinfo, but it's not
# what we really have available. According to their documentation, it only has
# 1.5 virtual cores.
# See:
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
# for more information.
alias make="make -j2"
if [ "$CC" = "clang" ]; then
# force using the version installed by 'travis-setup.sh'
export CC=/usr/bin/clang
@@ -46,9 +54,8 @@ if [ "$CC" = "clang" ]; then
check_and_report
make install
else
export BUSTED_OUTPUT_TYPE="TAP"
export SKIP_EXEC=1
make CMAKE_EXTRA_FLAGS="-DBUSTED_OUTPUT_TYPE=TAP"
make cmake
make unittest
fi