Fix out-of-tree build failures

Resolve the incorrect use of srcdir and builddir references for
various files in the build system.  These have crept in over time
and went unnoticed because when building in the top level directory
srcdir and builddir are identical.

With this change it's again possible to build in a subdirectory.

    $ mkdir obj
    $ cd obj
    $ ../configure
    $ make

Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Don Brady <don.brady@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8921 
Closes #8943
This commit is contained in:
Brian Behlendorf
2019-06-24 09:32:47 -07:00
committed by GitHub
parent cc9625c47c
commit 8f12a4f8d2
11 changed files with 88 additions and 72 deletions
+3 -2
View File
@@ -60,7 +60,7 @@ all-local:
-e '\|^export SBIN_DIR=|s|$$|@abs_top_builddir@/bin|' \
-e '\|^export ZTS_DIR=|s|$$|@abs_top_srcdir@/tests|' \
-e '\|^export SCRIPT_DIR=|s|$$|@abs_top_srcdir@/scripts|' \
common.sh.in >common.sh
$(abs_top_srcdir)/scripts/common.sh.in >common.sh
-echo "$$EXTRA_ENVIRONMENT" >>common.sh
clean-local:
@@ -71,4 +71,5 @@ install-data-hook:
-e '\|^export SBIN_DIR=|s|$$|@sbindir@|' \
-e '\|^export ZTS_DIR=|s|$$|@datadir@/@PACKAGE@|' \
-e '\|^export SCRIPT_DIR=|s|$$|@datadir@/@PACKAGE@|' \
common.sh.in >$(DESTDIR)$(datadir)/@PACKAGE@/common.sh
$(abs_top_srcdir)/scripts/common.sh.in \
>$(DESTDIR)$(datadir)/@PACKAGE@/common.sh