summaryrefslogtreecommitdiffstats
path: root/etc
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 /etc
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 'etc')
-rw-r--r--etc/init.d/Makefile.am2
-rw-r--r--etc/modules-load.d/Makefile.am4
-rw-r--r--etc/systemd/system/Makefile.am19
3 files changed, 13 insertions, 12 deletions
diff --git a/etc/init.d/Makefile.am b/etc/init.d/Makefile.am
index dfa328b4a..5f70fc658 100644
--- a/etc/init.d/Makefile.am
+++ b/etc/init.d/Makefile.am
@@ -36,7 +36,7 @@ $(init_SCRIPTS) $(initconf_SCRIPTS) $(initcommon_SCRIPTS): $(EXTRA_DIST)
-e 's,@runstatedir\@,$(runstatedir),g' \
-e "s,@SHELL\@,$$SHELL,g" \
-e "s,@NFS_SRV\@,$$NFS_SRV,g" \
- '[email protected]' >'$@'; \
+ "$(top_srcdir)/etc/init.d/[email protected]" >'$@'; \
[ '$@' = 'zfs-functions' -o '$@' = 'zfs' ] || \
chmod +x '$@')
diff --git a/etc/modules-load.d/Makefile.am b/etc/modules-load.d/Makefile.am
index 980cb8519..a6780e1f0 100644
--- a/etc/modules-load.d/Makefile.am
+++ b/etc/modules-load.d/Makefile.am
@@ -1,5 +1,5 @@
modulesload_DATA = \
- $(top_srcdir)/etc/modules-load.d/zfs.conf
+ zfs.conf
EXTRA_DIST = \
$(top_srcdir)/etc/modules-load.d/zfs.conf.in
@@ -7,7 +7,7 @@ EXTRA_DIST = \
$(modulesload_DATA):
-$(SED) \
-e '' \
+ "$(top_srcdir)/etc/modules-load.d/[email protected]" >'$@'
distclean-local::
-$(RM) $(modulesload_DATA)
diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am
index b7a8db243..82aedd1ea 100644
--- a/etc/systemd/system/Makefile.am
+++ b/etc/systemd/system/Makefile.am
@@ -1,12 +1,13 @@
systemdpreset_DATA = \
- $(top_srcdir)/etc/systemd/system/50-zfs.preset
+ 50-zfs.preset
+
systemdunit_DATA = \
- $(top_srcdir)/etc/systemd/system/zed.service \
- $(top_srcdir)/etc/systemd/system/zfs-import-cache.service \
- $(top_srcdir)/etc/systemd/system/zfs-import-scan.service \
- $(top_srcdir)/etc/systemd/system/zfs-mount.service \
- $(top_srcdir)/etc/systemd/system/zfs-share.service \
- $(top_srcdir)/etc/systemd/system/zfs.target
+ zed.service \
+ zfs-import-cache.service \
+ zfs-import-scan.service \
+ zfs-mount.service \
+ zfs-share.service \
+ zfs.target
EXTRA_DIST = \
$(top_srcdir)/etc/systemd/system/zed.service.in \
@@ -22,14 +23,14 @@ $(systemdunit_DATA):
-e 's,@runstatedir\@,$(runstatedir),g' \
-e 's,@sbindir\@,$(sbindir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
+ "$(top_srcdir)/etc/systemd/system/[email protected]" >'$@'
$(systemdpreset_DATA):
-$(SED) -e 's,@bindir\@,$(bindir),g' \
-e 's,@runstatedir\@,$(runstatedir),g' \
-e 's,@sbindir\@,$(sbindir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
+ "$(top_srcdir)/etc/systemd/system/[email protected]" >'$@'
distclean-local::
-$(RM) $(systemdunit_DATA) $(systemdpreset_DATA)