build: allow cros-compilation on chromeOS

- Request LIBTOOL to be used
- Set topbuildir based on a Makefile variable to call libtool
- Use /usr/local instead of /var for xfstest final location
- Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
- Use autoconf variables @prefix@, @exec_prefix@.

The regular way of compiling xfstests - make - remains.
But it now runs autoreconf and libtoolize -i to produce a valid
configure.
Verified with 'make install --dry-run' that files are installed at the
same place.
Verified compiling in chromeOS chroot works as well.

[eguan: resolve merge conflicts and update .gitignore and remove
generated files by realclean]

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Gwendal Grignou
2017-04-19 16:33:48 -07:00
committed by Eryu Guan
parent 9518ef6402
commit 5d20084fef
6 changed files with 33 additions and 293 deletions
+5 -4
View File
@@ -7,6 +7,8 @@
ifndef _BUILDDEFS_INCLUDED_
_BUILDDEFS_INCLUDED_ = 1
top_builddir=$(TOPDIR)
DEBUG = @debug_build@
OPTIMIZER = @opt_build@
MALLOCLIB = @malloc_lib@
@@ -24,6 +26,7 @@ LIBUUID = @libuuid@
LIBHANDLE = @libhdl@
LIBDM = @libdm@
LIBTEST = $(TOPDIR)/lib/libtest.la
prefix = @prefix@
PKG_NAME = @pkg_name@
PKG_USER = @pkg_user@
@@ -32,10 +35,8 @@ PKG_RELEASE = @pkg_release@
PKG_VERSION = @pkg_version@
PKG_PLATFORM = @pkg_platform@
PKG_DISTRIBUTION= @pkg_distribution@
PKG_SBIN_DIR = @sbindir@
# A bit of a hack; by rights only state should probably go here
# But for now ...
PKG_LIB_DIR = /var/lib/@pkg_name@
PKG_LIB_DIR = $(DESTDIR)@exec_prefix@/@pkg_name@
CC = @cc@
AWK = @awk@