* configure.ac: Define GRUB_BOOT_DIR_NAME and GRUB_DIR_NAME macros.
* config.h.in: Add previous macros.
* include/grub/emu/misc.h (DEFAULT_DIRECTORY): Use previous macros.
* util/grub-install.in: Use $bootdir and $grubdir variables.
+2010-09-21 Yves Blusseau <blusseau@zetam.org>
+
+ Keep boot and grub directory names in sync with utils scripts
+
+ * configure.ac: Define GRUB_BOOT_DIR_NAME and GRUB_DIR_NAME macros.
+ * config.h.in: Add previous macros.
+ * include/grub/emu/misc.h (DEFAULT_DIRECTORY): Use previous macros.
+ * util/grub-install.in: Use $bootdir and $grubdir variables.
+
2010-09-21 Colin Watson <cjwatson@ubuntu.com>
* grub-core/kern/emu/hostdisk.c (find_system_device): Only try to
#define PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
+/* Default boot directory name" */
+#define GRUB_BOOT_DIR_NAME "@bootdirname@"
+/* Default grub directory name */
+#define GRUB_DIR_NAME "@grubdirname@"
/* Define to 1 if GCC generates calls to __enable_execute_stack(). */
#define NEED_ENABLE_EXECUTE_STACK @NEED_ENABLE_EXECUTE_STACK@
/* Define to 1 if GCC generates calls to __register_frame_info(). */
esac
bootdirname=`echo "$bootdirname" | sed "$program_transform_name"`
AC_SUBST(bootdirname)
+AC_DEFINE_UNQUOTED(GRUB_BOOT_DIR_NAME, "$bootdirname",
+ [Default boot directory name]")
grubdirname=`echo "$PACKAGE" | sed "$program_transform_name"`
AC_SUBST(grubdirname)
+AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname",
+ [Default grub directory name])
#
# Checks for build programs.
#ifndef GRUB_EMU_MISC_H
#define GRUB_EMU_MISC_H 1
-#include <config-util.h>
+#include <config.h>
#include <stdarg.h>
#include <grub/symbol.h>
#ifdef __NetBSD__
/* NetBSD uses /boot for its boot block. */
-# define DEFAULT_DIRECTORY "/grub"
+# define DEFAULT_DIRECTORY "/"GRUB_DIR_NAME
#else
-# define DEFAULT_DIRECTORY "/boot/grub"
+# define DEFAULT_DIRECTORY "/"GRUB_BOOT_DIR_NAME"/"GRUB_DIR_NAME
#endif
#define DEFAULT_DEVICE_MAP DEFAULT_DIRECTORY "/device.map"
# Backward-compatibility kludges
if [ "${target_cpu}-${platform}" = "mips-yeeloong" ]; then
- cp ${grubdir}/core.${imgext} /boot/grub.elf
+ cp ${grubdir}/core.${imgext} ${bootdir}/grub.elf
elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ]; then
- cp ${grubdir}/core.${imgext} /boot/grub/grub
+ cp ${grubdir}/core.${imgext} ${grubdir}/grub
elif [ "${target_cpu}-${platform}" = "i386-efi" ] || [ "${target_cpu}-${platform}" = "x86_64-efi" ]; then
$grub_mkimage ${config_opt} -d ${pkglibdir} -O ${mkimage_target} --output=${grubdir}/grub.efi --prefix="" $modules || exit 1
fi