]> git.proxmox.com Git - mirror_zfs.git/commit
Support parallel build trees (VPATH builds)
authorTurbo Fredriksson <turbo@bayour.com>
Mon, 9 Jun 2014 21:55:31 +0000 (23:55 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 17 Jul 2015 20:42:51 +0000 (13:42 -0700)
commit47a4a6fd5fa1f1f60bcf6af19e453ecf0292f7d1
tree00c149a4fc58c4a0467c3ef68fbc29628966aa2b
parent2a53e2dacc7a7c0a8c63ff2eef3aff95f6ac80b1
Support parallel build trees (VPATH builds)

Build products from an out of tree build should be written
relative to the build directory.  Sources should be referred
to by their locations in the source directory.

This is accomplished by adding the 'src' and 'obj' variables
for the module Makefile.am, using relative paths to reference
source files, and by setting VPATH when source files are not
co-located with the Makefile.  This enables the following:

  $ mkdir build
  $ cd build
  $ ../configure \
    --with-spl=$HOME/src/git/spl/ \
    --with-spl-obj=$HOME/src/git/spl/build
  $ make -s

This change also has the advantage of resolving the following
warning which is generated by modern versions of automake.

  Makefile.am:00: warning: source file 'xxx' is in a subdirectory,
  Makefile.am:00: but option 'subdir-objects' is disabled

Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1082
42 files changed:
Makefile.am
cmd/arc_summary/Makefile.am
cmd/arcstat/Makefile.am
cmd/dbufstat/Makefile.am
cmd/mount_zfs/Makefile.am
cmd/zdb/Makefile.am
cmd/zed/Makefile.am
cmd/zfs/Makefile.am
cmd/zhack/Makefile.am
cmd/zinject/Makefile.am
cmd/zpios/Makefile.am
cmd/zpool/Makefile.am
cmd/zstreamdump/Makefile.am
cmd/ztest/Makefile.am
cmd/zvol_id/Makefile.am
config/kernel.m4
config/rpm.am
contrib/dracut/90zfs/Makefile.am
etc/init.d/Makefile.am
etc/modules-load.d/Makefile.am
etc/systemd/system/Makefile.am
lib/libavl/Makefile.am
lib/libefi/Makefile.am
lib/libnvpair/Makefile.am
lib/libshare/Makefile.am
lib/libspl/Makefile.am
lib/libspl/asm-generic/atomic.S [deleted file]
lib/libspl/asm-i386/Makefile.am
lib/libspl/asm-x86_64/Makefile.am
lib/libunicode/Makefile.am
lib/libuutil/Makefile.am
lib/libzfs/Makefile.am
lib/libzfs_core/Makefile.am
lib/libzpool/Makefile.am
module/Makefile.in
module/avl/Makefile.in
module/nvpair/Makefile.in
module/unicode/Makefile.in
module/zcommon/Makefile.in
module/zfs/Makefile.in
module/zpios/Makefile.in
udev/rules.d/Makefile.am