Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Enable maintainer mode for sim
Date: Mon, 8 Mar 2021 16:07:26 +0000	[thread overview]
Message-ID: <20210308160726.GM1720904@embecosm.com> (raw)
In-Reply-To: <20210308145527.564647-1-tromey@adacore.com>

* Tom Tromey <tromey@adacore.com> [2021-03-08 07:55:27 -0700]:

> The sim's recently switch to using Automake caused a build failure for
> me, because I didn't have the correct auto* tools in my path.
> However, the rule in the tree is that this is not needed in general.
> This patch adds a call to AM_MAINTAINER_MODE, to align the sim with
> the way the rest of the tree works here.
> 
> sim/ChangeLog
> 2021-03-08  Tom Tromey  <tromey@adacore.com>
> 
> 	* aclocal.m4, configure, Makefile.in: Rebuild.
> 	* configure.ac: Use AM_MAINTAINER_MODE.

Thanks.  I just ran into this too.  Fix looks sane to me.

Andrew



> ---
>  sim/ChangeLog    |  5 +++++
>  sim/Makefile.in  |  7 ++++---
>  sim/aclocal.m4   | 46 +++++++++++++++++++++++++++++++++-------------
>  sim/configure    | 37 +++++++++++++++++++++++++++++++++++++
>  sim/configure.ac |  1 +
>  5 files changed, 80 insertions(+), 16 deletions(-)
> 
> diff --git a/sim/Makefile.in b/sim/Makefile.in
> index 390a8575a75..85849f2745c 100644
> --- a/sim/Makefile.in
> +++ b/sim/Makefile.in
> @@ -224,6 +224,7 @@ LDFLAGS = @LDFLAGS@
>  LIBOBJS = @LIBOBJS@
>  LIBS = @LIBS@
>  LTLIBOBJS = @LTLIBOBJS@
> +MAINT = @MAINT@
>  MAKEINFO = @MAKEINFO@
>  MKDIR_P = @MKDIR_P@
>  OBJEXT = @OBJEXT@
> @@ -308,7 +309,7 @@ all: all-recursive
>  .SUFFIXES:
>  am--refresh: Makefile
>  	@:
> -$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/testsuite/local.mk $(am__configure_deps)
> +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/testsuite/local.mk $(am__configure_deps)
>  	@for dep in $?; do \
>  	  case '$(am__configure_deps)' in \
>  	    *$$dep*) \
> @@ -335,9 +336,9 @@ $(srcdir)/testsuite/local.mk $(am__empty):
>  $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
>  	$(SHELL) ./config.status --recheck
>  
> -$(top_srcdir)/configure:  $(am__configure_deps)
> +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
>  	$(am__cd) $(srcdir) && $(AUTOCONF)
> -$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
> +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
>  	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
>  $(am__aclocal_m4_deps):
>  
> diff --git a/sim/aclocal.m4 b/sim/aclocal.m4
> index df8ff837794..e01194da383 100644
> --- a/sim/aclocal.m4
> +++ b/sim/aclocal.m4
> @@ -626,24 +626,41 @@ if test x"${install_sh+set}" != xset; then
>  fi
>  AC_SUBST([install_sh])])
>  
> -# Copyright (C) 2003-2017 Free Software Foundation, Inc.
> +# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
> +# From Jim Meyering
> +
> +# Copyright (C) 1996-2017 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.
>  
> -# Check whether the underlying file-system supports filenames
> -# with a leading dot.  For instance MS-DOS doesn't.
> -AC_DEFUN([AM_SET_LEADING_DOT],
> -[rm -rf .tst 2>/dev/null
> -mkdir .tst 2>/dev/null
> -if test -d .tst; then
> -  am__leading_dot=.
> -else
> -  am__leading_dot=_
> -fi
> -rmdir .tst 2>/dev/null
> -AC_SUBST([am__leading_dot])])
> +# 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 enable maintainer-specific portions of Makefiles])
> +  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
> +  AC_ARG_ENABLE([maintainer-mode],
> +    [AS_HELP_STRING([--]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
> +]
> +)
>  
>  # Check to see how 'make' treats includes.	            -*- Autoconf -*-
>  
> @@ -1150,3 +1167,6 @@ AC_SUBST([am__tar])
>  AC_SUBST([am__untar])
>  ]) # _AM_PROG_TAR
>  
> +m4_include([../config/depstand.m4])
> +m4_include([../config/lead-dot.m4])
> +m4_include([../config/override.m4])
> diff --git a/sim/configure b/sim/configure
> index 09c2a4793cd..707a1cc6c02 100755
> --- a/sim/configure
> +++ b/sim/configure
> @@ -640,6 +640,9 @@ am__isrc
>  INSTALL_DATA
>  INSTALL_SCRIPT
>  INSTALL_PROGRAM
> +MAINT
> +MAINTAINER_MODE_FALSE
> +MAINTAINER_MODE_TRUE
>  target_os
>  target_vendor
>  target_cpu
> @@ -693,6 +696,7 @@ SHELL'
>  ac_subst_files=''
>  ac_user_opts='
>  enable_option_checking
> +enable_maintainer_mode
>  enable_silent_rules
>  enable_dependency_tracking
>  enable_sim
> @@ -1356,6 +1360,9 @@ 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-silent-rules   less verbose build output (undo: "make V=1")
>    --disable-silent-rules  verbose build output (undo: "make V=0")
>    --enable-dependency-tracking
> @@ -1882,6 +1889,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
>  
>  
>  
> +
> +
> +
>  ac_aux_dir=
>  for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
>    if test -f "$ac_dir/install-sh"; then
> @@ -2023,6 +2033,29 @@ test -n "$target_alias" &&
>    program_prefix=${target_alias}-
>  
>  
> +
> +{ $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
> +
> +
>  am__api_version='1.15'
>  
>  # Find a good install program.  We prefer a C program (faster),
> @@ -5097,6 +5130,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
>  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
>  $as_echo_n "checking that generated files are newer than configure... " >&6; }
>     if test -n "$am_sleep_pid"; then
> diff --git a/sim/configure.ac b/sim/configure.ac
> index 23478521e94..709bd3ea9dc 100644
> --- a/sim/configure.ac
> +++ b/sim/configure.ac
> @@ -7,6 +7,7 @@ AC_INIT([sim], [0],
>  
>  AC_CANONICAL_SYSTEM
>  
> +AM_MAINTAINER_MODE
>  AM_INIT_AUTOMAKE
>  
>  AC_PROG_CC
> -- 
> 2.26.2
> 

  reply	other threads:[~2021-03-08 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 14:55 Tom Tromey
2021-03-08 16:07 ` Andrew Burgess [this message]
2021-03-08 16:51 ` Mike Frysinger via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210308160726.GM1720904@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox