build: fix VPATH builds

* configure (fn_dirname): New.
Use it to ensure the creation of proper symlinks to Makefiles.
(config.mak): Define top_builddir and top_srcdir.
(CPPFLAGS): Be sure to find the headers.
* Makefile, lib/Makefile, tests/Makefile, tests2/Makefile: Adjust
to set VPATH properly.
Fix confusion between top_builddir and top_srcdir.
This commit is contained in:
Akim Demaille
2012-12-14 17:18:03 +01:00
parent d815896d4c
commit 3f09b90d21
6 changed files with 55 additions and 25 deletions

10
README
View File

@ -35,6 +35,16 @@ Documentation:
make test
make install
Alternatively, VPATH builds are supported: you may use different
directories to old build objects, kept separate from your source tree:
mkdir _build
cd _build
../configure
make
make test
make install
By default, tcc is installed in /usr/local/bin.
./configure --help shows configuration options.