diff options
author | Turbo Fredriksson <[email protected]> | 2014-06-09 23:55:31 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-07-17 13:42:51 -0700 |
commit | 47a4a6fd5fa1f1f60bcf6af19e453ecf0292f7d1 (patch) | |
tree | 00c149a4fc58c4a0467c3ef68fbc29628966aa2b /cmd/zfs | |
parent | 2a53e2dacc7a7c0a8c63ff2eef3aff95f6ac80b1 (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1082
Diffstat (limited to 'cmd/zfs')
-rw-r--r-- | cmd/zfs/Makefile.am | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/zfs/Makefile.am b/cmd/zfs/Makefile.am index 08580c92d..3cac73da6 100644 --- a/cmd/zfs/Makefile.am +++ b/cmd/zfs/Makefile.am @@ -7,10 +7,10 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = zfs zfs_SOURCES = \ - $(top_srcdir)/cmd/zfs/zfs_iter.c \ - $(top_srcdir)/cmd/zfs/zfs_iter.h \ - $(top_srcdir)/cmd/zfs/zfs_main.c \ - $(top_srcdir)/cmd/zfs/zfs_util.h + zfs_iter.c \ + zfs_iter.h \ + zfs_main.c \ + zfs_util.h zfs_LDADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ |