[PATCH 3/5] libgloss: merge libgloss into top-level Makefile

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Avoid a recursive make to speed things up a bit.
---
 libgloss/Makefile.am           |  13 ++
 libgloss/Makefile.in           | 384 ++++++++++++++++++++++++++++-----
 libgloss/configure             |  18 +-
 libgloss/configure.ac          |   5 +-
 libgloss/libnosys/Makefile.in  | 115 ----------
 libgloss/libnosys/Makefile.inc |  27 +++
 6 files changed, 383 insertions(+), 179 deletions(-)
 delete mode 100644 libgloss/libnosys/Makefile.in
 create mode 100644 libgloss/libnosys/Makefile.inc

diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index 81ba50a70f8c..1209ec9d8d85 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -3,6 +3,7 @@
 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
 
 # Variables that will accumulate in subdirs.
+check_PROGRAMS =
 info_TEXINFOS =
 PHONY =
 
@@ -10,6 +11,15 @@ SUBDIRS = @subdirs@ .
 
 tooldir = $(exec_prefix)/$(target_alias)
 
+multilibtooldir = $(tooldir)/lib$(MULTISUBDIR)
+multilibtool_DATA =
+multilibtool_LIBRARIES =
+
+# A fake library so automake will generate rules for plain objects that we want
+# to install (e.g. our crt0.o objects).
+noinst_LIBRARIES = libobjs.a
+libobjs_a_SOURCES =
+
 ## These are roughly topologically sorted in order to make porting more
 ## streamlined.
 FLAGS_TO_PASS = \
@@ -43,3 +53,6 @@ TEXINFO_TEX = ../texinfo/texinfo.tex
 if HAVE_DOC
 include doc/Makefile.inc
 endif
+if CONFIG_LIBNOSYS
+include libnosys/Makefile.inc
+endif
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 5657f094a197..1c04d92a44aa 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -230,10 +230,7 @@ dnl if test "${config_testsuite}" = "true";
 dnl   then AC_CONFIG_SUBDIRS([testsuite])
 dnl fi
 
-if test "${config_libnosys}" = "true"; then
-  AC_CONFIG_FILES([libnosys/Makefile])
-  subdirs="$subdirs libnosys"
-fi
+AM_CONDITIONAL(CONFIG_LIBNOSYS, test x$config_libnosys = xtrue)
 
 LIB_AC_PROG_CC
 AS=${AS-as}
diff --git a/libgloss/libnosys/Makefile.inc b/libgloss/libnosys/Makefile.inc
new file mode 100644
index 000000000000..5e69072e7872
--- /dev/null
+++ b/libgloss/libnosys/Makefile.inc
@@ -0,0 +1,27 @@
+multilibtool_DATA += %D%/nosys.specs
+multilibtool_LIBRARIES += %D%/libnosys.a
+%C%_libnosys_a_SOURCES = \
+	%D%/chown.c \
+	%D%/close.c \
+	%D%/environ.c \
+	%D%/errno.c \
+	%D%/execve.c \
+	%D%/fork.c \
+	%D%/fstat.c \
+	%D%/getpid.c \
+	%D%/gettod.c \
+	%D%/isatty.c \
+	%D%/kill.c \
+	%D%/link.c \
+	%D%/lseek.c \
+	%D%/open.c \
+	%D%/read.c \
+	%D%/readlink.c \
+	%D%/sbrk.c \
+	%D%/stat.c \
+	%D%/symlink.c \
+	%D%/times.c \
+	%D%/unlink.c \
+	%D%/wait.c \
+	%D%/write.c \
+	%D%/_exit.c
-- 
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.