[PATCH] newlib: stop making .def generation conditional

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Generating these files is very cheap, so let's just do it all the time.
This makes the build logic simpler, and keeps errors for slipping in in
codepaths that are not well tested.  Creating these files doesn't mean
they'll be included in the manual implicitly.

For example, some of the nano stdio files break documentation because
they don't have any chew directives in them.  But no one noticed since
that code path is rarely enabled.  So drop the _i and _float def files.
---
 newlib/libc/reent/Makefile.am | 11 ++++-------
 newlib/libc/reent/Makefile.in | 11 ++++-------
 newlib/libc/stdio/Makefile.am | 30 ++++++++++--------------------
 newlib/libc/stdio/Makefile.in | 29 ++++++++++-------------------
 4 files changed, 28 insertions(+), 53 deletions(-)

diff --git a/newlib/libc/reent/Makefile.am b/newlib/libc/reent/Makefile.am
index a8544c8a27d8..622a74c82cea 100644
--- a/newlib/libc/reent/Makefile.am
+++ b/newlib/libc/reent/Makefile.am
@@ -8,12 +8,6 @@ STDIO64_SOURCES = \
 	lseek64r.c \
 	stat64r.c \
 	open64r.c
-
-STDIO64_DEFS = \
-	fstat64r.def \
-	lseek64r.def \
-	stat64r.def \
-	open64r.def
 endif
 
 ELIX_2_SOURCES = $(STDIO64_SOURCES)
@@ -72,20 +66,23 @@ CHEWOUT_FILES = \
 	reent.def \
 	execr.def \
 	fcntlr.def \
+	fstat64r.def \
 	fstatr.def \
 	gettimeofdayr.def \
 	linkr.def \
+	lseek64r.def \
 	lseekr.def \
 	mkdirr.def \
+	open64r.def \
 	openr.def \
 	readr.def \
 	renamer.def \
 	signalr.def \
 	sbrkr.def \
+	stat64r.def \
 	statr.def \
 	timesr.def \
 	unlinkr.def \
-	$(STDIO64_DEFS) \
 	writer.def
 
 CHAPTERS = reent.tex
diff --git a/newlib/libc/stdio/Makefile.am b/newlib/libc/stdio/Makefile.am
index f4c26bec8a70..30339033c8f6 100644
--- a/newlib/libc/stdio/Makefile.am
+++ b/newlib/libc/stdio/Makefile.am
@@ -324,27 +324,9 @@ $(lpfx)svfwscanf.$(oext): vfwscanf.c
 $(lpfx)svfiwscanf.$(oext): vfwscanf.c
 	$(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@
 
-if NEWLIB_NANO_FORMATTED_IO
-CHEWOUT_INT_FORMATTED_IO_FILES =\
-	nano-vfprintf.def	\
-	nano-vfprintf_i.def	\
-	nano-vfprintf_float.def	\
-	nano-vfscanf.def	\
-	nano-vfscanf_i.def	\
-	nano-vfscanf_float.def
-else
-CHEWOUT_INT_FORMATTED_IO_FILES =\
-	diprintf.def		\
-	siprintf.def		\
-	siscanf.def		\
-	vfprintf.def		\
-	vfscanf.def		\
-	viprintf.def		\
-	viscanf.def
-endif
 CHEWOUT_FILES = \
-	$(CHEWOUT_INT_FORMATTED_IO_FILES)	\
 	clearerr.def		\
+	diprintf.def		\
 	dprintf.def		\
 	fclose.def		\
 	fcloseall.def		\
@@ -385,6 +367,8 @@ CHEWOUT_FILES = \
 	getw.def		\
 	getwchar.def		\
 	mktemp.def		\
+	nano-vfprintf.def	\
+	nano-vfscanf.def	\
 	open_memstream.def	\
 	perror.def		\
 	putc.def		\
@@ -401,6 +385,8 @@ CHEWOUT_FILES = \
 	setbuffer.def		\
 	setlinebuf.def		\
 	setvbuf.def		\
+	siprintf.def		\
+	siscanf.def		\
 	sprintf.def		\
 	sscanf.def		\
 	stdio_ext.def		\
@@ -410,8 +396,12 @@ CHEWOUT_FILES = \
 	tmpnam.def		\
 	ungetc.def		\
 	ungetwc.def		\
+	vfprintf.def		\
+	vfscanf.def		\
 	vfwprintf.def		\
-	vfwscanf.def
+	vfwscanf.def		\
+	viprintf.def		\
+	viscanf.def
 
 CHAPTERS = stdio.tex
 
-- 
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.