This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: FYI: gdb/common/Makefile calling aclocal & autoconf...
On 03/08/2011 04:26 PM, Jan Kratochvil wrote:
> I would welcome temporarily to at least put those @MAINTAINER_MODE_TRUE@ at
> their right places, having to undo the diff changes in every archer+gdb branch
> laying around.
>
I've sent out my revert patch, see
http://sourceware.org/ml/gdb-patches/2011-03/msg00521.html
b.t.w, I drafted a patch yesterday as this problem was reported. I
didn't send it for review, because we decided to give up on this
direction. If it is useful to you, please pick it up.
--
Yao (éå)
gdb/
* common/Makefile.in: Add @MAINTAINER_MODE_TRUE@ in some
make targets.
* common/configure.ac: Add AM_MAINTAINER_MODE. Remove
checking to AUTOHEADER, AUTOCONF, and ACLOCAL.
* common/aclocal.m4: Regenreated.
* common/configure: Regnerated.
diff --git a/gdb/common/Makefile.in b/gdb/common/Makefile.in
index 9230b87..410885d 100644
--- a/gdb/common/Makefile.in
+++ b/gdb/common/Makefile.in
@@ -17,9 +17,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
srcdir = @srcdir@
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
RANLIB = @RANLIB@
COMMON_CPU_OBJ = @COMMON_CPU_OBJ@
@@ -66,7 +63,8 @@ Makefile: $(srcdir)/Makefile.in config.status
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/aclocal.m4
+AUTOCONF = autoconf
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/aclocal.m4
cd $(srcdir) && $(AUTOCONF)
aclocal_deps = \
@@ -75,7 +73,8 @@ aclocal_deps = \
$(srcdir)/../../config/override.m4 \
$(srcdir)/configure.ac
-$(srcdir)/aclocal.m4: $(aclocal_deps)
+ACLOCAL = aclocal
+$(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_deps)
cd $(srcdir) && $(ACLOCAL) -I ../config
config.h: stamp-h1
@@ -85,7 +84,8 @@ stamp-h1: $(srcdir)/config.in config.status
-rm -f stamp-h1
$(SHELL) ./config.status config.h
-$(srcdir)/config.in: $(srcdir)/configure
+AUTOHEADER = autoheader
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure
cd $(srcdir) && $(AUTOHEADER)
-rm -f stamp-h1
diff --git a/gdb/common/aclocal.m4 b/gdb/common/aclocal.m4
index ee3ded7..a3d6cb3 100644
--- a/gdb/common/aclocal.m4
+++ b/gdb/common/aclocal.m4
@@ -47,6 +47,46 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
diff --git a/gdb/common/configure b/gdb/common/configure
index 957dcc3..9caf1a2 100755
--- a/gdb/common/configure
+++ b/gdb/common/configure
@@ -561,9 +561,6 @@ SET_MAKE
GMAKE_FALSE
GMAKE_TRUE
MAKE
-AUTOHEADER
-AUTOCONF
-ACLOCAL
RANLIB
OBJEXT
EXEEXT
@@ -584,6 +581,9 @@ build_os
build_vendor
build_cpu
build
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
target_alias
host_alias
build_alias
@@ -625,6 +625,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_maintainer_mode
enable_gdbserver
'
ac_precious_vars='build_alias
@@ -1248,6 +1249,8 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
--enable-gdbserver build libcommon.a for gdbserver
Some influential environment variables:
@@ -1728,6 +1731,29 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
for ac_t in install-sh install.sh shtool; do
@@ -2722,136 +2748,6 @@ else
fi
-for ac_prog in aclocal
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ACLOCAL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ACLOCAL"; then
- ac_cv_prog_ACLOCAL="$ACLOCAL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ACLOCAL="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ACLOCAL=$ac_cv_prog_ACLOCAL
-if test -n "$ACLOCAL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ACLOCAL" >&5
-$as_echo "$ACLOCAL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ACLOCAL" && break
-done
-test -n "$ACLOCAL" || ACLOCAL="$MISSING aclocal"
-
-for ac_prog in autoconf
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AUTOCONF+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AUTOCONF"; then
- ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AUTOCONF="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AUTOCONF=$ac_cv_prog_AUTOCONF
-if test -n "$AUTOCONF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOCONF" >&5
-$as_echo "$AUTOCONF" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AUTOCONF" && break
-done
-test -n "$AUTOCONF" || AUTOCONF="$MISSING autoconf"
-
-for ac_prog in autoheader
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AUTOHEADER+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AUTOHEADER"; then
- ac_cv_prog_AUTOHEADER="$AUTOHEADER" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AUTOHEADER="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AUTOHEADER=$ac_cv_prog_AUTOHEADER
-if test -n "$AUTOHEADER"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOHEADER" >&5
-$as_echo "$AUTOHEADER" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AUTOHEADER" && break
-done
-test -n "$AUTOHEADER" || AUTOHEADER="$MISSING autoheader"
-
-
# Check for the 'make' the user wants to use.
for ac_prog in make
do
@@ -3109,6 +3005,10 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
as_fn_error "conditional \"GMAKE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/gdb/common/configure.ac b/gdb/common/configure.ac
index 1ef85fe..5ea5d5f 100644
--- a/gdb/common/configure.ac
+++ b/gdb/common/configure.ac
@@ -19,6 +19,7 @@
AC_PREREQ(2.59)
AC_INIT(.)
+AM_MAINTAINER_MODE
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
@@ -27,10 +28,6 @@ AC_CANONICAL_TARGET
AC_PROG_CC
AC_PROG_RANLIB
-AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
-AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
-AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
-
# Check for the 'make' the user wants to use.
AC_CHECK_PROGS(MAKE, make)
MAKE_IS_GNU=