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 | |
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')
-rw-r--r-- | cmd/arc_summary/Makefile.am | 3 | ||||
-rw-r--r-- | cmd/arcstat/Makefile.am | 3 | ||||
-rw-r--r-- | cmd/dbufstat/Makefile.am | 3 | ||||
-rw-r--r-- | cmd/mount_zfs/Makefile.am | 2 | ||||
-rw-r--r-- | cmd/zdb/Makefile.am | 4 | ||||
-rw-r--r-- | cmd/zed/Makefile.am | 54 | ||||
-rw-r--r-- | cmd/zfs/Makefile.am | 8 | ||||
-rw-r--r-- | cmd/zhack/Makefile.am | 2 | ||||
-rw-r--r-- | cmd/zinject/Makefile.am | 6 | ||||
-rw-r--r-- | cmd/zpios/Makefile.am | 7 | ||||
-rw-r--r-- | cmd/zpool/Makefile.am | 10 | ||||
-rw-r--r-- | cmd/zstreamdump/Makefile.am | 2 | ||||
-rw-r--r-- | cmd/ztest/Makefile.am | 2 | ||||
-rw-r--r-- | cmd/zvol_id/Makefile.am | 2 |
14 files changed, 52 insertions, 56 deletions
diff --git a/cmd/arc_summary/Makefile.am b/cmd/arc_summary/Makefile.am index 339b71ff3..815af3b2f 100644 --- a/cmd/arc_summary/Makefile.am +++ b/cmd/arc_summary/Makefile.am @@ -1,2 +1 @@ -bin_SCRIPTS = arc_summary.py -EXTRA_DIST = $(bin_SCRIPTS) +dist_bin_SCRIPTS = arc_summary.py diff --git a/cmd/arcstat/Makefile.am b/cmd/arcstat/Makefile.am index 802b8e1d9..8987b2414 100644 --- a/cmd/arcstat/Makefile.am +++ b/cmd/arcstat/Makefile.am @@ -1,2 +1 @@ -bin_SCRIPTS = arcstat.py -EXTRA_DIST = $(bin_SCRIPTS) +dist_bin_SCRIPTS = arcstat.py diff --git a/cmd/dbufstat/Makefile.am b/cmd/dbufstat/Makefile.am index 0548b240c..19bffb020 100644 --- a/cmd/dbufstat/Makefile.am +++ b/cmd/dbufstat/Makefile.am @@ -1,2 +1 @@ -bin_SCRIPTS = dbufstat.py -EXTRA_DIST = $(bin_SCRIPTS) +dist_bin_SCRIPTS = dbufstat.py diff --git a/cmd/mount_zfs/Makefile.am b/cmd/mount_zfs/Makefile.am index 2e5663173..b1d938922 100644 --- a/cmd/mount_zfs/Makefile.am +++ b/cmd/mount_zfs/Makefile.am @@ -12,7 +12,7 @@ sbindir=$(mounthelperdir) sbin_PROGRAMS = mount.zfs mount_zfs_SOURCES = \ - $(top_srcdir)/cmd/mount_zfs/mount_zfs.c + mount_zfs.c mount_zfs_LDADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ diff --git a/cmd/zdb/Makefile.am b/cmd/zdb/Makefile.am index 854fbab26..bc47cffba 100644 --- a/cmd/zdb/Makefile.am +++ b/cmd/zdb/Makefile.am @@ -7,8 +7,8 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = zdb zdb_SOURCES = \ - $(top_srcdir)/cmd/zdb/zdb.c \ - $(top_srcdir)/cmd/zdb/zdb_il.c + zdb.c \ + zdb_il.c zdb_LDADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ diff --git a/cmd/zed/Makefile.am b/cmd/zed/Makefile.am index f0d22411d..70e4f7f69 100644 --- a/cmd/zed/Makefile.am +++ b/cmd/zed/Makefile.am @@ -4,25 +4,25 @@ DEFAULT_INCLUDES += \ -I$(top_srcdir)/include \ -I$(top_srcdir)/lib/libspl/include -EXTRA_DIST = $(top_srcdir)/cmd/zed/zed.d/README +EXTRA_DIST = zed.d/README sbin_PROGRAMS = zed zed_SOURCES = \ - $(top_srcdir)/cmd/zed/zed.c \ - $(top_srcdir)/cmd/zed/zed.h \ - $(top_srcdir)/cmd/zed/zed_conf.c \ - $(top_srcdir)/cmd/zed/zed_conf.h \ - $(top_srcdir)/cmd/zed/zed_event.c \ - $(top_srcdir)/cmd/zed/zed_event.h \ - $(top_srcdir)/cmd/zed/zed_exec.c \ - $(top_srcdir)/cmd/zed/zed_exec.h \ - $(top_srcdir)/cmd/zed/zed_file.c \ - $(top_srcdir)/cmd/zed/zed_file.h \ - $(top_srcdir)/cmd/zed/zed_log.c \ - $(top_srcdir)/cmd/zed/zed_log.h \ - $(top_srcdir)/cmd/zed/zed_strings.c \ - $(top_srcdir)/cmd/zed/zed_strings.h + zed.c \ + zed.h \ + zed_conf.c \ + zed_conf.h \ + zed_event.c \ + zed_event.h \ + zed_exec.c \ + zed_exec.h \ + zed_file.c \ + zed_file.h \ + zed_log.c \ + zed_log.h \ + zed_strings.c \ + zed_strings.h zed_LDADD = \ $(top_builddir)/lib/libavl/libavl.la \ @@ -35,22 +35,22 @@ zed_LDADD = \ zedconfdir = $(sysconfdir)/zfs/zed.d dist_zedconf_DATA = \ - $(top_srcdir)/cmd/zed/zed.d/zed-functions.sh \ - $(top_srcdir)/cmd/zed/zed.d/zed.rc + zed.d/zed-functions.sh \ + zed.d/zed.rc zedexecdir = $(libexecdir)/zfs/zed.d dist_zedexec_SCRIPTS = \ - $(top_srcdir)/cmd/zed/zed.d/all-debug.sh \ - $(top_srcdir)/cmd/zed/zed.d/all-syslog.sh \ - $(top_srcdir)/cmd/zed/zed.d/checksum-notify.sh \ - $(top_srcdir)/cmd/zed/zed.d/checksum-spare.sh \ - $(top_srcdir)/cmd/zed/zed.d/data-notify.sh \ - $(top_srcdir)/cmd/zed/zed.d/generic-notify.sh \ - $(top_srcdir)/cmd/zed/zed.d/io-notify.sh \ - $(top_srcdir)/cmd/zed/zed.d/io-spare.sh \ - $(top_srcdir)/cmd/zed/zed.d/resilver.finish-notify.sh \ - $(top_srcdir)/cmd/zed/zed.d/scrub.finish-notify.sh + zed.d/all-debug.sh \ + zed.d/all-syslog.sh \ + zed.d/checksum-notify.sh \ + zed.d/checksum-spare.sh \ + zed.d/data-notify.sh \ + zed.d/generic-notify.sh \ + zed.d/io-notify.sh \ + zed.d/io-spare.sh \ + zed.d/resilver.finish-notify.sh \ + zed.d/scrub.finish-notify.sh zedconfdefaults = \ all-syslog.sh \ 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 \ diff --git a/cmd/zhack/Makefile.am b/cmd/zhack/Makefile.am index 922aef971..53e324142 100644 --- a/cmd/zhack/Makefile.am +++ b/cmd/zhack/Makefile.am @@ -7,7 +7,7 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = zhack zhack_SOURCES = \ - $(top_srcdir)/cmd/zhack/zhack.c + zhack.c zhack_LDADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ diff --git a/cmd/zinject/Makefile.am b/cmd/zinject/Makefile.am index 4adef11ba..2500beec2 100644 --- a/cmd/zinject/Makefile.am +++ b/cmd/zinject/Makefile.am @@ -7,9 +7,9 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = zinject zinject_SOURCES = \ - $(top_srcdir)/cmd/zinject/translate.c \ - $(top_srcdir)/cmd/zinject/zinject.c \ - $(top_srcdir)/cmd/zinject/zinject.h + translate.c \ + zinject.c \ + zinject.h zinject_LDADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ diff --git a/cmd/zpios/Makefile.am b/cmd/zpios/Makefile.am index 0799463cc..9dabb6530 100644 --- a/cmd/zpios/Makefile.am +++ b/cmd/zpios/Makefile.am @@ -6,7 +6,6 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = zpios zpios_SOURCES = \ - $(top_srcdir)/cmd/zpios/zpios_main.c \ - $(top_srcdir)/cmd/zpios/zpios_util.c \ - $(top_srcdir)/cmd/zpios/zpios.h - + zpios_main.c \ + zpios_util.c \ + zpios.h diff --git a/cmd/zpool/Makefile.am b/cmd/zpool/Makefile.am index a39a2405f..c11951b22 100644 --- a/cmd/zpool/Makefile.am +++ b/cmd/zpool/Makefile.am @@ -7,11 +7,11 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = zpool zpool_SOURCES = \ - $(top_srcdir)/cmd/zpool/zpool_iter.c \ - $(top_srcdir)/cmd/zpool/zpool_main.c \ - $(top_srcdir)/cmd/zpool/zpool_util.c \ - $(top_srcdir)/cmd/zpool/zpool_util.h \ - $(top_srcdir)/cmd/zpool/zpool_vdev.c + zpool_iter.c \ + zpool_main.c \ + zpool_util.c \ + zpool_util.h \ + zpool_vdev.c zpool_LDADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ diff --git a/cmd/zstreamdump/Makefile.am b/cmd/zstreamdump/Makefile.am index d6c64f512..654863adb 100644 --- a/cmd/zstreamdump/Makefile.am +++ b/cmd/zstreamdump/Makefile.am @@ -7,7 +7,7 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = zstreamdump zstreamdump_SOURCES = \ - $(top_srcdir)/cmd/zstreamdump/zstreamdump.c + zstreamdump.c zstreamdump_LDADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ diff --git a/cmd/ztest/Makefile.am b/cmd/ztest/Makefile.am index a3cd83496..ef4d99f28 100644 --- a/cmd/ztest/Makefile.am +++ b/cmd/ztest/Makefile.am @@ -9,7 +9,7 @@ DEFAULT_INCLUDES += \ sbin_PROGRAMS = ztest ztest_SOURCES = \ - $(top_srcdir)/cmd/ztest/ztest.c + ztest.c ztest_LDADD = \ $(top_builddir)/lib/libnvpair/libnvpair.la \ diff --git a/cmd/zvol_id/Makefile.am b/cmd/zvol_id/Makefile.am index 5703dd4b8..d131c6386 100644 --- a/cmd/zvol_id/Makefile.am +++ b/cmd/zvol_id/Makefile.am @@ -11,4 +11,4 @@ DEFAULT_INCLUDES += \ udev_PROGRAMS = zvol_id zvol_id_SOURCES = \ - $(top_srcdir)/cmd/zvol_id/zvol_id_main.c + zvol_id_main.c |