This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ada] Redo Make-lang.in rules to not always regenerategnat_ug_*.texi
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: Kelley Cook <kelleycook at wideopenwest dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 20 Dec 2003 15:56:29 +0100
- Subject: Re: [ada] Redo Make-lang.in rules to not always regenerategnat_ug_*.texi
- References: <3FDA283E.8050509@ford.com> <3FE1CB6E.5010405@twcny.rr.com>
On Thu, 2003-12-18 at 16:44, Nathanael Nerode wrote:
> Kelley Cook wrote:
> > Since this hunk was unrelated to the bug that is present in rest of
> > PR/12744, I am now submitting it broken out for a seperate approval.
> >
> > On my first attempt to fix PR/12744, Joseph Myers pointed out
> > (http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00258.html) that both the
> > fortran77 and the ada directories have generated .texi files which are
> > required to still be in the CVS directory so a script can easily
> > generate current webpage documentation without requiring a complete
> > bootstrap.
> >
> > However, it soon became obvious to me that the current gnat_ug_*.texi
> > rules cause them to be always be (identically) regenerated on any build,
> > since they each depend on the ada/doctools/xgnatug which does not exist
> > in the source tree, so that file will always be built and will of course
> > be newer than the .texi file.
> >
> > Additionally, that executable was also missing a $(buildexe), so the
> > dependency likely wouldn't quite work under mingw32 or any other
> > environments which use extensions.
> >
> > This is a perfect job for order-only dependencies, but unfortunately
> > that nifty feature didn't yet exist in gnu make 3.79.
> >
> > So this patch fixes those bugs in the same way the fortran folks did by
> > punting and introducing a stamp file which contains the real dependency
> > of the .texi files. As a bonus ada/doctools/xgnatug($buildexe) will not
> > be built unless those dependency were touch thereby reducing bootstrap
> > times by a few seconds.
> >
> > Bootstrapped numerous times on i686-pc-cygwin as part of testing larger
> > patch.
> >
> > OK, assuming regtest with just this hunk passes?
> Yes, OK.
The second bootstrap with the same srcdir and a different builddir
fails, this patch does not look so ok.
make[3]: Leaving directory `/home/guerby/work/gcc/build/build-20031220T133234/gcc'
ada/doctools/xgnatug vms /home/guerby/work/gcc/gcc/gcc/ada/gnat_ug.texi \
/home/guerby/work/gcc/gcc/gcc/ada/ug_words \
/home/guerby/work/gcc/gcc/gcc/ada/gnat_ug_vms.texi
make[2]: ada/doctools/xgnatug: Command not found
make[2]: *** [/home/guerby/work/gcc/gcc/gcc/ada/gnat_ug_vms.texi] Error 127
make[2]: Leaving directory `/home/guerby/work/gcc/build/build-20031220T133234/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/home/guerby/work/gcc/build/build-20031220T133234/gcc'
make: *** [bootstrap] Error 2
srcdir/ada/stamp-xgnatug is present (from first bootstrap) but
builddir/ada/doctools/xgnatug is not rebuilt. If I understand correctly
what is going on, once stamp-xgnatug is present, all subsequent
builds in a clean dir will fail.
Laurent