[newlib-cygwin] newlib: stop making .def generation conditional
Michael Frysinger
vapier@sourceware.org
Fri Jan 21 22:29:23 GMT 2022
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8776d090f848b4ba752ba363db8fd0de1e578155
commit 8776d090f848b4ba752ba363db8fd0de1e578155
Author: Mike Frysinger <vapier@gentoo.org>
Date: Fri Jan 21 06:57:33 2022 -0500
newlib: stop making .def generation conditional
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.
Diff:
---
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 a8544c8a2..622a74c82 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/reent/Makefile.in b/newlib/libc/reent/Makefile.in
index d243d4adc..d02eb8a2e 100644
--- a/newlib/libc/reent/Makefile.in
+++ b/newlib/libc/reent/Makefile.in
@@ -378,12 +378,6 @@ AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
@HAVE_STDIO64_DIR_TRUE@ stat64r.c \
@HAVE_STDIO64_DIR_TRUE@ open64r.c
-@HAVE_STDIO64_DIR_TRUE@STDIO64_DEFS = \
-@HAVE_STDIO64_DIR_TRUE@ fstat64r.def \
-@HAVE_STDIO64_DIR_TRUE@ lseek64r.def \
-@HAVE_STDIO64_DIR_TRUE@ stat64r.def \
-@HAVE_STDIO64_DIR_TRUE@ open64r.def
-
ELIX_2_SOURCES = $(STDIO64_SOURCES)
ELIX_3_SOURCES = execr.c
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES)
@@ -435,20 +429,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 f4c26bec8..30339033c 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
diff --git a/newlib/libc/stdio/Makefile.in b/newlib/libc/stdio/Makefile.in
index 5816798ee..80370cbea 100644
--- a/newlib/libc/stdio/Makefile.in
+++ b/newlib/libc/stdio/Makefile.in
@@ -744,26 +744,9 @@ DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py
DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml)
DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml)
CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES)
-@NEWLIB_NANO_FORMATTED_IO_FALSE@CHEWOUT_INT_FORMATTED_IO_FILES = \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ diprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ siprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ siscanf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vfprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vfscanf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ viprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ viscanf.def
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@CHEWOUT_INT_FORMATTED_IO_FILES = \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf_i.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf_float.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf_i.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf_float.def
-
CHEWOUT_FILES = \
- $(CHEWOUT_INT_FORMATTED_IO_FILES) \
clearerr.def \
+ diprintf.def \
dprintf.def \
fclose.def \
fcloseall.def \
@@ -804,6 +787,8 @@ CHEWOUT_FILES = \
getw.def \
getwchar.def \
mktemp.def \
+ nano-vfprintf.def \
+ nano-vfscanf.def \
open_memstream.def \
perror.def \
putc.def \
@@ -820,6 +805,8 @@ CHEWOUT_FILES = \
setbuffer.def \
setlinebuf.def \
setvbuf.def \
+ siprintf.def \
+ siscanf.def \
sprintf.def \
sscanf.def \
stdio_ext.def \
@@ -829,8 +816,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
all: all-am
More information about the Newlib-cvs
mailing list