f/ansify.c uses ANSI features
John David Anglin
dave@hiauly1.hia.nrc.ca
Sat Apr 7 11:26:00 GMT 2001
> Zack Weinberg wrote:
>
> > What's f/intdoc.texi doing getting built in stage 1? Nothing from the
> > Fortran directory should be touched until after gcc is available.
>
> It's (only) being built on install using the system's compiler. Dunno
> why though.
It's not built just on install. Here is the log from a build (in this
case HOST_CC was gcc):
[...]
cd ../../gcc && makeinfo -o cpp.info cpp.texi
cd ../../gcc && makeinfo -o gcc.info gcc.texi
if [ xinfo = xinfo ]; then \
rm -f ../../gcc/cp/g++int.info*; \
cd ../../gcc/cp && makeinfo -o g++int.info gxxint.texi; \
else true; fi
make f/intdoc
make[3]: Entering directory `/xxx/gnu/gcc-3.0/objdir/gcc'
gcc -DIN_GCC -g -Wa,-J -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -If -I../../gcc -I../../gcc/f -I../../gcc/config -I../../gcc/../include \
../../gcc/f/ansify.c -o f/ansify
f/ansify ../../gcc/f/intdoc.in \
< ../../gcc/f/intdoc.in > f/intdoc.h0
gcc -DIN_GCC -g -Wa,-J -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -If -I../../gcc -I../../gcc/f -I../../gcc/config -I../../gcc/../include \
../../gcc/f/intdoc.c -o f/intdoc
make[3]: Leaving directory `/xxx/gnu/gcc-3.0/objdir/gcc'
f/intdoc > ../../gcc/f/intdoc.texi
case "c " in \
*[fF]77*) touch lang-f77;; \
*) rm -f lang-f77;; \
esac
if [ -f lang-f77 ] && [ xinfo = xinfo ]; then \
rm -f ../../gcc/f/g77.info-*; \
cd ../../gcc/f && makeinfo -o g77.info g77.texi; \
else true; fi
For the above to work, I believe f/intdoc.c has to be compiled with an
ANSI compiler. Don't know if ansify.c and intdoc.c could be reworked so
that intdoc could successly generate intdoc.texi when built with a non
ANSI compiler.
The other issue is the Makefile. As I noted, f/intdoc.texi always
gets rebuilt because it depends on f/intdoc.h0 which depends on
ansify. I think .texi files should only depend on the sources used
to build them and not on files generated in intermediate steps. In
building a release or a snapshot after using contrib/gcc_update, the
documentation should be up-to-date and not need rebuilding.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
More information about the Gcc-bugs
mailing list