From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 082093858D39; Wed, 2 Mar 2022 01:29:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 082093858D39 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: use m4_foreach_w to simplify the logic a bit X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 020fa7ed7b0a4e5e0cbc048b44697df8762c7e08 X-Git-Newrev: 89f643e87b919aa3a20ef81429f5712a2879b6de Message-Id: <20220302012908.082093858D39@sourceware.org> Date: Wed, 2 Mar 2022 01:29:08 +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: Wed, 02 Mar 2022 01:29:08 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D89f643e87b9= 19aa3a20ef81429f5712a2879b6de commit 89f643e87b919aa3a20ef81429f5712a2879b6de Author: Mike Frysinger Date: Mon Feb 7 06:18:55 2022 -0500 libgloss: use m4_foreach_w to simplify the logic a bit =20 It's functionally the same, but the configure.ac code is simpler and less boiler plate duplicated. Diff: --- libgloss/configure | 34 +++++++++++++++++----------------- libgloss/configure.ac | 12 +++++++----- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/libgloss/configure b/libgloss/configure index 5b5146f3e..b50c9065a 100755 --- a/libgloss/configure +++ b/libgloss/configure @@ -629,10 +629,10 @@ CPPFLAGS LDFLAGS CFLAGS CC -CONFIG_LIBNOSYS_FALSE -CONFIG_LIBNOSYS_TRUE CONFIG_WINCE_FALSE CONFIG_WINCE_TRUE +CONFIG_LIBNOSYS_FALSE +CONFIG_LIBNOSYS_TRUE CONFIG_IQ2000_FALSE CONFIG_IQ2000_TRUE CONFIG_BFIN_FALSE @@ -2958,7 +2958,7 @@ subdirs=3D"$subdirs aarch64" ;; esac =20 - if test x$config_bfin =3D xtrue; then + if test x$config_bfin =3D xtrue; then CONFIG_BFIN_TRUE=3D CONFIG_BFIN_FALSE=3D'#' else @@ -2966,7 +2966,7 @@ else CONFIG_BFIN_FALSE=3D fi =20 - if test x$config_iq2000 =3D xtrue; then + if test x$config_iq2000 =3D xtrue; then CONFIG_IQ2000_TRUE=3D CONFIG_IQ2000_FALSE=3D'#' else @@ -2974,7 +2974,15 @@ else CONFIG_IQ2000_FALSE=3D fi =20 - if test x$config_wince =3D xtrue; then + if test x$config_libnosys =3D xtrue; then + CONFIG_LIBNOSYS_TRUE=3D + CONFIG_LIBNOSYS_FALSE=3D'#' +else + CONFIG_LIBNOSYS_TRUE=3D'#' + CONFIG_LIBNOSYS_FALSE=3D +fi + + if test x$config_wince =3D xtrue; then CONFIG_WINCE_TRUE=3D CONFIG_WINCE_FALSE=3D'#' else @@ -2984,14 +2992,6 @@ fi =20 =20 =20 - if test x$config_libnosys =3D xtrue; then - CONFIG_LIBNOSYS_TRUE=3D - CONFIG_LIBNOSYS_FALSE=3D'#' -else - CONFIG_LIBNOSYS_TRUE=3D'#' - CONFIG_LIBNOSYS_FALSE=3D -fi - =20 ac_ext=3Dc ac_cpp=3D'$CPP $CPPFLAGS' @@ -5195,14 +5195,14 @@ if test -z "${CONFIG_IQ2000_TRUE}" && test -z "${CO= NFIG_IQ2000_FALSE}"; then as_fn_error $? "conditional \"CONFIG_IQ2000\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${CONFIG_WINCE_TRUE}" && test -z "${CONFIG_WINCE_FALSE}"; then - as_fn_error $? "conditional \"CONFIG_WINCE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${CONFIG_LIBNOSYS_TRUE}" && test -z "${CONFIG_LIBNOSYS_FALSE}"= ; then as_fn_error $? "conditional \"CONFIG_LIBNOSYS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${CONFIG_WINCE_TRUE}" && test -z "${CONFIG_WINCE_FALSE}"; then + as_fn_error $? "conditional \"CONFIG_WINCE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" 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 43e791663..6ed848dd5 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -237,9 +237,13 @@ case "${target}" in ;; esac =20 -AM_CONDITIONAL(CONFIG_BFIN, test x$config_bfin =3D xtrue) -AM_CONDITIONAL(CONFIG_IQ2000, test x$config_iq2000 =3D xtrue) -AM_CONDITIONAL(CONFIG_WINCE, test x$config_wince =3D xtrue) +dnl These subdirs have converted to non-recursive make. Hopefully someday= all +dnl the ports above will too! +m4_foreach_w([SUBDIR], [ + bfin iq2000 libnosys wince +], [dnl + AM_CONDITIONAL([CONFIG_]m4_toupper(SUBDIR), [test x$config_]SUBDIR =3D x= true) +]) =20 dnl For now, don't bother configuring testsuite dnl @@ -247,8 +251,6 @@ dnl if test "${config_testsuite}" =3D "true"; dnl then AC_CONFIG_SUBDIRS([testsuite]) dnl fi =20 -AM_CONDITIONAL(CONFIG_LIBNOSYS, test x$config_libnosys =3D xtrue) - AC_PROG_CC AM_PROG_AS AM_PROG_AR