summaryrefslogtreecommitdiffstats
path: root/lib/libzfs/Makefile.am
diff options
context:
space:
mode:
authorTurbo Fredriksson <[email protected]>2014-06-09 23:55:31 +0200
committerBrian Behlendorf <[email protected]>2015-07-17 13:42:51 -0700
commit47a4a6fd5fa1f1f60bcf6af19e453ecf0292f7d1 (patch)
tree00c149a4fc58c4a0467c3ef68fbc29628966aa2b /lib/libzfs/Makefile.am
parent2a53e2dacc7a7c0a8c63ff2eef3aff95f6ac80b1 (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 'lib/libzfs/Makefile.am')
-rw-r--r--lib/libzfs/Makefile.am39
1 files changed, 23 insertions, 16 deletions
diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am
index c66285e24..b0c698758 100644
--- a/lib/libzfs/Makefile.am
+++ b/lib/libzfs/Makefile.am
@@ -1,8 +1,7 @@
include $(top_srcdir)/config/Rules.am
libzfs_pcdir = $(datarootdir)/pkgconfig
-libzfs_pc_DATA = $(top_srcdir)/lib/libzfs/libzfs.pc $(top_srcdir)/lib/libzfs/libzfs_core.pc
-EXTRA_DIST = $(top_srcdir)/lib/libzfs/libzfs.pc $(top_srcdir)/lib/libzfs/libzfs_core.pc
+libzfs_pc_DATA = libzfs.pc libzfs_core.pc
DEFAULT_INCLUDES += \
-I$(top_srcdir)/include \
@@ -10,20 +9,26 @@ DEFAULT_INCLUDES += \
lib_LTLIBRARIES = libzfs.la
-libzfs_la_SOURCES = \
- $(top_srcdir)/lib/libzfs/libzfs_changelist.c \
- $(top_srcdir)/lib/libzfs/libzfs_config.c \
- $(top_srcdir)/lib/libzfs/libzfs_dataset.c \
- $(top_srcdir)/lib/libzfs/libzfs_diff.c \
- $(top_srcdir)/lib/libzfs/libzfs_fru.c \
- $(top_srcdir)/lib/libzfs/libzfs_graph.c \
- $(top_srcdir)/lib/libzfs/libzfs_import.c \
- $(top_srcdir)/lib/libzfs/libzfs_iter.c \
- $(top_srcdir)/lib/libzfs/libzfs_mount.c \
- $(top_srcdir)/lib/libzfs/libzfs_pool.c \
- $(top_srcdir)/lib/libzfs/libzfs_sendrecv.c \
- $(top_srcdir)/lib/libzfs/libzfs_status.c \
- $(top_srcdir)/lib/libzfs/libzfs_util.c
+USER_C = \
+ libzfs_changelist.c \
+ libzfs_config.c \
+ libzfs_dataset.c \
+ libzfs_diff.c \
+ libzfs_fru.c \
+ libzfs_graph.c \
+ libzfs_import.c \
+ libzfs_iter.c \
+ libzfs_mount.c \
+ libzfs_pool.c \
+ libzfs_sendrecv.c \
+ libzfs_status.c \
+ libzfs_util.c
+
+KERNEL_C =
+
+nodist_libzfs_la_SOURCES = \
+ $(USER_C) \
+ $(KERNEL_C)
libzfs_la_LIBADD = \
$(top_builddir)/lib/libzfs_core/libzfs_core.la \
@@ -33,3 +38,5 @@ libzfs_la_LIBADD = \
libzfs_la_LIBADD += -lm -ldl $(LIBBLKID)
libzfs_la_LDFLAGS = -version-info 2:0:0
+
+EXTRA_DIST = $(libzfs_pc_DATA) $(USER_C)