diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 52b05e6061..784770570b 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.3 2004/03/05 05:04:53 marka Exp $ +# $Id: Makefile.in,v 1.4 2007/01/30 07:47:22 sra Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -30,7 +30,18 @@ doc man:: ${MANOBJS} docclean manclean maintainer-clean:: rm -f options -options: ../../bin/tests/cfg_test - ../../bin/tests/cfg_test --named --grammar | \ - ${PERL} ${srcdir}/format-options.pl >options || \ - rm -f options +# Do not make options depend on ../../bin/tests/cfg_test, doing so +# will cause excessively clever versions of make to attempt to build +# that program right here, right now, if it is missing, which will +# cause make doc to bomb. + +CFG_TEST = ../../bin/tests/cfg_test + +options: FORCE + if test -x ${CFG_TEST} && \ + ${CFG_TEST} --named --grammar | \ + ${PERL} ${srcdir}/format-options.pl >$@.new ; then \ + mv -f $@.new $@ ; \ + else \ + rm -f $@.new ; \ + fi