[RFA] toplevel: Always use in tree makeinfo in texinfo subdir

Corinna Vinschen
2004-06-18T11:35:00Z

Hi,

the MAKEINFO stuff in Makefile.tpl first tests, if an in-tree makeinfo
binary already exists. If yes, it uses it, otherwise it tests the
installed makeinfo on the system, if the version is sufficent and
depending on the result, it uses the installed makeinfo or it calls
"missing".

However, this check has a leak when the texinfo directory itself gets
built. It creates a makeinfo binary but it doesn't use it since at
the time the MAKEINFO test is done, the binary doesn't exist yet.
That doesn't make much sense since the makeinfo binary is build before
it gets used in texinfo itself.

So the idea of the below patch is to always use the self-built makeinfo
binary when building in the texinfo subdir.

Would that be ok with everyone? If so, I'll check it into sourceware.

Corinna

* Makefile.tpl (USUAL_MAKEINFO): Always use in-tree makeinfo when
building in the texinfo directory.
* Makefile.in: Regenerate.

Index: Makefile.tpl
===================================================================
RCS file: /cvs/src/src/Makefile.tpl,v
retrieving revision 1.105
diff -u -p -r1.105 Makefile.tpl
--- Makefile.tpl 9 Jun 2004 08:32:33 -0000 1.105
+++ Makefile.tpl 18 Jun 2004 11:19:17 -0000
@@ -273,7 +273,7 @@ M4 = `if [ -f $$r/m4/m4 ] ; \
# For an installed makeinfo, we require it to be from texinfo 4.2 or
# higher, else we use the "missing" dummy.
MAKEINFO=@MAKEINFO@
-USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
+USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] || pwd | grep /texinfo$ > /dev/null ; \
then echo $$r/texinfo/makeinfo/makeinfo ; \
else if (makeinfo --version \
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/Makefile.in,v
retrieving revision 1.175
diff -u -p -r1.175 Makefile.in
--- Makefile.in 9 Jun 2004 08:32:32 -0000 1.175
+++ Makefile.in 18 Jun 2004 11:19:18 -0000
@@ -270,7 +270,7 @@ M4 = `if [ -f $$r/m4/m4 ] ; \
# For an installed makeinfo, we require it to be from texinfo 4.2 or
# higher, else we use the "missing" dummy.
MAKEINFO=@MAKEINFO@
-USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
+USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] || pwd | grep /texinfo$ > /dev/null ; \
then echo $$r/texinfo/makeinfo/makeinfo ; \
else if (makeinfo --version \
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \

--
Corinna Vinschen
Cygwin Co-Project Leader
Red Hat, Inc.