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

[OT] Need help with Makefile



I'm using Automake, so really I need help with Makefile.am.

I have a directory "html" that will store the HTML documentation for a
project.  I need help creating the Makefile.am that will generate the
docs.

Here's the documents that need to be generated:

html_DATA = \
    INSTALL.html \
    README.html \
    index.html \
    API.html \

I have a *single* program that knows how to generate *all* of those at the
same time -- call it ../doc/build_docs.

The important thing is that build_docs knows how to build ALL of the docs,
so it only needs to be run once and then everything will be up to date.
It understands the dependencies itself.

But for this current Makefile.am I need to setup some dependencies also.


INSTALL.html and README.html depend on ../pod/INSTALL.pod and
../pod/README.pod.  (actually, there's about ten of those files)

index.html doesn't depend on anything -- it just needs to exist.
build_docs creates it (it's an index for all the docs).

API.html depends on ../perl/API.pm but again build_docs

The trouble I'm having is I can't seem to make a general rule like:

  %.html: $(srcdir)/../pod/%.pod

because index.html does not have a index.pod source file.

Also when I do setup some rules the bin_docs program gets run over and
over for each file, even though it only needs to be run once.

SO in other words, if any of the html_DATA does are out of date or missing
then run build_docs *once* and then be done.

Thanks,



-- 
Bill Moseley moseley@hank.org



Reply to: