From 47a4a6fd5fa1f1f60bcf6af19e453ecf0292f7d1 Mon Sep 17 00:00:00 2001 From: Turbo Fredriksson Date: Mon, 9 Jun 2014 23:55:31 +0200 Subject: 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 Signed-off-by: Brian Behlendorf Closes #1082 --- Makefile.am | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 10c87ddcd..f8abb5f2c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,8 @@ - ACLOCAL_AMFLAGS = -I config -include $(top_srcdir)/config/rpm.am -include $(top_srcdir)/config/deb.am -include $(top_srcdir)/config/tgz.am +include config/rpm.am +include config/deb.am +include config/tgz.am SUBDIRS = include rpm if CONFIG_USER @@ -57,11 +56,11 @@ shellcheck: fi ctags: - $(RM) $(top_srcdir)/tags + $(RM) tags find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags etags: - $(RM) $(top_srcdir)/TAGS + $(RM) TAGS find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a tags: ctags etags -- cgit v1.2.3