Re: trying to install docs that are distributed with my package...

2006-08-29 Thread Ralf Wildenhues
Hello Ed,

* Ed Hartnett wrote on Tue, Aug 29, 2006 at 01:20:36AM CEST:
 
 # Get lists of the corresponding ps, info, and pdf files.
 ps_docs = ${info_TEXINFOS:.texi=.ps} 
 pdf_docs = ${info_TEXINFOS:.texi=.pdf}
 info_docs= ${info_TEXINFOS:.texi=.info}
 txt_docs= ${info_TEXINFOS:.texi=.txt}
 
 # These files will be included with the dist.
 EXTRA_DIST = $(ps_docs) $(pdf_docs) $(txt_docs) $(info_docs)
 
 This works well. The documents are all build on the developer machine
 when make dist is run, and they all appear in the distribution as
 built documentation. When I run make all on the distribution,
 nothing happens with these documents. (I am using no-installinfo as an
 automake option).

BTW, why do you choose to not install the info documentation where the
other info documentation ends up in?

 docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION)
 doc_DATA = $(ps_docs) $(pdf_docs) $(txt_docs) $(info_docs)
 
 But this now causes the postscript, PDF, text, and info files to be
 built when I run make install on the distribution. In other words,
 it doesn't try to install the files I've already included in the
 distribution, it rebuilds them all. I don't want it to rebuild the
 files, just to install the ones I've already shipped.

With PS this is reasonable: the .dvi file is not in the distribution,
so the make rules try to update that.  (Portable make syntax is not able
to express this kind of intermediate dependency.)  Solution is to put
netcdf.dvi in EXTRA_DIST as well.

Which `make' implementation tries to rebuild the other files as well?
On which system?  Do you use a VPATH build?  Do you have overridden the
rules for (some of) these targets, or are the ones issued by Automake
for PDF, PS etc.  used?  If the latter, why doesn't `missing' kick in
and result in a successful build even without `makeinfo'?  Can you try
to get debugging output of the make run to see why else it may think
the targets may be outdated?

Best is a small reproducible example.  Which Automake version BTW?

Cheers,
Ralf




Re: trying to install docs that are distributed with my package...

2006-08-29 Thread Stepan Kasal
Hello,

On Mon, Aug 28, 2006 at 06:04:13PM -0700, Tyler MacDonald wrote:
 Ed Hartnett [EMAIL PROTECTED] wrote:
   It sounds like the best plan would be to add a flag to configure
 that indicates you want to build docs, like --with-build-docs using
 AC_ARG_WITH. [...]

a quick comment from a purist:
--enable-build-docs, defined using AC_ARG_ENABLE would be more
appropriate here.  (These two are functionally equivalent, it's just
a convention, but following it might prevent confusion.)

As far as the rest of the question is concernet, it might help to see
an example.  Perhaps the problem is that version.texi gets represhed
and triggers the rebuild.

Could you please post a link to a tarball which exhibits the problem?
(If you observed the problem when building from a CVS checkout, please
verify that it reproduces with a tarball made by `make dist'.)

Have a ncie day,
Stepan Kasal




Re: trying to install docs that are distributed with my package...

2006-08-29 Thread Ed Hartnett
Ralf Wildenhues [EMAIL PROTECTED] writes:

 Hello Ed,


Howdy Ralf!

 With PS this is reasonable: the .dvi file is not in the distribution,
 so the make rules try to update that.  (Portable make syntax is not able
 to express this kind of intermediate dependency.)  Solution is to put
 netcdf.dvi in EXTRA_DIST as well.

Yep, you sure hit it that time! Works like a charm now! 

Thanks!

Ed

-- 
Ed Hartnett  -- [EMAIL PROTECTED]





Re: trying to install docs that are distributed with my package...

2006-08-29 Thread Ed Hartnett
Stepan Kasal [EMAIL PROTECTED] writes:

 Hello,

 On Mon, Aug 28, 2006 at 06:04:13PM -0700, Tyler MacDonald wrote:
 Ed Hartnett [EMAIL PROTECTED] wrote:
  It sounds like the best plan would be to add a flag to configure
 that indicates you want to build docs, like --with-build-docs using
 AC_ARG_WITH. [...]

 a quick comment from a purist:
 --enable-build-docs, defined using AC_ARG_ENABLE would be more
 appropriate here.  (These two are functionally equivalent, it's just
 a convention, but following it might prevent confusion.)


In fact I have an --enable-docs-install.

The docs are not built by make all, and they are shipped with the
distribution, so they are not built by make install either, just
copied.

Thanks for the suggestions!

Ed

-- 
Ed Hartnett  -- [EMAIL PROTECTED]





trying to install docs that are distributed with my package...

2006-08-28 Thread Ed Hartnett
Howdy all!

I have some documentation which accompanies my library. I would like
to install the documentation on the user machine, without building it
on the user machine.

What I want is to build the documentation on the developer's machine,
include it in the distribution, and then install it.

The documents are all texinfo documents, and we cannot require that
every user machine have texinfo and tex installed.

For example, I can build my manuals, and include their postscript,
PDF, info, and ASCII text versions in the distribution like this:

# These are the source files for all the netcdf manuals.
info_TEXINFOS = netcdf.texi netcdf-install.texi netcdf-c.texi   \
netcdf-f77.texi netcdf-f90.texi netcdf-cxx.texi netcdf-tutorial.texi

# Get lists of the corresponding ps, info, and pdf files.
ps_docs = ${info_TEXINFOS:.texi=.ps} 
pdf_docs = ${info_TEXINFOS:.texi=.pdf}
info_docs= ${info_TEXINFOS:.texi=.info}
txt_docs= ${info_TEXINFOS:.texi=.txt}

# These files will be included with the dist.
EXTRA_DIST = $(ps_docs) $(pdf_docs) $(txt_docs) $(info_docs)

This works well. The documents are all build on the developer machine
when make dist is run, and they all appear in the distribution as
built documentation. When I run make all on the distribution,
nothing happens with these documents. (I am using no-installinfo as an
automake option).

This is exactly what I want.

But how to get automake to install them?

I tried this:

docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION)
doc_DATA = $(ps_docs) $(pdf_docs) $(txt_docs) $(info_docs)

But this now causes the postscript, PDF, text, and info files to be
built when I run make install on the distribution. In other words,
it doesn't try to install the files I've already included in the
distribution, it rebuilds them all. I don't want it to rebuild the
files, just to install the ones I've already shipped.

Any thoughts on this?

Thanks!

Ed



-- 
Ed Hartnett  -- [EMAIL PROTECTED]





Re: trying to install docs that are distributed with my package...

2006-08-28 Thread Tyler MacDonald
Ed Hartnett [EMAIL PROTECTED] wrote:
 What I want is to build the documentation on the developer's machine,
 include it in the distribution, and then install it.
 
 The documents are all texinfo documents, and we cannot require that
 every user machine have texinfo and tex installed.

It sounds like the best plan would be to add a flag to configure
that indicates you want to build docs, like --with-build-docs using
AC_ARG_WITH. Then you could use the AM_CONDITIONAL macro to set it up to be
an automake conditional, and use if directives in your Makefile.am to make
it so that the rules for building documentation only appear when that flag
is specified. There's plenty of documentation on this (just look up
AM_CONDITIONAL). If you want an example, I do this all over the place for
stuff in mod_bt [http://www.crackerjack.net/mod_bt/].

Cheers,
Tyler