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.
This commit is contained in:
Mike Frysinger 2022-01-21 06:57:33 -05:00
parent 4af3551136
commit 8776d090f8
4 changed files with 28 additions and 53 deletions

View File

@ -8,12 +8,6 @@ STDIO64_SOURCES = \
lseek64r.c \ lseek64r.c \
stat64r.c \ stat64r.c \
open64r.c open64r.c
STDIO64_DEFS = \
fstat64r.def \
lseek64r.def \
stat64r.def \
open64r.def
endif endif
ELIX_2_SOURCES = $(STDIO64_SOURCES) ELIX_2_SOURCES = $(STDIO64_SOURCES)
@ -72,20 +66,23 @@ CHEWOUT_FILES = \
reent.def \ reent.def \
execr.def \ execr.def \
fcntlr.def \ fcntlr.def \
fstat64r.def \
fstatr.def \ fstatr.def \
gettimeofdayr.def \ gettimeofdayr.def \
linkr.def \ linkr.def \
lseek64r.def \
lseekr.def \ lseekr.def \
mkdirr.def \ mkdirr.def \
open64r.def \
openr.def \ openr.def \
readr.def \ readr.def \
renamer.def \ renamer.def \
signalr.def \ signalr.def \
sbrkr.def \ sbrkr.def \
stat64r.def \
statr.def \ statr.def \
timesr.def \ timesr.def \
unlinkr.def \ unlinkr.def \
$(STDIO64_DEFS) \
writer.def writer.def
CHAPTERS = reent.tex CHAPTERS = reent.tex

View File

@ -378,12 +378,6 @@ AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
@HAVE_STDIO64_DIR_TRUE@ stat64r.c \ @HAVE_STDIO64_DIR_TRUE@ stat64r.c \
@HAVE_STDIO64_DIR_TRUE@ open64r.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_2_SOURCES = $(STDIO64_SOURCES)
ELIX_3_SOURCES = execr.c ELIX_3_SOURCES = execr.c
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES)
@ -435,20 +429,23 @@ CHEWOUT_FILES = \
reent.def \ reent.def \
execr.def \ execr.def \
fcntlr.def \ fcntlr.def \
fstat64r.def \
fstatr.def \ fstatr.def \
gettimeofdayr.def \ gettimeofdayr.def \
linkr.def \ linkr.def \
lseek64r.def \
lseekr.def \ lseekr.def \
mkdirr.def \ mkdirr.def \
open64r.def \
openr.def \ openr.def \
readr.def \ readr.def \
renamer.def \ renamer.def \
signalr.def \ signalr.def \
sbrkr.def \ sbrkr.def \
stat64r.def \
statr.def \ statr.def \
timesr.def \ timesr.def \
unlinkr.def \ unlinkr.def \
$(STDIO64_DEFS) \
writer.def writer.def
CHAPTERS = reent.tex CHAPTERS = reent.tex

View File

@ -324,27 +324,9 @@ $(lpfx)svfwscanf.$(oext): vfwscanf.c
$(lpfx)svfiwscanf.$(oext): vfwscanf.c $(lpfx)svfiwscanf.$(oext): vfwscanf.c
$(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@ $(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_FILES = \
$(CHEWOUT_INT_FORMATTED_IO_FILES) \
clearerr.def \ clearerr.def \
diprintf.def \
dprintf.def \ dprintf.def \
fclose.def \ fclose.def \
fcloseall.def \ fcloseall.def \
@ -385,6 +367,8 @@ CHEWOUT_FILES = \
getw.def \ getw.def \
getwchar.def \ getwchar.def \
mktemp.def \ mktemp.def \
nano-vfprintf.def \
nano-vfscanf.def \
open_memstream.def \ open_memstream.def \
perror.def \ perror.def \
putc.def \ putc.def \
@ -401,6 +385,8 @@ CHEWOUT_FILES = \
setbuffer.def \ setbuffer.def \
setlinebuf.def \ setlinebuf.def \
setvbuf.def \ setvbuf.def \
siprintf.def \
siscanf.def \
sprintf.def \ sprintf.def \
sscanf.def \ sscanf.def \
stdio_ext.def \ stdio_ext.def \
@ -410,8 +396,12 @@ CHEWOUT_FILES = \
tmpnam.def \ tmpnam.def \
ungetc.def \ ungetc.def \
ungetwc.def \ ungetwc.def \
vfprintf.def \
vfscanf.def \
vfwprintf.def \ vfwprintf.def \
vfwscanf.def vfwscanf.def \
viprintf.def \
viscanf.def
CHAPTERS = stdio.tex CHAPTERS = stdio.tex

View File

@ -744,26 +744,9 @@ DOCBOOK_CHEW = ${top_srcdir}/../doc/makedocbook.py
DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml) DOCBOOK_OUT_FILES = $(CHEWOUT_FILES:.def=.xml)
DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml) DOCBOOK_CHAPTERS = $(CHAPTERS:.tex=.xml)
CLEANFILES = $(CHEWOUT_FILES) $(DOCBOOK_OUT_FILES) 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_FILES = \
$(CHEWOUT_INT_FORMATTED_IO_FILES) \
clearerr.def \ clearerr.def \
diprintf.def \
dprintf.def \ dprintf.def \
fclose.def \ fclose.def \
fcloseall.def \ fcloseall.def \
@ -804,6 +787,8 @@ CHEWOUT_FILES = \
getw.def \ getw.def \
getwchar.def \ getwchar.def \
mktemp.def \ mktemp.def \
nano-vfprintf.def \
nano-vfscanf.def \
open_memstream.def \ open_memstream.def \
perror.def \ perror.def \
putc.def \ putc.def \
@ -820,6 +805,8 @@ CHEWOUT_FILES = \
setbuffer.def \ setbuffer.def \
setlinebuf.def \ setlinebuf.def \
setvbuf.def \ setvbuf.def \
siprintf.def \
siscanf.def \
sprintf.def \ sprintf.def \
sscanf.def \ sscanf.def \
stdio_ext.def \ stdio_ext.def \
@ -829,8 +816,12 @@ CHEWOUT_FILES = \
tmpnam.def \ tmpnam.def \
ungetc.def \ ungetc.def \
ungetwc.def \ ungetwc.def \
vfprintf.def \
vfscanf.def \
vfwprintf.def \ vfwprintf.def \
vfwscanf.def vfwscanf.def \
viprintf.def \
viscanf.def
CHAPTERS = stdio.tex CHAPTERS = stdio.tex
all: all-am all: all-am