automake
[Top][All Lists]
Advanced

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

Re: Choose SET_MAKE correctly when there is no `make'


From: Paul Eggert
Subject: Re: Choose SET_MAKE correctly when there is no `make'
Date: Tue, 04 Jan 2005 11:49:08 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Noah Misch <address@hidden> writes:

> 2005-01-04  Noah Misch  <address@hidden>
>
>       * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): If the Make program does
>       not seem to work, assume it does set $(MAKE).  Make `MAKE' precious.
>       * doc/autoconf.texi (AC_PROG_MAKE_SET): Update.

That patch doesn't work for me.  When I build and install autoconf
with the patch (putting the installed Autoconf in my PATH), then do
"rm aclocal.m4; make" in autoconf, it generates a "configure" script
that doesn't work;

  $ make
  Making all in bin
  /bin/sh: all: command not found
  make: *** [all-recursive] Error 1

This is because "Makefile" has a line "MAKE = " in it (as Automake
1.9.4 generated a "MAKE = @MAKE@" line in Makefile.in).

Here is the output of "cvs diff -pu" after this failure:

Index: ChangeLog
===================================================================
RCS file: /cvsroot/autoconf/autoconf/ChangeLog,v
retrieving revision 1.2465
diff -p -u -r1.2465 ChangeLog
--- ChangeLog   3 Jan 2005 23:32:35 -0000       1.2465
+++ ChangeLog   4 Jan 2005 19:44:42 -0000
@@ -1,3 +1,9 @@
+2005-01-04  Noah Misch  <address@hidden>
+
+       * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): If the Make program does
+       not seem to work, assume it does set $(MAKE).  Make `MAKE' precious.
+       * doc/autoconf.texi (AC_PROG_MAKE_SET): Update.
+
 2005-01-03  Stepan Kasal  <address@hidden>
 
        * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Add a comment about nesting.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/Makefile.in,v
retrieving revision 1.223
diff -p -u -r1.223 Makefile.in
--- Makefile.in 29 Dec 2004 06:55:11 -0000      1.223
+++ Makefile.in 4 Jan 2005 19:44:42 -0000
@@ -102,6 +102,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: configure
===================================================================
RCS file: /cvsroot/autoconf/autoconf/configure,v
retrieving revision 1.280
diff -p -u -r1.280 configure
--- configure   3 Jan 2005 22:54:36 -0000       1.280
+++ configure   4 Jan 2005 19:44:43 -0000
@@ -518,7 +518,7 @@ PACKAGE_STRING='GNU Autoconf 2.59c'
 PACKAGE_BUGREPORT='address@hidden'
 
 ac_unique_file="ChangeLog"
-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 
INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL 
AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP 
INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar 
am__untar ac_cv_sh_n_works EXPR M4 HELP2MAN PERL TEST_EMACS EMACS EMACSLOADPATH 
lispdir GREP 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 
INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL 
AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP 
INSTALL_STRIP_PROGRAM mkdir_p AWK MAKE SET_MAKE am__leading_dot AMTAR am__tar 
am__untar ac_cv_sh_n_works EXPR M4 HELP2MAN PERL TEST_EMACS EMACS EMACSLOADPATH 
lispdir GREP LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -962,6 +962,10 @@ ac_env_target_alias_set=${target_alias+s
 ac_env_target_alias_value=$target_alias
 ac_cv_env_target_alias_set=${target_alias+set}
 ac_cv_env_target_alias_value=$target_alias
+ac_env_MAKE_set=${MAKE+set}
+ac_env_MAKE_value=$MAKE
+ac_cv_env_MAKE_set=${MAKE+set}
+ac_cv_env_MAKE_value=$MAKE
 ac_env_EMACS_set=${EMACS+set}
 ac_env_EMACS_value=$EMACS
 ac_cv_env_EMACS_set=${EMACS+set}
@@ -1050,6 +1054,7 @@ Optional Packages:
   --with-lispdir          override the default lisp directory
 
 Some influential environment variables:
+  MAKE        Program maintenance utility
   EMACS       the Emacs editor command
   EMACSLOADPATH
               the Emacs library search path
@@ -1762,6 +1767,7 @@ done
 
 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1769,11 +1775,11 @@ else
   cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
-       @echo 'ac_maketemp="$(MAKE)"'
+       @echo 'ac_maketemp=X"$(MAKE)"'
 _ACEOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
+if test "$ac_maketemp" != X ; then
   eval ac_cv_prog_make_${ac_make}_set=yes
 else
   eval ac_cv_prog_make_${ac_make}_set=no
@@ -3142,6 +3148,7 @@ s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
 s,@mkdir_p@,$mkdir_p,;t t
 s,@AWK@,$AWK,;t t
+s,@MAKE@,$MAKE,;t t
 s,@SET_MAKE@,$SET_MAKE,;t t
 s,@am__leading_dot@,$am__leading_dot,;t t
 s,@AMTAR@,$AMTAR,;t t
Index: bin/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/Makefile.in,v
retrieving revision 1.52
diff -p -u -r1.52 Makefile.in
--- bin/Makefile.in     20 Dec 2004 04:12:52 -0000      1.52
+++ bin/Makefile.in     4 Jan 2005 19:44:43 -0000
@@ -76,6 +76,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: config/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/config/Makefile.in,v
retrieving revision 1.47
diff -p -u -r1.47 Makefile.in
--- config/Makefile.in  20 Dec 2004 04:12:52 -0000      1.47
+++ config/Makefile.in  4 Jan 2005 19:44:43 -0000
@@ -71,6 +71,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: doc/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/Makefile.in,v
retrieving revision 1.152
diff -p -u -r1.152 Makefile.in
--- doc/Makefile.in     20 Dec 2004 04:12:52 -0000      1.152
+++ doc/Makefile.in     4 Jan 2005 19:44:43 -0000
@@ -84,6 +84,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.860
diff -p -u -r1.860 autoconf.texi
--- doc/autoconf.texi   3 Jan 2005 08:31:44 -0000       1.860
+++ doc/autoconf.texi   4 Jan 2005 19:44:43 -0000
@@ -1835,9 +1835,10 @@ following macro allows you to use it eve
 @defmac AC_PROG_MAKE_SET
 @acindex{PROG_MAKE_SET}
 @ovindex SET_MAKE
-If @command{make} predefines the Make variable @code{MAKE}, define
-output variable @code{SET_MAKE} to be empty.  Otherwise, define
address@hidden to contain @samp{MAKE=make}.  Calls @code{AC_SUBST} for
+If the Make command, @code{$MAKE} if set or else @samp{make}, predefines
address@hidden(MAKE)}, define output variable @code{SET_MAKE} to be empty.
+Otherwise, define @code{SET_MAKE} to a macro definition that sets
address@hidden(MAKE)}, such as @samp{MAKE=make}.  Calls @code{AC_SUBST} for
 @code{SET_MAKE}.
 @end defmac
 
Index: lib/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/Makefile.in,v
retrieving revision 1.44
diff -p -u -r1.44 Makefile.in
--- lib/Makefile.in     20 Dec 2004 04:12:52 -0000      1.44
+++ lib/Makefile.in     4 Jan 2005 19:44:43 -0000
@@ -88,6 +88,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: lib/Autom4te/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/Autom4te/Makefile.in,v
retrieving revision 1.43
diff -p -u -r1.43 Makefile.in
--- lib/Autom4te/Makefile.in    20 Dec 2004 04:12:52 -0000      1.43
+++ lib/Autom4te/Makefile.in    4 Jan 2005 19:44:43 -0000
@@ -82,6 +82,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: lib/autoconf/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/Makefile.in,v
retrieving revision 1.57
diff -p -u -r1.57 Makefile.in
--- lib/autoconf/Makefile.in    20 Dec 2004 04:12:52 -0000      1.57
+++ lib/autoconf/Makefile.in    4 Jan 2005 19:44:43 -0000
@@ -84,6 +84,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: lib/autoconf/programs.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/programs.m4,v
retrieving revision 1.37
diff -p -u -r1.37 programs.m4
--- lib/autoconf/programs.m4    2 Jan 2005 16:48:12 -0000       1.37
+++ lib/autoconf/programs.m4    4 Jan 2005 19:44:43 -0000
@@ -2,7 +2,7 @@
 # Checking for programs.
 
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2004 Free Software Foundation, Inc.
+# 2002, 2004, 2005 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
@@ -672,21 +672,25 @@ fi
 
 # AC_PROG_MAKE_SET
 # ----------------
-# Define SET_MAKE to set ${MAKE} if make doesn't.
+# Define SET_MAKE to set ${MAKE} if Make does not do so automatically.  If Make
+# does not run the test Makefile, we assume that the Make program the user will
+# invoke does set $(MAKE).  This is typical, and emitting `MAKE=foomake' is
+# always wrong if `foomake' is not available or does not work.
 AN_MAKEVAR([MAKE], [AC_PROG_MAKE_SET])
 AN_PROGRAM([make], [AC_PROG_MAKE_SET])
 AC_DEFUN([AC_PROG_MAKE_SET],
 [AC_MSG_CHECKING([whether ${MAKE-make} sets \$(MAKE)])
+AC_ARG_VAR([MAKE], [Program maintenance utility])
 set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y,:./+-,___p_,'`
 AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
 [cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
-       @echo 'ac_maketemp="$(MAKE)"'
+       @echo 'ac_maketemp=X"$(MAKE)"'
 _ACEOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
+if test "$ac_maketemp" != X ; then
   eval ac_cv_prog_make_${ac_make}_set=yes
 else
   eval ac_cv_prog_make_${ac_make}_set=no
Index: lib/autoscan/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoscan/Makefile.in,v
retrieving revision 1.46
diff -p -u -r1.46 Makefile.in
--- lib/autoscan/Makefile.in    20 Dec 2004 04:12:52 -0000      1.46
+++ lib/autoscan/Makefile.in    4 Jan 2005 19:44:43 -0000
@@ -80,6 +80,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: lib/autotest/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/Makefile.in,v
retrieving revision 1.47
diff -p -u -r1.47 Makefile.in
--- lib/autotest/Makefile.in    20 Dec 2004 04:12:52 -0000      1.47
+++ lib/autotest/Makefile.in    4 Jan 2005 19:44:44 -0000
@@ -84,6 +84,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: lib/emacs/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/emacs/Makefile.in,v
retrieving revision 1.36
diff -p -u -r1.36 Makefile.in
--- lib/emacs/Makefile.in       20 Dec 2004 04:12:52 -0000      1.36
+++ lib/emacs/Makefile.in       4 Jan 2005 19:44:44 -0000
@@ -84,6 +84,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: lib/m4sugar/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/Makefile.in,v
retrieving revision 1.48
diff -p -u -r1.48 Makefile.in
--- lib/m4sugar/Makefile.in     20 Dec 2004 04:12:52 -0000      1.48
+++ lib/m4sugar/Makefile.in     4 Jan 2005 19:44:44 -0000
@@ -84,6 +84,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: man/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/man/Makefile.in,v
retrieving revision 1.69
diff -p -u -r1.69 Makefile.in
--- man/Makefile.in     29 Dec 2004 06:55:11 -0000      1.69
+++ man/Makefile.in     4 Jan 2005 19:44:44 -0000
@@ -74,6 +74,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Index: tests/Makefile.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/Makefile.in,v
retrieving revision 1.152
diff -p -u -r1.152 Makefile.in
--- tests/Makefile.in   20 Dec 2004 04:12:52 -0000      1.152
+++ tests/Makefile.in   4 Jan 2005 19:44:44 -0000
@@ -70,6 +70,7 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
 M4 = @M4@
+MAKE = @MAKE@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@




reply via email to

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