public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH] libgloss: rename our $subdirs to $SUBDIRS
Date: Tue,  1 Mar 2022 02:26:08 -0500	[thread overview]
Message-ID: <20220301072608.1252-1-vapier@gentoo.org> (raw)

Autoconf defines & uses $subdirs with the AC_CONFIG_SUBDIRS macro.
When we add dirs to that ourselves, autoconf will look in and try
to run configure scripts if they exist.  If they don't (which they
shouldn't because we deleted them), autoconf issues a warning about
missing configuration information.  This is harmless, but can be a
bit confusing.  Rename our $subdirs to $SUBDIRS to avoid this.
---
 libgloss/Makefile.am  |  3 +-
 libgloss/Makefile.in  |  2 +-
 libgloss/configure    | 91 ++++++++++++++++++++++---------------------
 libgloss/configure.ac | 90 +++++++++++++++++++++---------------------
 4 files changed, 96 insertions(+), 90 deletions(-)

diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index 43da838f0f39..216b1e1e90de 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -8,7 +8,8 @@ check_PROGRAMS =
 info_TEXINFOS =
 PHONY =
 
-SUBDIRS = @subdirs@ .
+## SUBDIRS is our variable while subdirs comes from autoconf.
+SUBDIRS = @SUBDIRS@ @subdirs@ .
 
 tooldir = $(exec_prefix)/$(target_alias)
 
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 3d8d2b031d09..58c9b03ca1c1 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -34,6 +34,7 @@ config_libnosys=true
 host_makefile_frag=${srcdir}/config/default.mh
 target_makefile_frag=${srcdir}/config/default.mt
 
+SUBDIRS=
 case "${target}" in
   aarch64*-*-*)
 	AC_CONFIG_SUBDIRS(aarch64)
@@ -41,78 +42,78 @@ case "${target}" in
 	;;
   arc*-*-*)
 	AC_CONFIG_FILES([arc/Makefile])
-	subdirs="$subdirs arc"
+	SUBDIRS="$SUBDIRS arc"
 	;;
   csky*-*-*)
 	AC_CONFIG_FILES([csky/Makefile])
-	subdirs="$subdirs csky"
+	SUBDIRS="$SUBDIRS csky"
 	;;
   epiphany-*-*)
 	AC_CONFIG_FILES([epiphany/Makefile])
-	subdirs="$subdirs epiphany"
+	SUBDIRS="$SUBDIRS epiphany"
 	config_testsuite=true
 	;;
   i[[3456]]86-*-elf* | i[[3456]]86-*-coff*)
 	AC_CONFIG_FILES([i386/Makefile])
-	subdirs="$subdirs i386"
+	SUBDIRS="$SUBDIRS i386"
 	;;
   m32r-*-*)
 	AC_CONFIG_FILES([m32r/Makefile])
-	subdirs="$subdirs m32r"
+	SUBDIRS="$SUBDIRS m32r"
 	;;
   m68hc11-*-* | m6811-*-* | m68hc12-*-* | m6812-*-*)
 	AC_CONFIG_FILES([m68hc11/Makefile])
-	subdirs="$subdirs m68hc11"
+	SUBDIRS="$SUBDIRS m68hc11"
 	;;
   nds32*-*-*)
 	AC_CONFIG_FILES([nds32/Makefile])
-	subdirs="$subdirs nds32"
+	SUBDIRS="$SUBDIRS nds32"
 	;;
   fido-*-* | m68*-*-*)
 	AC_CONFIG_FILES([m68k/Makefile])
-	subdirs="$subdirs m68k"
+	SUBDIRS="$SUBDIRS m68k"
 	;;
   hppa*-*-pro*)
 	AC_CONFIG_FILES([pa/Makefile])
-	subdirs="$subdirs pa"
+	SUBDIRS="$SUBDIRS pa"
 	;;
   i960-*-coff)
 	AC_CONFIG_FILES([i960/Makefile])
-	subdirs="$subdirs i960"
+	SUBDIRS="$SUBDIRS i960"
 	;;
   sparc-*leon*-elf* | sparc-*leon*-none*)
 	AC_CONFIG_FILES([sparc_leon/Makefile])
-	subdirs="$subdirs sparc_leon"
+	SUBDIRS="$SUBDIRS sparc_leon"
 	;;
   sparclet-*-aout* | sparc-*-elf* | sparc64-*-elf* | sparc86x-*-* | sparclite-*-*)
 	AC_CONFIG_FILES([sparc/Makefile])
-	subdirs="$subdirs sparc"
+	SUBDIRS="$SUBDIRS sparc"
 	;;
   sh*-*-pe | mips*-*-pe | *arm*-wince-pe)
 	config_wince=true
 	;;
   mips*-*-*)
 	AC_CONFIG_FILES([mips/Makefile])
-	subdirs="$subdirs mips"
+	SUBDIRS="$SUBDIRS mips"
 	target_makefile_frag=${srcdir}/config/mips.mt
 	;;
   riscv*-*-*)
 	AC_CONFIG_FILES([riscv/Makefile])
-	subdirs="$subdirs riscv"
+	SUBDIRS="$SUBDIRS riscv"
 	;;
   powerpc-*-*|powerpcle-*-*)
 	AC_CONFIG_FILES([rs6000/Makefile])
-	subdirs="$subdirs rs6000"
+	SUBDIRS="$SUBDIRS rs6000"
 	host_makefile_frag=${srcdir}/config/ppc.mh
 	;;
   mn10200-*-*)
 	AC_CONFIG_FILES([mn10200/Makefile])
-	subdirs="$subdirs mn10200"
+	SUBDIRS="$SUBDIRS mn10200"
 	target_makefile_frag=${srcdir}/config/mn10200.mt
 	;;
   mn10300-*-*)
 	AC_CONFIG_FILES([mn10300/Makefile])
-	subdirs="$subdirs mn10300"
+	SUBDIRS="$SUBDIRS mn10300"
 	target_makefile_frag=${srcdir}/config/mn10300.mt
 	;;
   bfin-*-*)
@@ -120,103 +121,103 @@ case "${target}" in
 	;;
   cr16-*-*)
 	AC_CONFIG_FILES([cr16/Makefile])
-	subdirs="$subdirs cr16"
+	SUBDIRS="$SUBDIRS cr16"
 	;;
   cris-*-* | crisv32-*-*)
 	AC_CONFIG_FILES([cris/Makefile])
-	subdirs="$subdirs cris"
+	SUBDIRS="$SUBDIRS cris"
 	;;
   crx-*-*)
 	AC_CONFIG_FILES([crx/Makefile])
-	subdirs="$subdirs crx"
+	SUBDIRS="$SUBDIRS crx"
 	;;
   d30v-*-*)
 	AC_CONFIG_FILES([d30v/Makefile])
-	subdirs="$subdirs d30v"
+	SUBDIRS="$SUBDIRS d30v"
 	;;
   fr30-*-*)
 	AC_CONFIG_FILES([fr30/Makefile])
-	subdirs="$subdirs fr30"
+	SUBDIRS="$SUBDIRS fr30"
 	;;
   frv*-*-*)
 	AC_CONFIG_FILES([frv/Makefile])
-	subdirs="$subdirs frv"
+	SUBDIRS="$SUBDIRS frv"
 	;;
   ft32*-*-*)
 	AC_CONFIG_FILES([ft32/Makefile])
-	subdirs="$subdirs ft32"
+	SUBDIRS="$SUBDIRS ft32"
 	;;
   lm32*-*-*)
 	config_lm32=true
 	;;
   mcore-*-*)
 	AC_CONFIG_FILES([mcore/Makefile])
-	subdirs="$subdirs mcore"
+	SUBDIRS="$SUBDIRS mcore"
 	;;
   mep-*-*)
 	AC_CONFIG_FILES([mep/Makefile])
-	subdirs="$subdirs mep"
+	SUBDIRS="$SUBDIRS mep"
 	;;
   moxie-*-*)
 	AC_CONFIG_FILES([moxie/Makefile])
-	subdirs="$subdirs moxie"
+	SUBDIRS="$SUBDIRS moxie"
 	;;
   microblaze*-*-*)
 	AC_CONFIG_FILES([microblaze/Makefile])
-	subdirs="$subdirs microblaze"
+	SUBDIRS="$SUBDIRS microblaze"
 	;;
   mt-*-*)
 	AC_CONFIG_FILES([mt/Makefile])
-	subdirs="$subdirs mt"
+	SUBDIRS="$SUBDIRS mt"
 	;;
   v850*-*-*)
 	AC_CONFIG_FILES([v850/Makefile])
-	subdirs="$subdirs v850"
+	SUBDIRS="$SUBDIRS v850"
 	;;
   visium-*-*)
 	AC_CONFIG_FILES([visium/Makefile])
-	subdirs="$subdirs visium"
+	SUBDIRS="$SUBDIRS visium"
 	config_testsuite=false
 	;;
   xc16x-*-*)
 	AC_CONFIG_FILES([xc16x/Makefile])
-	subdirs="$subdirs xc16x"
+	SUBDIRS="$SUBDIRS xc16x"
 	target_makefile_frag=${srcdir}/config/xc16x.mt
 	;;
   xstormy16-*-*)
 	AC_CONFIG_FILES([xstormy16/Makefile])
-	subdirs="$subdirs xstormy16"
+	SUBDIRS="$SUBDIRS xstormy16"
 	;;
   m32c-*-*)
 	AC_CONFIG_FILES([m32c/Makefile])
-	subdirs="$subdirs m32c"
+	SUBDIRS="$SUBDIRS m32c"
 	;;
   msp430-*-elf*)
 	AC_CONFIG_FILES([msp430/Makefile])
-	subdirs="$subdirs msp430"
+	SUBDIRS="$SUBDIRS msp430"
 	config_libnosys=false
 	;;
   rl78*-*-elf)
 	AC_CONFIG_FILES([rl78/Makefile])
-	subdirs="$subdirs rl78"
+	SUBDIRS="$SUBDIRS rl78"
 	;;
   rx*-*-elf)
 	AC_CONFIG_FILES([rx/Makefile])
-	subdirs="$subdirs rx"
+	SUBDIRS="$SUBDIRS rx"
 	;;
   arm*-*-elf | arm*-*-coff | arm*-*-*)
 	AC_CONFIG_SUBDIRS([arm])
 	;;
   spu-*-elf)
 	AC_CONFIG_FILES([spu/Makefile])
-	subdirs="$subdirs spu"
+	SUBDIRS="$SUBDIRS spu"
 	host_makefile_frag=${srcdir}/config/ppc.mh
 	config_testsuite=false
 	config_libnosys=false
 	;;
   tic6x-*-*)
 	AC_CONFIG_FILES([tic6x/Makefile])
-	subdirs="$subdirs tic6x"
+	SUBDIRS="$SUBDIRS tic6x"
 	config_testsuite=false
 	;;
   iq2000-*-*)
@@ -224,17 +225,18 @@ case "${target}" in
 	;;
   or1k-*-* | or1knd-*-* )
 	AC_CONFIG_FILES([or1k/Makefile])
-	subdirs="$subdirs or1k"
+	SUBDIRS="$SUBDIRS or1k"
 	;;
   pru-*-*)
 	AC_CONFIG_FILES([pru/Makefile])
-	subdirs="$subdirs pru"
+	SUBDIRS="$SUBDIRS pru"
 	;;
   nios2-*-*)
 	AC_CONFIG_FILES([nios2/Makefile])
-	subdirs="$subdirs nios2"
+	SUBDIRS="$SUBDIRS nios2"
 	;;
 esac
+AC_SUBST(SUBDIRS)
 
 dnl These subdirs have converted to non-recursive make.  Hopefully someday all
 dnl the ports above will too!
@@ -366,13 +368,13 @@ dnl multilib settings to propagate to all sub-Makefiles that we recurse into
 dnl too.  This can go away if we ever get rid of sub-Makefiles and only use
 dnl Automake + makefile include fragments.
 AC_OUTPUT_COMMANDS([
-for subdir in $subdirs; do
+for subdir in $SUBDIRS; do
   case " $CONFIG_FILES " in
    *" $subdir/Makefile "*)
      ac_file=$subdir/Makefile . ${multi_basedir}/config-ml.in
      ;;
   esac
-done], [subdirs="$subdirs"])
+done], [SUBDIRS="$SUBDIRS"])
 
 AM_ENABLE_MULTILIB(, ..)
 
-- 
2.34.1


             reply	other threads:[~2022-03-01  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01  7:26 Mike Frysinger [this message]
2022-03-01  7:33 ` R. Diez
2022-12-14  9:17   ` Mike Frysinger

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=20220301072608.1252-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=newlib@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).