From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 0B2A33858406; Tue, 22 Feb 2022 22:11:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B2A33858406 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libgloss: enable maintainer mode support X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: f2dc492df0f310aec97b5fc5847cca8d6cb70a33 X-Git-Newrev: 4ed502ba02270adee7c46bb738374cab867baee1 Message-Id: <20220222221149.0B2A33858406@sourceware.org> Date: Tue, 22 Feb 2022 22:11:49 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2022 22:11:49 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D4ed502ba022= 70adee7c46bb738374cab867baee1 commit 4ed502ba02270adee7c46bb738374cab867baee1 Author: Mike Frysinger Date: Tue Feb 22 17:09:16 2022 -0500 libgloss: enable maintainer mode support =20 Use AM_MAINTAINER_MODE so devs have to opt-in to automatic rebuilds of autotools. This matches what newlib (and most every other GNU toolchain package) does with automake. Diff: --- libgloss/Makefile.in | 9 +++++---- libgloss/aclocal.m4 | 36 ++++++++++++++++++++++++++++++++++++ libgloss/configure | 34 ++++++++++++++++++++++++++++++++++ libgloss/configure.ac | 1 + 4 files changed, 76 insertions(+), 4 deletions(-) diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in index 7f1d96f7f..ad7371111 100644 --- a/libgloss/Makefile.in +++ b/libgloss/Makefile.in @@ -456,6 +456,7 @@ LIBOBJS =3D @LIBOBJS@ LIBS =3D @LIBS@ LTLIBOBJS =3D @LTLIBOBJS@ M68K_TARGET =3D @M68K_TARGET@ +MAINT =3D @MAINT@ MAKEINFO =3D @MAKEINFO@ MCORE_BSP_PREFIX =3D @MCORE_BSP_PREFIX@ MIPS_BSP_LIST =3D @MIPS_BSP_LIST@ @@ -649,7 +650,7 @@ all: config.h .SUFFIXES: .S .c .dvi .o .obj .ps am--refresh: Makefile @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/../multilib.am= $(srcdir)/doc/Makefile.inc $(srcdir)/bfin/Makefile.inc $(srcdir)/iq2000/Ma= kefile.inc $(srcdir)/libnosys/Makefile.inc $(srcdir)/wince/Makefile.inc $(a= m__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_= srcdir)/../multilib.am $(srcdir)/doc/Makefile.inc $(srcdir)/bfin/Makefile.i= nc $(srcdir)/iq2000/Makefile.inc $(srcdir)/libnosys/Makefile.inc $(srcdir)/= wince/Makefile.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -676,9 +677,9 @@ $(top_srcdir)/../multilib.am $(srcdir)/doc/Makefile.inc= $(srcdir)/bfin/Makefile. $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEP= ENDENCIES) $(SHELL) ./config.status --recheck =20 -$(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): =20 @@ -689,7 +690,7 @@ config.h: stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps)=20 +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)=20 ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ diff --git a/libgloss/aclocal.m4 b/libgloss/aclocal.m4 index a74c735bd..b6bc2c0f3 100644 --- a/libgloss/aclocal.m4 +++ b/libgloss/aclocal.m4 @@ -646,6 +646,42 @@ if test x"${install_sh+set}" !=3D xset; then fi AC_SUBST([install_sh])]) =20 +# 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. + +# 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 Makefil= es]) + 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=3D$enableval], + [USE_MAINTAINER_MODE=3D]m4_if(am_maintainer_other, [enable], [no], [ye= s])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE =3D yes]) + MAINT=3D$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + # Check to see how 'make' treats includes. -*- Autoconf -*- =20 # Copyright (C) 2001-2017 Free Software Foundation, Inc. diff --git a/libgloss/configure b/libgloss/configure index 8662be404..dab6ac807 100755 --- a/libgloss/configure +++ b/libgloss/configure @@ -642,6 +642,9 @@ HAVE_MULTISUBDIR_FALSE HAVE_MULTISUBDIR_TRUE HAVE_DOC_FALSE HAVE_DOC_TRUE +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V @@ -724,6 +727,7 @@ target_makefile_frag' ac_user_opts=3D' enable_option_checking enable_silent_rules +enable_maintainer_mode enable_dependency_tracking enable_multilib ' @@ -1361,6 +1365,9 @@ Optional Features: --enable-FEATURE[=3DARG] include FEATURE [ARG=3Dyes] --enable-silent-rules less verbose build output (undo: "make V=3D1") --disable-silent-rules verbose build output (undo: "make V=3D0") + --enable-maintainer-mode + enable make rules and dependencies not useful (a= nd + sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking @@ -2608,6 +2615,29 @@ END fi fi =20 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mainta= iner-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Mak= efiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" =3D set; then : + enableval=3D$enable_maintainer_mode; USE_MAINTAINER_MODE=3D$enableval +else + USE_MAINTAINER_MODE=3Dno +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >= &5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE =3D yes; then + MAINTAINER_MODE_TRUE=3D + MAINTAINER_MODE_FALSE=3D'#' +else + MAINTAINER_MODE_TRUE=3D'#' + MAINTAINER_MODE_FALSE=3D +fi + + MAINT=3D$MAINTAINER_MODE_TRUE + + # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" =3D set; then : enableval=3D$enable_silent_rules; @@ -5361,6 +5391,10 @@ else am__EXEEXT_FALSE=3D fi =20 +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 "${HAVE_DOC_TRUE}" && test -z "${HAVE_DOC_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/libgloss/configure.ac b/libgloss/configure.ac index b5a0fce08..ec2a49e03 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -12,6 +12,7 @@ AC_PROG_INSTALL =20 AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE([foreign no-dist no-define subdir-objects 1.15.1]) +AM_MAINTAINER_MODE AM_SILENT_RULES(yes) =20 if test -z "${with_multisubdir}"; then