Skip to content

Commit

Permalink
Add VPATH to make sure it's possible in a different directory and not
Browse files Browse the repository at this point in the history
clutter the source with build results (such as Makefiles, *.o and *.a
files etc).

Closes: openzfs/zfs#1082
  • Loading branch information
FransUrbo committed Jun 9, 2014
1 parent 4cdcdbf commit d767f60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/Rules.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Common rules for user space components.
###############################################################################

VPATH = @srcdir@

This comment has been minimized.

Copy link
@behlendorf

behlendorf Jun 10, 2014

This should be probably be VPATH = $(SRCDIR). It will expand to @SrcDir@ in the Makefile.in so functionally it's the same.


DEFAULT_INCLUDES = -include ${top_builddir}/spl_config.h

AM_LIBTOOLFLAGS = --silent
Expand Down

5 comments on commit d767f60

@FransUrbo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, some site I found said that you're not allowed to do that. Some makes can't handle that or something. It needs to be a static value...

@FransUrbo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@behlendorf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stand corrected! It's hard to argue with the autoconf manual. However that same page says we shouldn't need to set VPATH at all...

@FransUrbo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know! It's very weird.... Maybe it's the other stuff that I removed (the $(top_srcdir)/...... that actually made it work? :). I'll do another couple of tests and see if I could skip the VPATH part...

@FransUrbo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it turns out the userland already supports out of tree builds in master. It was just the modules that didn't work. This is fixed by the new force-push which only add the src, obj variables and remove the absolute path to the object files.

Please sign in to comment.