* automake.in (lang_yacc_target_hook): Use AM_MAKEFLAGS in recursive
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 7 Aug 2005 08:30:30 +0000 (08:30 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 7 Aug 2005 08:30:30 +0000 (08:30 +0000)
$(MAKE) invocations.
* lib/am/texibuild.am (?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%):
Likewise.
* lib/am/texi-vers.am (%STAMPVTI%): Likewise.
* lib/am/remake-hdr.am (%CONFIG_H%): Likewise.
* Makefile.am (maintainer-check): Check for this.
Report from Stepan Kasal.

ChangeLog
Makefile.am
Makefile.in
automake.in
configure
doc/Makefile.in
lib/am/remake-hdr.am
lib/am/texi-vers.am
lib/am/texibuild.am

index f2e10c1..0a418b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2005-08-07  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * automake.in (lang_yacc_target_hook): Use AM_MAKEFLAGS in recursive
+       $(MAKE) invocations.
+       * lib/am/texibuild.am (?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%):
+       Likewise.
+       * lib/am/texi-vers.am (%STAMPVTI%): Likewise.
+       * lib/am/remake-hdr.am (%CONFIG_H%): Likewise.
+       * Makefile.am (maintainer-check): Check for this.
+       Report from Stepan Kasal.
+
        * m4/mkdirp.m4: Update misleading comment about `mkdir -p .'.
        Prompted by Stepan Kasal.
 
index 595dacb..db9c3cd 100644 (file)
@@ -2,7 +2,7 @@
 
 ## Makefile for Automake.
 
-## Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
+## Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -184,6 +184,12 @@ maintainer-check: automake aclocal
          exit 1; \
        fi
 ## Tests should never call make directly.
+       @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
+               grep -v 'AM_MAKEFLAGS'; then \
+         echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
+         exit 1; \
+       fi
+## Tests should never call make directly.
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*make'; then \
          echo 'Do not run "make" in the above tests.  Use "$$MAKE" instead.' 1>&2; \
          exit 1; \
index 8f223d9..7c8ec06 100644 (file)
@@ -740,6 +740,11 @@ maintainer-check: automake aclocal
          echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
          exit 1; \
        fi
+       @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
+               grep -v 'AM_MAKEFLAGS'; then \
+         echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
+         exit 1; \
+       fi
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*make'; then \
          echo 'Do not run "make" in the above tests.  Use "$$MAKE" instead.' 1>&2; \
          exit 1; \
index d07abcc..d8616a6 100755 (executable)
@@ -5425,12 +5425,13 @@ sub lang_yacc_target_hook
                                                  INTERNAL))
          {
            my $condstr = $cond->subst_string;
-           $output_rules .= ("$condstr${header}: $output\n"
-                             # Recover from removal of $header
-                             . "$condstr\t\@if test ! -f \$@; then \\\n"
-                             . "$condstr\t  rm -f $output; \\\n"
-                             . "$condstr\t  \$(MAKE) $output; \\\n"
-                             . "$condstr\telse :; fi\n");
+           $output_rules .=
+             "$condstr${header}: $output\n"
+             # Recover from removal of $header
+             . "$condstr\t\@if test ! -f \$@; then \\\n"
+             . "$condstr\t  rm -f $output; \\\n"
+             . "$condstr\t  \$(MAKE) $(AM_MAKEFLAGS) $output; \\\n"
+             . "$condstr\telse :; fi\n";
          }
        # Distribute the generated file, unless its .y source was
        # listed in a nodist_ variable.  (&handle_source_transform
index 267d81a..b14268c 100755 (executable)
--- a/configure
+++ b/configure
@@ -564,14 +564,14 @@ psdir
 libdir
 localedir
 mandir
-build_alias
-host_alias
-target_alias
 DEFS
 ECHO_C
 ECHO_N
 ECHO_T
 LIBS
+build_alias
+host_alias
+target_alias
 build
 build_cpu
 build_vendor
@@ -611,6 +611,9 @@ FGREP
 LIBOBJS
 LTLIBOBJS'
 ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias'
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1065,54 +1068,25 @@ fi
 (cd $srcdir && test -r "./$ac_unique_file") 2>/dev/null ||
   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
    { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^/]\)/*$%\1%'`
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
 
-ac_pwd=`pwd` && test -n "$ac_pwd" ||
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
   { echo "$as_me: error: Working directory cannot be determined" >&2
    { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
 
-ac_pat="[\$][{][_$as_cr_Letters][_$as_cr_alnum]*[}]"
-ac_pat1='*)*'
-
-for ac_var in ac_pwd srcdir
-do
-  # Remove references to shell or make variables.
-  eval ac_dir=\$$ac_var
-  ac_dirx=$ac_dir
-  while :
-  do
-    case $ac_dirx in
-    *\${*}*)
-      ac_dirx=`
-       expr "X$ac_dirx" : "X\\(.*\\)$ac_pat"`X`
-       expr "X$ac_dirx" : "X.*$ac_pat\\(.*\\)"`;;
-    *) break;;
-    esac
-  done
-
-  # Check for newline, tab, space, and other weird possibilities.
-  # Preserve that tab character below!
-  case $ac_dirx in
-  '' | -* | */-* | *'
-'* | *'        '* | *' '* | *\"* | *\#* | *\ | *\&* | *\'* | *\(* | $ac_pat1 | \
-  *\** | *\;* | *\<* | *\=* | *\>* | *\?* | *\[* | *\\* | *\`* | \
-  *\|* | \~*)
-    { echo "$as_me: error: $ac_var directory name \`$ac_dir' has special characters" >&2
-   { (exit 1); exit 1; }; };;
-  esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
 done
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
 
 #
 # Report the --help message.
@@ -1424,9 +1398,9 @@ _ASBOX
 
     if test -n "$ac_subst_files"; then
       cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
 _ASBOX
       echo
       for ac_var in $ac_subst_files
@@ -1492,14 +1466,17 @@ _ACEOF
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+       "$ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
   if test -r "$ac_site_file"; then
     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
@@ -1528,8 +1505,7 @@ fi
 # Check that the precious variables saved in the cache have kept the same
 # value.
 ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-              sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
   eval ac_old_set=\$ac_cv_env_${ac_var}_set
   eval ac_new_set=\$ac_env_${ac_var}_set
   eval ac_old_val=\$ac_cv_env_${ac_var}_value
@@ -1576,13 +1552,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov
    { (exit 1); exit 1; }; }
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
 
 
 
@@ -1607,6 +1576,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
@@ -1648,16 +1622,16 @@ echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
 if test "${ac_cv_build+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
-  ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$ac_config_guess`
+test "x$ac_build_alias" = x &&
   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
    { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ac_cv_build=`$ac_config_sub $ac_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_build_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
@@ -1816,10 +1790,10 @@ fi
 { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
 test "$program_prefix" != NONE &&
-  program_transform_name="s|^|$program_prefix|;$program_transform_name"
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
-  program_transform_name="s|\$|$program_suffix|;$program_transform_name"
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
 # Double any \ or $.  echo might interpret backslashes.
 # By default was `s,x,x', remove it if useless.
 cat <<\_ACEOF >conftest.sed
@@ -1842,26 +1816,30 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
+  # We used to define $(mkdir_p) as `mkdir -p -- .', in order to
   # allow $(mkdir_p) to be used without argument.  As in
   #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
+  # where $(somedir) is conditionally defined.  However we don't do
+  # that anymore.
+  #  1. before we restricted the check to GNU mkdir, `mkdir -p .' was
+  #     reported to fail in read-only directories.  The system where this
+  #     happened has been forgotten.
+  #  2. in practice we call $(mkdir_p) on directories such as
+  #       $(mkdir_p) "$(DESTDIR)$(somedir)"
+  #     and we don't want to create $(DESTDIR) if $(somedir) is empty.
+  #     To support the latter case, we have to write
+  #       test -z "$(somedir)" || $(mkdir_p) "$(DESTDIR)$(somedir)"
+  #     so $(mkdir_p) always has an argument.
+  #     We will have better chances of detecting a missing test if
+  #     $(mkdir_p) complains about missing arguments.
+  #  3. $(mkdir_p) is named after `mkdir -p' and we don't expect this
+  #     to accept no argument.
+  #  4. having something like `mkdir .' in the output is unsightly.
   mkdir_p='mkdir -p --'
 else
   # On NextStep and OpenStep, the `mkdir' command does not
   # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
+  # directories to create.
   for d in ./-p ./--version;
   do
     test -d $d && rmdir $d
@@ -3013,21 +2991,9 @@ echo >&5
 _ACEOF
 
 # Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
+cat >>$CONFIG_STATUS <<_ACEOF
+config_files="$ac_config_files"
+_ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF
 
@@ -3096,25 +3062,14 @@ cat >>$CONFIG_STATUS <<\_ACEOF
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     echo "$ac_cs_version"; exit ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
     ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
@@ -3260,14 +3215,14 @@ psdir!$psdir$ac_delim
 libdir!$libdir$ac_delim
 localedir!$localedir$ac_delim
 mandir!$mandir$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
 DEFS!$DEFS$ac_delim
 ECHO_C!$ECHO_C$ac_delim
 ECHO_N!$ECHO_N$ac_delim
 ECHO_T!$ECHO_T$ac_delim
 LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
 build!$build$ac_delim
 build_cpu!$build_cpu$ac_delim
 build_vendor!$build_vendor$ac_delim
@@ -3487,16 +3442,16 @@ _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$configure_input|;t t
-s|@top_builddir@|$ac_top_builddir_sub|;t t
-s|@srcdir@|$ac_srcdir|;t t
-s|@abs_srcdir@|$ac_abs_srcdir|;t t
-s|@top_srcdir@|$ac_top_srcdir|;t t
-s|@abs_top_srcdir@|$ac_abs_top_srcdir|;t t
-s|@builddir@|$ac_builddir|;t t
-s|@abs_builddir@|$ac_abs_builddir|;t t
-s|@abs_top_builddir@|$ac_abs_top_builddir|;t t
-s|@INSTALL@|$ac_INSTALL|;t t
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
   rm -f "$tmp/stdin"
   if test x"$ac_file" != x-; then
index e1e6040..ecc71a7 100644 (file)
@@ -287,7 +287,8 @@ uninstall-html-am:
 
 uninstall-info-am:
        @$(PRE_UNINSTALL)
-       @if (install-info --version && \
+       @if test -d '$(DESTDIR)$(infodir)' && \
+           (install-info --version && \
             install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
          list='$(INFO_DEPS)'; \
          for file in $$list; do \
index 19da184..93a319c 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2005
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -24,7 +24,7 @@
 ## Recover from removal of CONFIG_HEADER
        @if test ! -f $@; then \
          rm -f %STAMP%; \
-         $(MAKE) %STAMP%; \
+         $(MAKE) $(AM_MAKEFLAGS) %STAMP%; \
        else :; fi
 
 
index 829dca1..c78aab5 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-## Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
+## 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
@@ -34,7 +34,7 @@ DIST_COMMON += %VTEXI% %STAMPVTI%
 ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file
 ## should never be dependent upon a non-distributed built file.
 ## Therefore we ensure that %DIRSTAMP% exists in the rule.
-?DIRSTAMP?     test -f %DIRSTAMP% || $(MAKE) %DIRSTAMP%
+?DIRSTAMP?     test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
        @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \
        set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
index ffa338e..6ec84e6 100644 (file)
@@ -24,7 +24,7 @@
 ## `info' files are distributed and %DIRSTAMP% isn't: a distributed file
 ## should never be dependent upon a non-distributed built file.
 ## Therefore we ensure that %DIRSTAMP% exists in the rule.
-?!INSRC??DIRSTAMP?     @test -f %DIRSTAMP% || $(MAKE) %DIRSTAMP%
+?!INSRC??DIRSTAMP?     @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
 ## Back up the info files before running makeinfo. This is the cheapest
 ## way to ensure that
 ## 1) If the texinfo file shrinks (or if you start using --no-split),