As described in a comment here:
Since make uses VPATH as a search list for both prerequisites and
TARGETS of rules we must not output the host build in the source
tree, which will be in the VPATH for device builds.
This commit moves the host build to a separate directory.
So now we have top level configure, host configure, and (optional)
I was going for a separate configure.ac and Makefile.am for the
toplevel, but Autotools didn't want to play along.
Instead we use exactly the same configure.ac and Makefile.am for both
toplevel and subdirs. Add PAL_IS_TOPDIR/PAL_IS_SUBDIR environment
variables and Automake conditionals. These are used to break recursion
(only toplevel have subdirs) and decide what to be built (toplevel only
EXTRA_DIST does not work well with conditional includes so all those
occurances are replaced with noinst_HEADERS.
Signed-off-by: Ola Jeppsson <firstname.lastname@example.org>