+2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
+
+ Add --with-platform to configure. Use pkglibdir instead of
+ pkgdatadir. This is reported by Roger Leigh.
+
+ * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
+ (host_vendor): Likewise.
+ (host_os): Likewise.
+ (pkgdatadir): Likewise.
+ (platform): New variable.
+ (pkglibdir): Likewise.
+ Use PKGLIBDIR instead of PKGDATADIR.
+
+ * util/i386/pc/grub-install.in (datadir): Removed.
+ (host_vendor): Likewise.
+ (host_os): Likewise.
+ (pkgdatadir): Likewise.
+ (platform): New variable.
+ (pkglibdir): Likewise.
+ Use PKGLIBDIR instead of PKGDATADIR.
+
+ * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
+ instead of GRUB_DATADIR.
+ (main): Likewise.
+ * util/i386/pc/grub-mkimage.c (usage): Likewise.
+ (main): Likewise.
+ * util/i386/efi/grub-mkimage.c (usage): Likewise.
+ (main): Likewise.
+
+ * configure.ac (--with-platform): New option.
+ Use PLATFORM instead of HOST_VENDOR to specify a platform.
+
+ * Makefile.in: Include a makefile based on PLATFORM instead of
+ HOST_VENDOR.
+ (pkgdatadir): Not appended by the machine type.
+ (pkglibdir): Appended by the machine type.
+ (host_vendor): Removed.
+ (platform): New variable.
+ (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
+ (install-local): Use PKGLIBDIR instead of PKGDATADIR.
+ (uninstall): Likewise.
+
2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
Use the environment context in the menu. Remove the commands
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
-pkgdatadir = $(datadir)/@PACKAGE_TARNAME@/$(host_cpu)-$(host_vendor)
-pkglibdir = $(libdir)/@PACKAGE_TARNAME@
+pkgdatadir = $(datadir)/@PACKAGE_TARNAME@
+pkglibdir = $(libdir)/@PACKAGE_TARNAME@/$(host_cpu)-$(platform)
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
host_cpu = @host_cpu@
-host_vendor = @host_vendor@
+platform = @platform@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
BUILD_CC = @BUILD_CC@
BUILD_CFLAGS = -g -O2
BUILD_CPPFLAGS = -I. -Iinclude -I$(srcdir)/include -Wall -W \
- -DGRUB_DATADIR=\"$(pkgdatadir)\"
+ -DGRUB_LIBDIR=\"$(pkglibdir)\"
OBJCOPY = @OBJCOPY@
STRIP = @STRIP@
NM = @NM@
$(RUBY) $(srcdir)/genmk.rb < $< > $@; \
fi
-include $(srcdir)/conf/$(host_cpu)-$(host_vendor).mk
+include $(srcdir)/conf/$(host_cpu)-$(platform).mk
### General targets.
install: install-local
install-local: all
- $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
+ $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
@list='$(DATA)'; \
for file in $$list; do \
if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
dest="`echo $$file | sed 's,.*/,,'`"; \
- $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
+ $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkglibdir)/$$dest; \
done
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_UTILITIES)'; for file in $$list; do \
@list='$(DATA)'; \
for file in $$list; do \
dest="`echo $$file | sed 's,.*/,,'`"; \
- rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
+ rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
done
@list='$(bin_UTILITIES)'; for file in $$list; do \
dest="`echo $$file | sed 's,.*/,,'`"; \
NIIBE Yutaka <gniibe@m17n.org>
Omniflux <omniflux@omniflux.com>
Robert Bihlmeyer <robbe@orcus.priv.at>
+Roger Leigh <rleigh@whinlatter.ukfsn.org>
Ruslan Nikolaev <nruslan@mail.com>
Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Tomas Ebenlendr <ebik@ucw.cz>
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT YACC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE OBJCOPY ac_ct_OBJCOPY STRIP ac_ct_STRIP NM ac_ct_NM LD ac_ct_LD RUBY BUILD_CC CPP EGREP LIBLZO LIBCURSES LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os platform CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT YACC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE OBJCOPY ac_ct_OBJCOPY STRIP ac_ct_STRIP NM ac_ct_NM LD ac_ct_LD RUBY BUILD_CC CPP EGREP LIBLZO LIBCURSES LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
--disable-largefile omit support for large files
--enable-mm-debug include memory manger debugging
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-platform=PLATFORM
+ select the host platform guessed
+
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
{ (exit 1); exit 1; }; } ;;
esac
-case "$host_cpu"-"$host_vendor" in
- i386-apple | *-efi) host_vendor=efi ;;
- i386-*) host_vendor=pc ;;
- powerpc-*) host_vendor=ieee1275 ;;
- sparc64-*) host_vendor=ieee1275 ;;
+# Specify the platform (such as firmware).
+
+# Check whether --with-platform or --without-platform was given.
+if test "${with_platform+set}" = set; then
+ withval="$with_platform"
+
+fi;
+
+# Guess the platform if not specified.
+if test "x$with_platform" = x; then
+ case "$host_cpu"-"$host_vendor" in
+ i386-apple) platform=efi ;;
+ i386-*) platform=pc ;;
+ powerpc-*) platform=ieee1275 ;;
+ sparc64-*) platform=ieee1275 ;;
+ *) { { echo "$as_me:$LINENO: error: unsupported machine type" >&5
+echo "$as_me: error: unsupported machine type" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+else
+ platform="$with_platform"
+fi
+
+# Sanity check.
+case "$host_cpu"-"$platform" in
+ i386-efi) ;;
+ i386-pc) ;;
+ powerpc-ieee1275) ;;
+ sparc64-ieee1275) ;;
*) { { echo "$as_me:$LINENO: error: unsupported machine type" >&5
echo "$as_me: error: unsupported machine type" >&2;}
{ (exit 1); exit 1; }; } ;;
fi;
# Output files.
- ac_config_links="$ac_config_links include/grub/cpu:include/grub/$host_cpu include/grub/machine:include/grub/$host_cpu/$host_vendor"
+ ac_config_links="$ac_config_links include/grub/cpu:include/grub/$host_cpu include/grub/machine:include/grub/$host_cpu/$platform"
ac_config_files="$ac_config_files Makefile gensymlist.sh genkernsyms.sh"
"genkernsyms.sh" ) CONFIG_FILES="$CONFIG_FILES genkernsyms.sh" ;;
"stamp-h" ) CONFIG_FILES="$CONFIG_FILES stamp-h" ;;
"include/grub/cpu" ) CONFIG_LINKS="$CONFIG_LINKS include/grub/cpu:include/grub/$host_cpu" ;;
- "include/grub/machine" ) CONFIG_LINKS="$CONFIG_LINKS include/grub/machine:include/grub/$host_cpu/$host_vendor" ;;
+ "include/grub/machine" ) CONFIG_LINKS="$CONFIG_LINKS include/grub/machine:include/grub/$host_cpu/$platform" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
+s,@platform@,$platform,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
*) AC_MSG_ERROR([unsupported CPU type]) ;;
esac
-case "$host_cpu"-"$host_vendor" in
- i386-apple | *-efi) host_vendor=efi ;;
- i386-*) host_vendor=pc ;;
- powerpc-*) host_vendor=ieee1275 ;;
- sparc64-*) host_vendor=ieee1275 ;;
+# Specify the platform (such as firmware).
+AC_ARG_WITH([platform],
+ AS_HELP_STRING([--with-platform=PLATFORM],
+ [select the host platform [guessed]]))
+
+# Guess the platform if not specified.
+if test "x$with_platform" = x; then
+ case "$host_cpu"-"$host_vendor" in
+ i386-apple) platform=efi ;;
+ i386-*) platform=pc ;;
+ powerpc-*) platform=ieee1275 ;;
+ sparc64-*) platform=ieee1275 ;;
+ *) AC_MSG_ERROR([unsupported machine type]) ;;
+ esac
+else
+ platform="$with_platform"
+fi
+
+# Sanity check.
+case "$host_cpu"-"$platform" in
+ i386-efi) ;;
+ i386-pc) ;;
+ powerpc-ieee1275) ;;
+ sparc64-ieee1275) ;;
*) AC_MSG_ERROR([unsupported machine type]) ;;
esac
AC_SUBST(host_cpu)
-AC_SUBST(host_vendor)
+AC_SUBST(platform)
# Checks for programs.
if test "x$CFLAGS" = x; then
# Output files.
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$host_cpu
- include/grub/machine:include/grub/$host_cpu/$host_vendor])
+ include/grub/machine:include/grub/$host_cpu/$platform])
AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
AC_OUTPUT
-v, --verbose print verbose messages\n\
\n\
Report bugs to <%s>.\n\
-", GRUB_DATADIR, PACKAGE_BUGREPORT);
+", GRUB_LIBDIR, PACKAGE_BUGREPORT);
exit (status);
}
if (! fp)
grub_util_error ("cannot open %s", output);
- convert_elf (dir ? : GRUB_DATADIR, fp, argv + optind);
+ convert_elf (dir ? : GRUB_LIBDIR, fp, argv + optind);
fclose (fp);
#! /bin/sh
# Install GRUB on your drive.
-# Copyright (C) 1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
+# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
prefix=@prefix@
exec_prefix=@exec_prefix@
sbindir=@sbindir@
-datadir=@datadir@
+libdir=@libdir@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
host_cpu=@host_cpu@
-host_os=@host_os@
-host_vendor=@host_vendor@
-pkgdatadir=${datadir}/${PACKAGE_TARNAME}/${host_cpu}-${host_vendor}
+platform=@platform@
+pkglibdir=${libdir}/${PACKAGE_TARNAME}/${host_cpu}-${platform}
grub_setup=${sbindir}/grub-setup
grub_mkimage=${sbindir}/grub-mkimage
rm -f $file || exit 1
fi
done
-for file in ${pkgdatadir}/*.mod ${pkgdatadir}/*.lst ${pkgdatadir}/*.img; do
+for file in ${pkglibdir}/*.mod ${pkglibdir}/*.lst ${pkglibdir}/*.img; do
cp -f $file ${grubdir} || exit 1
done
-v, --verbose print verbose messages\n\
\n\
Report bugs to <%s>.\n\
-", GRUB_DATADIR, PACKAGE_BUGREPORT);
+", GRUB_LIBDIR, PACKAGE_BUGREPORT);
exit (status);
}
grub_util_error ("cannot open %s", output);
}
- generate_image (dir ? : GRUB_DATADIR, fp, argv + optind);
+ generate_image (dir ? : GRUB_LIBDIR, fp, argv + optind);
fclose (fp);
#! /bin/sh
# Install GRUB on your drive.
-# Copyright (C) 1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
+# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
prefix=@prefix@
exec_prefix=@exec_prefix@
sbindir=@sbindir@
-datadir=@datadir@
+libdir=@libdir@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
host_cpu=@host_cpu@
-host_os=@host_os@
-host_vendor=@host_vendor@
-pkgdatadir=${datadir}/${PACKAGE_TARNAME}/${host_cpu}-${host_vendor}
+platform=@platform@
+pkglibdir=${libdir}/${PACKAGE_TARNAME}/${host_cpu}-${platform}
grub_mkimage=${sbindir}/grub-mkimage
rootdir=
rm -f $file || exit 1
fi
done
-for file in ${pkgdatadir}/*.mod ${pkgdatadir}/*.lst ; do
+for file in ${pkglibdir}/*.mod ${pkglibdir}/*.lst ; do
cp -f $file ${grubdir} || exit 1
done
# Create the core image with all modules, unless user specified a subset.
# XXX probe for partition map and filesystem?
if test "x$modules" = x; then
- modules="$pkgdatadir"/*.mod
+ modules="$pkglibdir"/*.mod
fi
# Now perform the installation.
/*
* GRUB -- GRand Unified Bootloader
- * Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2004,2005,2006 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
-v, --verbose print verbose messages\n\
\n\
Report bugs to <%s>.\n\
-", GRUB_DATADIR, PACKAGE_BUGREPORT);
+", GRUB_LIBDIR, PACKAGE_BUGREPORT);
exit (status);
}
if (! fp)
grub_util_error ("cannot open %s", output);
- add_segments (dir ? : GRUB_DATADIR, fp, chrp, argv + optind);
+ add_segments (dir ? : GRUB_LIBDIR, fp, chrp, argv + optind);
fclose (fp);