diff --git a/configure.ac b/configure.ac index 9b918f1bc..0923bf08f 100644 --- a/configure.ac +++ b/configure.ac @@ -13,6 +13,25 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +dnl This configure script is complicated, because GRUB needs to deal +dnl with three potentially different types: +dnl +dnl build -- the environment for building GRUB +dnl host -- the environment for running utilities +dnl target -- the environment for running GRUB +dnl +dnl In addition, GRUB needs to deal with a platform specification +dnl which specifies the system running GRUB, such as firmware. +dnl This is necessary because the target type in autoconf does not +dnl describe such a system very well. +dnl +dnl The current strategy is to use variables with no prefix (such as +dnl CC, CFLAGS, etc.) for the host type as well as the build type, +dnl because GRUB does not need to use those variables for the build +dnl type, so there is no conflict. Variables with the prefix "TARGET_" +dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target +dnl type. + AC_INIT([GRUB],[1.98],[bug-grub@gnu.org]) # We don't want -g -O2 by default in CFLAGS @@ -879,10 +898,9 @@ else mkdir -p include/grub 2>/dev/null rm -rf include/grub/cpu cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null - cp -rp $srcdir/grub-core/lib/$target_cpu grub-core/lib/target_cpu 2>/dev/null if test "$platform" != emu ; then rm -rf include/grub/machine - cp -rp $srcdir/grub-core/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null + cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null fi fi diff --git a/tests/example_grub_script_test.in b/tests/example_grub_script_test.in index 6fa3dc98a..93a90a18e 100644 --- a/tests/example_grub_script_test.in +++ b/tests/example_grub_script_test.in @@ -1,3 +1,3 @@ -#! @abs_top_builddir@/grub-shell-tester --modules=echo +#! @builddir@/grub-shell-tester --modules=echo echo "hello world" diff --git a/tests/util/grub-shell-tester.in b/tests/util/grub-shell-tester.in index d2a9af3ab..ed34a5e17 100644 --- a/tests/util/grub-shell-tester.in +++ b/tests/util/grub-shell-tester.in @@ -91,7 +91,7 @@ if [ "x${source}" = x ] ; then fi outfile1=`mktemp` -@abs_top_builddir@/grub-shell --qemu-opts="${qemuopts}" --modules=${modules} ${source} >${outfile1} +@builddir@/grub-shell --qemu-opts="${qemuopts}" --modules=${modules} ${source} >${outfile1} outfile2=`mktemp` bash ${source} >${outfile2} diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index fc1e01ef5..3f25fe7bb 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -124,7 +124,7 @@ halt EOF isofile=`mktemp` -sh @abs_top_builddir@/grub-mkrescue --grub-mkimage=${builddir}/grub-mkimage \ +sh @builddir@/grub-mkrescue --grub-mkimage=${builddir}/grub-mkimage \ --override-directory=${builddir}/grub-core --output=${isofile} \ boot/grub/grub.cfg=${cfgfile} \ /boot/grub/testcase.cfg=${source} >/dev/null 2>&1