bug#23599: Including search directories for pdf and dvi

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#23599: Including search directories for pdf and dvi

Mohammad Akhlaghi
Hello,

In buiding Gnuastro, we are using Gnulib's `build-aux/bootstrap'.

To keep the source files clean, we have configured the bootstrap
process to build all its files and directories in a directory named
"bootstrapped". In the Git repository (link below), this directory is
basically empty (except for a README file) and in the relase tarball
it is populated with all the bootstrapped directories. The general
structure can be seen in the repo on Savannah:

http://git.savannah.gnu.org/cgit/gnuastro.git/tree/

One of the files in Gnulib that can be imported (instead of having to
keep it in the version controlled source) is `fdl.texi' (the Texinfo
source for the GNU Free Documentation license). Until now we have this
file under version control in our `doc/' directory. But since it is
present in the Gnulib archives, I am working on importing it during
the bootstrap process (my current work is not yet merged into the
repository yet).

The bootstrapping process puts the file in
`bootstrapped/doc/fdl.texi'. So I have included the following line in
my `doc/Makefile.am':

    AM_MAKEINFOFLAGS = -I $(top_srcdir)/bootstrapped/doc

This works for `make' (to build Info files) and also for `make
html'. However, when I run `make pdf', or `make dvi', it complains
about not finding `fdl.texi'.

Looking at Automake's generated `.texi.dvi', or `.texi.pdf' rules in
`Makefile.in', I see that the `AM_MAKEINFOFLAGS' is not given to
`texi2dvi'. It is set in the `MAKEINFO' variable before calling
`texi2dvi'. Therefore `texi2dvi' isn't instructed look into this
directory and thus it can't generate the pdf or dvi outputs. When I
add this line by hand in the final Makefile's rule, it works and finds
the directory.

I currently have a workaround for this problem (copying or making a
symbolic link from the `bootstrapped/doc/fdl.texi' to the
`doc/fdl.texi' during the bootstrap process), however, this is not
elegant! This file is a bootstrapped file and it would be much better
and clear if it remains with the other bootstrapped files.

If I am doing something wrong or missing something, I would really
appreciate it if you could let me know.  Since the `AM_MAKEINFOFLAGS'
solution works in making Info and HTML outputs for this situation, but
not in pdf or dvi outputs, I thought it might be a bug and I am
sharing it with you here to see if you agree and if it is possible to
fix this problem.

Thank you very much,
Mohammad



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#23599: Including search directories for pdf and dvi

Mathieu Lirzin
Hello,

Mohammad Akhlaghi <[hidden email]> writes:

> I currently have a workaround for this problem (copying or making a
> symbolic link from the `bootstrapped/doc/fdl.texi' to the
> `doc/fdl.texi' during the bootstrap process), however, this is not
> elegant! This file is a bootstrapped file and it would be much better
> and clear if it remains with the other bootstrapped files.
>
> If I am doing something wrong or missing something, I would really
> appreciate it if you could let me know.  Since the `AM_MAKEINFOFLAGS'
> solution works in making Info and HTML outputs for this situation, but
> not in pdf or dvi outputs, I thought it might be a bug and I am
> sharing it with you here to see if you agree and if it is possible to
> fix this problem.

I haved faced the same type of problem when trying to include a texi
fragment generated at configure time in "$(top_builddir)/doc" and
setting 'AM_MAKEINFOFLAGS = -I doc'.  My ugly workaround is to override
TEXI2DVI variable like this:

  TEXI2DVI = texi2dvi -I doc

After a quick look at $(datadir)/automake-1.15/am/texibuild.am' and
'$(bindir)/texi2dvi', my guess is that 'texi2dvi' no longer handles
passing arguments via the MAKEINFO shell variable, which is the way
Automake passes AM_MAKEINFOFLAGS content to it.

Thanks for reporting this issue.

--
Mathieu Lirzin



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#23599: Including search directories for pdf and dvi

Mohammad Akhlaghi
Hi Mathieu,

Thank you very much for the prompt answer.

On 05/23/2016 10:08 AM, Mathieu Lirzin wrote:

> Hello,
>
> Mohammad Akhlaghi <[hidden email]> writes:
>
>> I currently have a workaround for this problem (copying or making a
>> symbolic link from the `bootstrapped/doc/fdl.texi' to the
>> `doc/fdl.texi' during the bootstrap process), however, this is not
>> elegant! This file is a bootstrapped file and it would be much better
>> and clear if it remains with the other bootstrapped files.
>>
>> If I am doing something wrong or missing something, I would really
>> appreciate it if you could let me know.  Since the `AM_MAKEINFOFLAGS'
>> solution works in making Info and HTML outputs for this situation, but
>> not in pdf or dvi outputs, I thought it might be a bug and I am
>> sharing it with you here to see if you agree and if it is possible to
>> fix this problem.
>
> I haved faced the same type of problem when trying to include a texi
> fragment generated at configure time in "$(top_builddir)/doc" and
> setting 'AM_MAKEINFOFLAGS = -I doc'.  My ugly workaround is to override
> TEXI2DVI variable like this:
>
>   TEXI2DVI = texi2dvi -I doc
>
> After a quick look at $(datadir)/automake-1.15/am/texibuild.am' and
> '$(bindir)/texi2dvi', my guess is that 'texi2dvi' no longer handles
> passing arguments via the MAKEINFO shell variable, which is the way
> Automake passes AM_MAKEINFOFLAGS content to it.
>
> Thanks for reporting this issue.

Your solution is indeed much better than mine. It would be great if
Automake could account for the change in texi2dvi's behavior (not
handling arguments through the MAKEINFO shell variable).

I added a TEXI2DVI definition in my doc/Makefile.am, but I get the
following error when running autoreconf (or automake independently):

   automake: warnings are treated as errors
   doc/Makefile.am:36: warning: user variable 'TEXI2DVI' defined here ...
   /usr/share/automake-1.15/am/texinfos.am: ... overrides Automake
   variable 'TEXI2DVI' defined here
   autoreconf: automake failed with exit status: 1

This is strange, because according to the Automake manual: "a variable
defined in ‘Makefile.am’ or ‘AC_SUBST’ed from ‘configure.ac’ will
override any definition of the variable that ‘automake’ would ordinarily
create."

Thank you very much,
Mohammad



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#23599: Including search directories for pdf and dvi

Mathieu Lirzin
Mohammad Akhlaghi <[hidden email]> writes:

> Your solution is indeed much better than mine. It would be great if
> Automake could account for the change in texi2dvi's behavior (not
> handling arguments through the MAKEINFO shell variable).

I agree.  Fixing the issue seems not trivial because it will require not
breaking backward compatibility with older version of Texinfo.

> I added a TEXI2DVI definition in my doc/Makefile.am, but I get the
> following error when running autoreconf (or automake independently):
>
>   automake: warnings are treated as errors
>   doc/Makefile.am:36: warning: user variable 'TEXI2DVI' defined here ...
>   /usr/share/automake-1.15/am/texinfos.am: ... overrides Automake
>   variable 'TEXI2DVI' defined here
>   autoreconf: automake failed with exit status: 1
>
> This is strange, because according to the Automake manual: "a variable
> defined in ‘Makefile.am’ or ‘AC_SUBST’ed from ‘configure.ac’ will
> override any definition of the variable that ‘automake’ would
> ordinarily create."

This is normally just a warning.  It is treated as an error because you
are using "-Werror" in automake options.  To remove this error you can
add "-Wno-override".

Thanks.

--
Mathieu Lirzin



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#23599: Including search directories for pdf and dvi

Mohammad Akhlaghi
On 05/23/2016 08:50 PM, Mathieu Lirzin wrote:

> This is normally just a warning.  It is treated as an error because you
> are using "-Werror" in automake options.  To remove this error you can
> add "-Wno-override".

That is correct, I had forgot the Automake options in `configure.ac'!

Thanks a lot for the great and prompt help,
Mohammad



Loading...