bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Update to automake 1.8


From: Jeroen Dekkers
Subject: [PATCH] Update to automake 1.8
Date: Thu, 22 Apr 2004 15:19:51 +0200
User-agent: Mutt/1.5.5.1+cvs20040105i

Hi,

I recently looked at the manual and saw that the version and date
weren't updated.  This is because automake 1.7 doesn't update info
files (and thus version.texi) in the source directory but in the
build directory.  Automake 1.8 changed this back, and if you change
the manual the version.texi in the source directory will also be
updated automatically.  The following patch updates the input files
so that everything works fine with automake 1.8.

It also fixes some portability issue, namely that pattern rules (%:
%.exec) are only supported by GNU make.  It is now possible to
compile grub with BSD make.

OK to commit?

2004-04-22  Jeroen Dekkers  <address@hidden>

        * Makefile.am (AUTOMAKE_OPTIONS): Change to "1.8 gnu".
        * configure.ac: Update to automake 1.8, quote all AC_DEFUN's
        correctly and provide descriptions for AC_DEFINE's.
        * acinclude.m4: Likewise.
        * acconfig.h: Removed.
        
        * stage1/Makefile.am (.exec): Use suffix rules instead of pattern
        rules.
        * stage2/Makefile.am (.exec): Likewise.

Index: acinclude.m4
===================================================================
RCS file: /cvsroot/grub/grub/acinclude.m4,v
retrieving revision 1.20
diff -u -p -r1.20 acinclude.m4
--- acinclude.m4        13 Jul 2001 08:02:04 -0000      1.20
+++ acinclude.m4        22 Apr 2004 12:06:38 -0000
@@ -2,7 +2,7 @@ dnl grub_ASM_USCORE checks if C symbols 
 dnl compiling to assembler.
 dnl Written by Pavel Roskin. Based on grub_ASM_EXT_C written by
 dnl Erich Boleyn and modified by OKUJI Yoshinori
-AC_DEFUN(grub_ASM_USCORE,
+AC_DEFUN([grub_ASM_USCORE],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING([if C symbols get an underscore after compilation])
 AC_CACHE_VAL(grub_cv_asm_uscore,
@@ -40,7 +40,7 @@ AC_MSG_RESULT([$grub_cv_asm_uscore])
 
 dnl Some versions of `objcopy -O binary' vary their output depending
 dnl on the link address.
-AC_DEFUN(grub_PROG_OBJCOPY_ABSOLUTE,
+AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
 [AC_MSG_CHECKING([whether ${OBJCOPY} works for absolute addresses])
 AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
 [cat > conftest.c <<\EOF
@@ -88,7 +88,7 @@ dnl
 dnl We only support the newer versions, because the old versions cause
 dnl major pain, by requiring manual assembly to get 16-bit instructions into
 dnl stage1/stage1.S.
-AC_DEFUN(grub_ASM_ADDR32,
+AC_DEFUN([grub_ASM_ADDR32],
 [AC_REQUIRE([AC_PROG_CC])
 AC_REQUIRE([grub_ASM_PREFIX_REQUIREMENT])
 AC_MSG_CHECKING([for .code16 addr32 assembler support])
@@ -118,7 +118,7 @@ dnl
 dnl Later versions of GAS requires that addr32 and data32 prefixes
 dnl appear in the same lines as the instructions they modify, while
 dnl earlier versions requires that they appear in separate lines.
-AC_DEFUN(grub_ASM_PREFIX_REQUIREMENT,
+AC_DEFUN([grub_ASM_PREFIX_REQUIREMENT],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING(dnl
 [whether addr32 must be in the same line as the instruction])
@@ -154,7 +154,7 @@ AC_MSG_RESULT([$grub_cv_asm_prefix_requi
 dnl
 dnl Older versions of GAS require that absolute indirect calls/jumps are
 dnl not prefixed with `*', while later versions warn if not prefixed.
-AC_DEFUN(grub_ASM_ABSOLUTE_WITHOUT_ASTERISK,
+AC_DEFUN([grub_ASM_ABSOLUTE_WITHOUT_ASTERISK],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING(dnl
 [whether an absolute indirect call/jump must not be prefixed with an asterisk])
@@ -175,7 +175,7 @@ fi
 rm -f conftest*])
 
 if test "x$grub_cv_asm_absolute_without_asterisk" = xyes; then
-  AC_DEFINE([ABSOLUTE_WITHOUT_ASTERISK])
+  AC_DEFINE(ABSOLUTE_WITHOUT_ASTERISK, 1, [Define if an absolute indirect 
call/jump must NOT be prefixed with `*'])
 fi
 
 AC_MSG_RESULT([$grub_cv_asm_absolute_without_asterisk])])
@@ -184,7 +184,7 @@ dnl
 dnl grub_CHECK_START_SYMBOL checks if start is automatically defined by
 dnl the compiler.
 dnl Written by OKUJI Yoshinori
-AC_DEFUN(grub_CHECK_START_SYMBOL,
+AC_DEFUN([grub_CHECK_START_SYMBOL],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING([if start is defined by the compiler])
 AC_CACHE_VAL(grub_cv_check_start_symbol,
@@ -193,7 +193,7 @@ AC_CACHE_VAL(grub_cv_check_start_symbol,
    grub_cv_check_start_symbol=no)])
 
 if test "x$grub_cv_check_start_symbol" = xyes; then
-  AC_DEFINE([HAVE_START_SYMBOL])
+  AC_DEFINE(HAVE_START_SYMBOL, 1, [Define if start is defined])
 fi
 
 AC_MSG_RESULT([$grub_cv_check_start_symbol])
@@ -203,7 +203,7 @@ dnl
 dnl grub_CHECK_USCORE_START_SYMBOL checks if _start is automatically
 dnl defined by the compiler.
 dnl Written by OKUJI Yoshinori
-AC_DEFUN(grub_CHECK_USCORE_START_SYMBOL,
+AC_DEFUN([grub_CHECK_USCORE_START_SYMBOL],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING([if _start is defined by the compiler])
 AC_CACHE_VAL(grub_cv_check_uscore_start_symbol,
@@ -212,7 +212,7 @@ AC_CACHE_VAL(grub_cv_check_uscore_start_
    grub_cv_check_uscore_start_symbol=no)])
 
 if test "x$grub_cv_check_uscore_start_symbol" = xyes; then
-  AC_DEFINE([HAVE_USCORE_START_SYMBOL])
+  AC_DEFINE(HAVE_USCORE_START_SYMBOL, 1, [Define if _start is defined])
 fi
 
 AC_MSG_RESULT([$grub_cv_check_uscore_start_symbol])
@@ -222,7 +222,7 @@ dnl
 dnl grub_CHECK_USCORE_USCORE_BSS_START_SYMBOL checks if __bss_start is
 dnl automatically defined by the compiler.
 dnl Written by Michael Hohmoth.
-AC_DEFUN(grub_CHECK_USCORE_USCORE_BSS_START_SYMBOL,
+AC_DEFUN([grub_CHECK_USCORE_USCORE_BSS_START_SYMBOL],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING([if __bss_start is defined by the compiler])
 AC_CACHE_VAL(grub_cv_check_uscore_uscore_bss_start_symbol,
@@ -231,7 +231,7 @@ AC_CACHE_VAL(grub_cv_check_uscore_uscore
    grub_cv_check_uscore_uscore_bss_start_symbol=no)])
 
 if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" = xyes; then
-  AC_DEFINE([HAVE_USCORE_USCORE_BSS_START_SYMBOL])
+  AC_DEFINE(HAVE_USCORE_USCORE_BSS_START_SYMBOL, 1, [Define if __bss_start is 
defined])
 fi
 
 AC_MSG_RESULT([$grub_cv_check_uscore_uscore_bss_start_symbol])
@@ -241,7 +241,7 @@ dnl
 dnl grub_CHECK_EDATA_SYMBOL checks if edata is automatically defined by the
 dnl compiler.
 dnl Written by Michael Hohmuth.
-AC_DEFUN(grub_CHECK_EDATA_SYMBOL,
+AC_DEFUN([grub_CHECK_EDATA_SYMBOL],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING([if edata is defined by the compiler])
 AC_CACHE_VAL(grub_cv_check_edata_symbol,
@@ -250,7 +250,7 @@ AC_CACHE_VAL(grub_cv_check_edata_symbol,
    grub_cv_check_edata_symbol=no)])
 
 if test "x$grub_cv_check_edata_symbol" = xyes; then
-  AC_DEFINE([HAVE_EDATA_SYMBOL])
+  AC_DEFINE(HAVE_EDATA_SYMBOL, 1, [Define if edata is defined])
 fi
 
 AC_MSG_RESULT([$grub_cv_check_edata_symbol])
@@ -260,7 +260,7 @@ dnl
 dnl grub_CHECK_USCORE_EDATA_SYMBOL checks if _edata is automatically
 dnl defined by the compiler.
 dnl Written by Michael Hohmuth.
-AC_DEFUN(grub_CHECK_USCORE_EDATA_SYMBOL,
+AC_DEFUN([grub_CHECK_USCORE_EDATA_SYMBOL],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING([if _edata is defined by the compiler])
 AC_CACHE_VAL(grub_cv_check_uscore_edata_symbol,
@@ -269,7 +269,7 @@ AC_CACHE_VAL(grub_cv_check_uscore_edata_
    grub_cv_check_uscore_edata_symbol=no)])
 
 if test "x$grub_cv_check_uscore_edata_symbol" = xyes; then
-  AC_DEFINE([HAVE_USCORE_EDATA_SYMBOL])
+  AC_DEFINE(HAVE_USCORE_EDATA_SYMBOL, 1, [Define if _edata is defined])
 fi
 
 AC_MSG_RESULT([$grub_cv_check_uscore_edata_symbol])
@@ -279,7 +279,7 @@ dnl
 dnl grub_CHECK_END_SYMBOL checks if end is automatically defined by the
 dnl compiler.
 dnl Written by OKUJI Yoshinori
-AC_DEFUN(grub_CHECK_END_SYMBOL,
+AC_DEFUN([grub_CHECK_END_SYMBOL],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING([if end is defined by the compiler])
 AC_CACHE_VAL(grub_cv_check_end_symbol,
@@ -288,7 +288,7 @@ AC_CACHE_VAL(grub_cv_check_end_symbol,
    grub_cv_check_end_symbol=no)])
 
 if test "x$grub_cv_check_end_symbol" = xyes; then
-  AC_DEFINE([HAVE_END_SYMBOL])
+  AC_DEFINE(HAVE_END_SYMBOL, 1, [Define if end is defined])
 fi
 
 AC_MSG_RESULT([$grub_cv_check_end_symbol])
@@ -298,7 +298,7 @@ dnl
 dnl grub_CHECK_USCORE_END_SYMBOL checks if _end is automatically defined
 dnl by the compiler.
 dnl Written by OKUJI Yoshinori
-AC_DEFUN(grub_CHECK_USCORE_END_SYMBOL,
+AC_DEFUN([grub_CHECK_USCORE_END_SYMBOL],
 [AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING([if _end is defined by the compiler])
 AC_CACHE_VAL(grub_cv_check_uscore_end_symbol,
@@ -307,18 +307,18 @@ AC_CACHE_VAL(grub_cv_check_uscore_end_sy
    grub_cv_check_uscore_end_symbol=no)])
 
 if test "x$grub_cv_check_uscore_end_symbol" = xyes; then
-  AC_DEFINE([HAVE_USCORE_END_SYMBOL])
+  AC_DEFINE(HAVE_USCORE_END_SYMBOL, 1, [Define if end is defined])
 fi
 
 AC_MSG_RESULT([$grub_cv_check_uscore_end_symbol])
 ])
 
-dnl grub_DEFINE_FILE(MACRO_NAME, FILE_NAME)
+dnl grub_DEFINE_FILE(MACRO_NAME, FILE_NAME, DESCRIPTION)
 dnl grub_DEFINE_FILE defines a macro as the contents of a file safely.
 dnl Replace some escape sequences, because autoconf doesn't handle them
 dnl gracefully.
 dnl Written by OKUJI Yoshinori.
-AC_DEFUN(grub_DEFINE_FILE,
+AC_DEFUN([grub_DEFINE_FILE],
 [AC_REQUIRE([AC_PROG_CC])
 # Because early versions of GNU sed 3.x are too buggy, use a C program
 # instead of shell commands. *sigh*
@@ -361,6 +361,6 @@ else
   AC_MSG_ERROR([${CC-cc} failed to produce an executable file])
 fi
 
-AC_DEFINE_UNQUOTED([$1], "$grub_tmp_value")
+AC_DEFINE_UNQUOTED([$1], "$grub_tmp_value", [$3])
 rm -f conftest*
 ])
Index: Makefile.am
===================================================================
RCS file: /cvsroot/grub/grub/Makefile.am,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile.am
--- Makefile.am 19 Oct 2003 17:36:29 -0000      1.15
+++ Makefile.am 22 Apr 2004 12:06:38 -0000
@@ -1,4 +1,4 @@
 # Do not change this order if you don't know what you are doing.
-AUTOMAKE_OPTIONS = 1.7
+AUTOMAKE_OPTIONS = 1.8 gnu
 SUBDIRS = netboot stage2 stage1 lib grub util docs
 EXTRA_DIST = BUGS MAINTENANCE
Index: configure.ac
===================================================================
RCS file: /cvsroot/grub/grub/configure.ac,v
retrieving revision 1.3
diff -u -p -r1.3 configure.ac
--- configure.ac        4 Apr 2004 09:15:43 -0000       1.3
+++ configure.ac        22 Apr 2004 12:06:38 -0000
@@ -208,9 +208,9 @@ AC_CHECK_LIB(util, opendisk, [GRUB_LIBS=
 # Unless the user specify --without-curses, check for curses.
 if test "x$with_curses" != "xno"; then
   AC_CHECK_LIB(ncurses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lncurses"
-  AC_DEFINE(HAVE_LIBCURSES)],
+  AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])],
     [AC_CHECK_LIB(curses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lcurses"
-       AC_DEFINE(HAVE_LIBCURSES)])])
+       AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])])
 fi
 
 AC_SUBST(GRUB_LIBS)
@@ -620,7 +620,8 @@ if test "x$enable_preset_menu" = x; then
   :
 else
   if test -r $enable_preset_menu; then
-    grub_DEFINE_FILE(PRESET_MENU_STRING, [$enable_preset_menu])
+    grub_DEFINE_FILE(PRESET_MENU_STRING, [$enable_preset_menu],
+                    [Define if there is user specified preset menu string])
   else
     AC_MSG_ERROR([Cannot read the preset menu file $enable_preset_menu])
   fi
@@ -639,7 +640,7 @@ AC_ARG_ENABLE(auto-linux-mem-opt,
 if test "x$enable_auto_linux_mem_opt" = xno; then
   :
 else
-  AC_DEFINE(AUTO_LINUX_MEM_OPT)
+  AC_DEFINE(AUTO_LINUX_MEM_OPT, 1, [Define if you don't want to pass the mem= 
option to Linux])
 fi
 
 dnl Now substitute the variables.
Index: stage1/Makefile.am
===================================================================
RCS file: /cvsroot/grub/grub/stage1/Makefile.am,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile.am
--- stage1/Makefile.am  19 Oct 2003 17:36:29 -0000      1.15
+++ stage1/Makefile.am  22 Apr 2004 12:06:38 -0000
@@ -10,5 +10,6 @@ LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
 noinst_PROGRAMS = stage1.exec
 stage1_exec_SOURCES = stage1.S stage1.h
 
-%: %.exec
+SUFFIXES = .exec
+.exec:
        $(OBJCOPY) -O binary $< $@
Index: stage2/Makefile.am
===================================================================
RCS file: /cvsroot/grub/grub/stage2/Makefile.am,v
retrieving revision 1.42
diff -u -p -r1.42 Makefile.am
--- stage2/Makefile.am  27 Mar 2004 17:02:53 -0000      1.42
+++ stage2/Makefile.am  22 Apr 2004 12:06:38 -0000
@@ -255,5 +255,6 @@ pxegrub: pxeloader diskless
        cat $^ > $@
 
 # General rule for making a raw binary.
-%: %.exec
+SUFFIXES = .exec
+.exec:
        $(OBJCOPY) -O binary $< $@


-- 
Jeroen Dekkers

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]