[PATCH] libgloss: aarch64: merge cpu-init/ up a level

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
The cpu-init/configure script isn't doing anything useful, so merge
the logic up to the parent dir.  This is how the arm/ tree integrates
its cpu-init/ subdir too.
---
 libgloss/aarch64/configure             |  157 +-
 libgloss/aarch64/configure.ac          |    6 +-
 libgloss/aarch64/cpu-init/Makefile.in  |    8 +-
 libgloss/aarch64/cpu-init/aclocal.m4   |  384 ---
 libgloss/aarch64/cpu-init/configure    | 3926 ------------------------
 libgloss/aarch64/cpu-init/configure.ac |   34 -
 6 files changed, 14 insertions(+), 4501 deletions(-)
 delete mode 100644 libgloss/aarch64/cpu-init/aclocal.m4
 delete mode 100755 libgloss/aarch64/cpu-init/configure
 delete mode 100644 libgloss/aarch64/cpu-init/configure.ac

diff --git a/libgloss/aarch64/configure.ac b/libgloss/aarch64/configure.ac
index b26f55ecaca1..1ed0a767bc75 100644
--- a/libgloss/aarch64/configure.ac
+++ b/libgloss/aarch64/configure.ac
@@ -26,7 +26,7 @@ esac
 
 AC_SUBST(objtype)
 
-host_makefile_frag=${srcdir}/../config/default.mh
+host_makefile_frag=`cd $srcdir/../config;pwd`/default.mh
 
 dnl We have to assign the same value to other variables because autoconf
 dnl doesn't provide a mechanism to substitute a replacement keyword with
@@ -39,7 +39,9 @@ AC_SUBST_FILE(host_makefile_frag)
 # Configure cpu init plug-ins
 if test -d "${srcdir}/cpu-init"; then
   subdirs="${subdirs} cpu-init"
-  AC_CONFIG_SUBDIRS(cpu-init)
+  AC_CONFIG_FILES([cpu-init/Makefile], [dnl
+    ac_file=cpu-init/Makefile . ${srcdir}/../../config-ml.in
+  ])
   AC_SUBST(subdirs)
 fi
 
diff --git a/libgloss/aarch64/cpu-init/Makefile.in b/libgloss/aarch64/cpu-init/Makefile.in
index c96f4ee0e6b9..22648b2af991 100644
--- a/libgloss/aarch64/cpu-init/Makefile.in
+++ b/libgloss/aarch64/cpu-init/Makefile.in
@@ -103,8 +103,8 @@ info:
 install-info:
 clean-info:
 
-Makefile: Makefile.in config.status @host_makefile_frag_path@
-	$(SHELL) config.status
+Makefile: Makefile.in ../config.status @host_makefile_frag_path@
+	$(SHELL) ../config.status --file cpu-init/Makefile
 
-config.status: configure
-	$(SHELL) config.status --recheck
+../config.status: ../configure
+	$(SHELL) ../config.status --recheck
diff --git a/libgloss/aarch64/cpu-init/configure.ac b/libgloss/aarch64/cpu-init/configure.ac
deleted file mode 100644
index 91f9c709a18a..000000000000
--- a/libgloss/aarch64/cpu-init/configure.ac
+++ /dev/null
@@ -1,34 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(Makefile.in)
-
-AC_CONFIG_AUX_DIR(../../..)
-
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-
-AC_PROG_INSTALL
-
-LIB_AC_PROG_CC
-AS=${AS-as}
-AC_SUBST(AS)
-AR=${AR-ar}
-AC_SUBST(AR)
-LD=${LD-ld}
-AC_SUBST(LD)
-AC_PROG_RANLIB
-LIB_AM_PROG_AS
-
-host_makefile_frag=${srcdir}/../../config/default.mh
-
-dnl We have to assign the same value to other variables because autoconf
-dnl doesn't provide a mechanism to substitute a replacement keyword with
-dnl arbitrary data or pathnames.
-dnl
-host_makefile_frag_path=$host_makefile_frag
-AC_SUBST(host_makefile_frag_path)
-AC_SUBST_FILE(host_makefile_frag)
-
-AM_ENABLE_MULTILIB(, ../../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.