octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib and automake


From: Benjamin Lindner
Subject: Re: gnulib and automake
Date: Wed, 11 Nov 2009 21:47:47 +0100
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

John W. Eaton wrote:
On 10-Nov-2009, Benjamin Lindner wrote:

| No, this is a pure msys issue. I use MiKTeX for building documentation.
| MiKTeX, as native win application, uses windows style paths.
| However, ocatve's configure procedure is run within msys, and uses thus
| msys style paths, which - consequently - miktex does not understand.

Can you send details?  I'd like to fix this so that it just works
without requiring you to patch Octave's Makefiles.

Hm, switching to automake got me stuck in building the documentation.
I don't have a nice solution at hand. What worked previously cannot be
done in the new build system (at least not uncomplicated).

Following issues:

1)

<build>/doc/conf.texi contains the lines

@set top_srcdir /foo/bar
@set abs_top_srcdir /foo/bar
@set OCTAVEHOME  /foo/bar

Now miktex as native win application cannot handle such msys-style
paths, so I apply the following change:

diff -r 6fcc4179c178 common.mk
--- a/common.mk Wed Nov 11 13:17:34 2009 -0500
+++ b/common.mk Wed Nov 11 21:27:54 2009 +0100
@@ -622,9 +622,9 @@
 define do_subst_texinfo_vals
 echo "making $@ from $<"
 $(SED) < $< \
-  -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
-  -e "s|%top_srcdir%|${top_srcdir}|" \
-  -e "s|%OCTAVE_HOME%|${prefix}|" \
+  -e "s|%abs_top_srcdir%|`cd ${abs_top_srcdir} && pwd -W`|" \
+  -e "s|%top_srcdir%|`cd ${top_srcdir} && pwd -W`|" \
+  -e "s|%OCTAVE_HOME%|`cd ${prefix} && pwd -W`|" \
   -e "s|%OCTAVE_VERSION%|${version}|" \
   -e "s|%TEXINFO_COLAMD%|${TEXINFO_COLAMD}|" \
   -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \
diff -r 6fcc4179c178 doc/Makefile.am
--- a/doc/Makefile.am   Wed Nov 11 13:17:34 2009 -0500
+++ b/doc/Makefile.am   Wed Nov 11 21:27:54 2009 +0100
@@ -37,9 +37,9 @@
 conf.texi: conf.texi.in $(TOPDIR)/common.mk
        @echo "making $@ from $<"
        @$(SED) < $< \
-         -e "s|%abs_top_srcdir%|${abs_top_srcdir}|" \
-         -e "s|%top_srcdir%|${top_srcdir}|" \
-         -e "s|%OCTAVE_HOME%|${prefix}|" \
+         -e "s|%abs_top_srcdir%|`cd ${abs_top_srcdir} && pwd -W`|" \
+         -e "s|%top_srcdir%|`cd ${top_srcdir} && pwd -W`|" \
+         -e "s|%OCTAVE_HOME%|`cd ${prefix} && pwd -W`|" \
          -e "s|%OCTAVE_VERSION%|${version}|" \
          -e "s|%TEXINFO_COLAMD%|${TEXINFO_COLAMD}|" \
          -e "s|%TEXINFO_CHOLMOD%|${TEXINFO_CHOLMOD}|" \

I noted that this code is duplicated, once in common.mk, once in doc/makefile.am.
I guess that's an unnecessary duplication.
Anyway, I don't substitute ${abs_top_srcdir}, rather the windows-style
of this path (pwd -W prints the current working directory in win-style)

Ok, this one can be solved.


2)

When calling a native win application from within msys, then msys takes
care of translating all msys-style paths on both the command line as
well as in the environment into win-style paths.
However, it does not do this for TEXINPUTS and TEXMFCNF, because these paths are literally encolsed in double quotes.
(I am not sure if double quotes are legal in PATH on windows)

So I apply the change

diff -r 6fcc4179c178 doc/interpreter/Makefile.am
--- a/doc/interpreter/Makefile.am       Wed Nov 11 13:17:34 2009 -0500
+++ b/doc/interpreter/Makefile.am       Wed Nov 11 21:27:54 2009 +0100
@@ -28,10 +28,10 @@

 TEXINFO_TEX = ../texinfo.tex

-TEXINPUTS := "..$(PATH_SEPARATOR)$(srcdir)$(PATH_SEPARATOR)$(srcdir)/..$(PATH_SEPARATOR)$(TEXINPUTS)$(PATH_SEPARATOR)" +TEXINPUTS := ..$(PATH_SEPARATOR)$(srcdir)$(PATH_SEPARATOR)$(srcdir)/..$(PATH_SEPARATOR)$(TEXINPUTS)$(PATH_SEPARATOR)
 export TEXINPUTS

-TEXMFCNF := "..$(PATH_SEPARATOR)$(srcdir)$(PATH_SEPARATOR)$(srcdir)/..$(PATH_SEPARATOR)$(PATH_SEPARATOR)$(TEXMFCNF)$(PATH_SEPARATOR)" +TEXMFCNF := ..$(PATH_SEPARATOR)$(srcdir)$(PATH_SEPARATOR)$(srcdir)/..$(PATH_SEPARATOR)$(PATH_SEPARATOR)$(TEXMFCNF)$(PATH_SEPARATOR)
 export TEXMFCNF

 dist_man1_MANS = \


Again, this can be solved.

3)

Now I am stuck at the problem that miktex supports TEXINPUTS, however
apparently does not put its contents *in front* of the search path.
This results in miktex picking up its own texinfo.tex, which is dated
2007-06-20.13. And this version is too old (it chokes on the '@'
character in the example's path)
Now octave ships a newer version of texinfo.tex (because of these '@'
characters in paths), however, miktex does not pick up this one.
This problem was present since octave 3.0.x, and  I did the following
in the pre-automake time:

diff -r 29e0b2f57398 doc/interpreter/Makefile.in
--- a/doc/interpreter/Makefile.in       Tue Sep 15 19:39:42 2009 +0200
+++ b/doc/interpreter/Makefile.in       Tue Sep 15 19:39:48 2009 +0200
@@ -135,13 +135,13 @@
 # targeted file name (e.g. to generate octave-a4.pdf, copy to
 # octave-a4.texi) and call texi2[dvi|pdf] on it.

-TEXI2DVICOMMAND = TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \ - TEXMFCNF="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \
-         $(TEXI2DVI)
+TEXI2DVICOMMAND = TEXINPUTS="..:$(srcdir):$(srcdir)/..:$(TEXINPUTS):" \
+       TEXMFCNF="..:$(srcdir):$(srcdir)/..:$(TEXINPUTS):" \
+         $(TEXI2DVI) -I$(srcdir)/..

-TEXI2PDFCOMMAND = TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \ - TEXMFCNF="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXMFCNF)$(sepchar)" \
-         $(TEXI2PDF)
+TEXI2PDFCOMMAND = TEXINPUTS="..:$(srcdir):$(srcdir)/..:$(TEXINPUTS):" \
+       TEXMFCNF="..:$(srcdir):$(srcdir)/..:$(TEXMFCNF):" \
+         $(TEXI2PDF) -I$(srcdir)/..

 FORMATTED = octave.info octave.pdf octave-a4.pdf octave.info-[0-9]*


(i.e. add "-I$(srcdir)/.." explicitly to texi2pdf and texi2dvi command line)

I cannot do this now, since the rule to create .dvi and .pdf from .texi
is not coded in the makefiles, but created automatically.

I would need to have

.texi.dvi:
        TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
        $(TEXI2DVI) -I$(srcdir)/.. $<

in the generated makefile.in (again added "-I$(srcdir)/.." here). This
then works.

I could do this after calling autoconf.sh, but this is not really a
satisfying solution.

benjamin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]