[Top][All Lists]

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

help2man rule with non-recursive Makefile

From: Peter Johansson
Subject: help2man rule with non-recursive Makefile
Date: Sun, 30 Sep 2012 20:27:35 +1000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv: Gecko/20120306 Thunderbird/3.1.20


As I'm trying to convert to non-recursive Makefiles in my projects, I bumped into a problem that have been seen by many, so I wonder what the best solution is. The problem is that I have a rule to build the man page that looks like this:

# We would like to depend on binaries, but since svndigest.1
# is distributed it is recommended to depend on only distributed files
# (see automake manual 27.5).
# We depend on configure to catch VERSION changes, to
# catch rules changes, svndigest.x is an obvious dependency, and
# lib/.revision changes for every revision.
man_deps=$(top_srcdir)/configure $(srcdir)/ \
    $(srcdir)/man/svndigest.x $(top_srcdir)/.revision

$(srcdir)/man/svndigest.1: $(man_deps)
    @$(HELP2MAN) --no-info -o $@ \
    --include $(srcdir)/man/svndigest.x \
    --version-option="--no-verbose --version" \

This was never a problem because this rule was in directory 'man', which was traversed after 'bin' and 'bin/svndigest' existed. Converting this setup to a non-recursive Makefile, this assumption and no longer true, and in my first [naive] attempt, of course, I bumped into the problem that the rule was triggered before 'bin/svndigest' was built. What is the wisest solution for this problem? I can see that one could move the rule out from 'make all' or that one have different rules depending on building from VCS or tarball. Any thoughts?


Peter Johansson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]