I am wanting to use help2man to produce the man page for a program.  I
have a Makefile.am with the following.

  dist_man_MANS = example.8

  example.8: src/example
         help2man --output=example.8 ./src/example

But when I run 'make distcheck' I get the following error.

  Error: files left after distclean

I am using:

  autoconf (GNU Autoconf) 2.53
  automake (GNU automake) 1.5

I think I understand what is happening and why.  But even after
reading the docs (specifically the sections "What Gets Cleaned" and
"When Automake Isn't Enough") but I am still at a loss as to the
correct way to proceed.  How do I remove the file during a clean?

[Aside: Since this is a normal file to build I would expect the normal
clean to remove it.  But it requires help2man as a build dependency
which may not exist on a developer system.  So perhaps it should be
maintainer-clean-hook.  Hmm...  But if they are a developer then I
will assume them to have all of the development tools available.
Let's not worry for now.  Let's just make it work with either.]

I will be explicit.  Should I put in a distclean-hook: target that
removes this file?  Of course this does not work.  I can't get the
hook to be called by 'make distcheck'.

  distclean-hook:
        rm -f example.8

What is the normal way to handle using help2man to create man pages?
(I am just going to avoid creating man pages for the moment.)

Thanks
Bob

Reply via email to