Re: info_TEXINFOS should not assume source file exists

2007-05-10 Thread Ralf Wildenhues
Hi Noah,

* Noah Slater wrote on Thu, May 10, 2007 at 10:20:56AM CEST:
> I would be hopelessly useless at patching the source but I was
> offering to patch the docs to reflect the advice you gave me as
> you suggested.

Oh, that's fine, I just misunderstood.  Please send patches to the
automake-patches list.

Cheers,
Ralf








Re: info_TEXINFOS should not assume source file exists

2007-05-10 Thread Noah Slater

There was a stab at a related issue by Paolo recently:


where it turned out that more work is needed.  You may want to
coordinate with Paolo (Cc:ed).


I would be hopelessly useless at patching the source but I was
offering to patch the docs to reflect the advice you gave me as you
suggested.

--
"Creativity can be a social contribution, but only in so
far as society is free to use the results." - R. Stallman




Re: info_TEXINFOS should not assume source file exists

2007-05-10 Thread Ralf Wildenhues
* Noah Slater wrote on Thu, May 10, 2007 at 10:09:51AM CEST:
>
> Do you have a public bug tracker?

Yes: 

>>  - it is a bug that this limitation is not documented in the manual;
>>patches welcome.
>
> Happy to help out... point me in the right direction.

There was a stab at a related issue by Paolo recently:


where it turned out that more work is needed.  You may want to
coordinate with Paolo (Cc:ed).

Note that nontrivial patches to GNU software require copyright
assignment (more information off-list in case you're still interested).

Hope that helps.

Cheers,
Ralf




Re: info_TEXINFOS should not assume source file exists

2007-05-10 Thread Noah Slater

On a second thought: another way to work around the problem:
create a small foo.texi with @setfilename and
  @include foo-main.texi
which would be the "real one" generated from foo.dbk.


This is the ideal solu^B^B^B^Bworkaround and seems to work perfectly.


Yes, I considered this a bug.


Do you have a public bug tracker?


 - it is a bug that this limitation is not documented in the manual;
   patches welcome.


Happy to help out... point me in the right direction.

Thanks,

Noah

--
"Creativity can be a social contribution, but only in so
far as society is free to use the results." - R. Stallman




Re: info_TEXINFOS should not assume source file exists

2007-05-09 Thread Stepan Kasal
Hello,

On Wed, May 09, 2007 at 12:06:17PM +0100, Noah Slater wrote:
> Thank you both for getting back to me.
> 
> >I share Ralf's feelings, but I do not see many options here:
> > - you may generate a *.texi stub, as you suggest
> > - you may compute foo.texi is from foo.dbk in bthe bootstrap script
> > - or you may refrain from using info_TEXINFOS and put the rules to
> >   Makefile.am
> 
> I will play around with your suggestions to see what fits. I do not
> want to generate the texi file from the bootstrap as I want the users
> to be able to regenerate the documentation from the original sources -

I agree that the makefile has to contain a rule for foo.texi.
What I had in mind was that the same command might be called from the
bootstrap script.  (But yes, then you have to make sure that the two
are synced.)

On a second thought: another way to work around the problem:
create a small foo.texi with @setfilename and
  @include foo-main.texi
which would be the "real one" generated from foo.dbk.

Then you shall also add to Makefile.am:
foo_TEXINFOS = foo-main.texi
to tell Automake about the dependency of foo.info on this texinfo
file.

> [...] I also have no
> problem distributing the DocBook or texi files as I do not want the
> users to HAVE TO HAVE makeinfo or docbook2x-texi installed.

In that case I would say that the workaround you suggested is the
best one available.

> Considering that my situation is not an unreasonable one, would you
> consider this a bug?

Sorry if it was not clear from my previous mail:
Yes, I considered this a bug.

Now, when you made me to think more about it, I would be more exact:
 - it is very unfortunate limitation that Automake cannot handle
   generated Texinfo sources adequately.
 - it is a bug that this limitation is not documented in the manual;
   patches welcome.

Have a nice day,
Stepan Kasal




Re: info_TEXINFOS should not assume source file exists

2007-05-09 Thread Noah Slater

Thank you both for getting back to me.


I share Ralf's feelings, but I do not see many options here:
 - you may generate a *.texi stub, as you suggest
 - you may compute foo.texi is from foo.dbk in bthe bootstrap script
 - or you may refrain from using info_TEXINFOS and put the rules to
   Makefile.am


I will play around with your suggestions to see what fits. I do not
want to generate the texi file from the bootstrap as I want the users
to be able to regenerate the documentation from the original sources -
I believe this is even a prerequisite for the GPL v3. I also have no
problem distributing the DocBook or texi files as I do not want the
users to HAVE TO HAVE makeinfo or docbook2x-texi installed.

Considering that my situation is not an unreasonable one, would you
consider this a bug?

Thanks again,

Noah

--
"Creativity can be a social contribution, but only in so
far as society is free to use the results." - R. Stallman




Re: info_TEXINFOS should not assume source file exists

2007-05-09 Thread Stepan Kasal
Hello Noah and Ralf,

On Wed, May 09, 2007 at 10:01:04AM +0200, Ralf Wildenhues wrote:
> Well, yes, automake needs to know about @setfilename to infer the info
> file name, whether you include a `version.texi' file, and similar
> things.

yes, Automake is currently written that way.  But it presents a
significant incompatibility when the texinfo file is not the primary
source and is generated from another primary format.

> I think you may be able to get around this using nodist_info_TEXINFOS

It seems that current automake does not recognize this variable at
all.  You might use Pooh_likes_HONEY as well!  

> [...] If you still want foo.texi (and maybe also the info file)
> distributed (and thus generated in the source tree), then I suggest that
> you add it/them (and all its prerequisites) to EXTRA_DIST, but it sounds
> like you don't (and thus require the users of your package to have
> texinfo installed).

I'm afraid the situation is slightly different: the texinfo file and
the info are distributed (= included into the generated tarball), and
Automake has no option to make them non-distributed.
I cannot imagine an easy workaround for this, but I believe that
having them distributed is not that big problem.

The fact that *.texi file has to exist before automake is called _is_
a problem, OTOH.

> > As "foo.texi" is generated by a rule in my Makefile I have to have my
> > bootstrap script touch the "foo.texi" file and then cat some content
> > in to it to fool automake.
> 
> That does not sound like a good idea.

I share Ralf's feelings, but I do not see many options here:
 - you may generate a *.texi stub, as you suggest
 - you may compute foo.texi is from foo.dbk in bthe bootstrap script
 - or you may refrain from using info_TEXINFOS and put the rules to
   Makefile.am

The last option is the most laborous, but it's the only one which
enables you to not distribute the .texi and .info files.

A remark at the end:
When you inspect automake.in (the source for /usr/bin/automake), you
find out that the _TEXINFOS primary is not handled by the same code
as other primaries in the general dir_PRIMARY scheme.  This is why
variables like nodist_info_TEXINFOS or infoo_TEXINFOS (a typo) are
cowardly silently ignored!  (Likewise with the MANS primary.)
You also find out that the source code contains a long comment
discussing the possibilties of implementing non-distributed *.info
files, which is part of your problem.

Hope my answer does not add to much confusion...

Stepan




Re: info_TEXINFOS should not assume source file exists

2007-05-09 Thread Ralf Wildenhues
Hello Noah,

* Noah Slater wrote on Mon, May 07, 2007 at 07:36:26PM CEST:
>
> I generate my "foo.texi" Texinfo documentation from DocBook
> ("foo.dbk") and using the info_TEXINFOS rule in my Makefile.am causes
> automake to check for "foo.texi" before completing.

Well, yes, automake needs to know about @setfilename to infer the info
file name, whether you include a `version.texi' file, and similar
things.

I think you may be able to get around this using nodist_info_TEXINFOS
instead.  If you still want foo.texi (and maybe also the info file)
distributed (and thus generated in the source tree), then I suggest that
you add it/them (and all its prerequisites) to EXTRA_DIST, but it sounds
like you don't (and thus require the users of your package to have
texinfo installed).

> As "foo.texi" is generated by a rule in my Makefile I have to have my
> bootstrap script touch the "foo.texi" file and then cat some content
> in to it to fool automake.

That does not sound like a good idea.

Hope that helps.

Cheers,
Ralf