-## Copyright (C) 2001-2003, 2005-2014 Free Software Foundation, Inc.
+## Copyright (C) 2001-2003, 2005-2015 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
# repeated builds of bison.help.
EXTRA_DIST += $(top_srcdir)/doc/bison.help
+if ! CROSS_COMPILING
MAINTAINERCLEANFILES += $(top_srcdir)/doc/bison.help
$(top_srcdir)/doc/bison.help: src/bison$(EXEEXT)
$(AM_V_GEN)src/bison$(EXEEXT) --version >doc/bison.help.tmp
$(AM_V_at) src/bison$(EXEEXT) --help >>doc/bison.help.tmp
$(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
+endif ! CROSS_COMPILING
## ----------- ##
sed 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
# Depend on configure to get version number changes.
-$(top_srcdir)/doc/bison.1: doc/bison.help doc/bison.x $(top_srcdir)/configure
+if ! CROSS_COMPILING
+MAN_DEPS = doc/bison.help doc/bison.x $(top_srcdir)/configure
+endif
+
+$(top_srcdir)/doc/bison.1: $(MAN_DEPS)
$(AM_V_GEN)$(HELP2MAN) \
--include=$(top_srcdir)/doc/bison.x \
--output=$@.t src/bison$(EXEEXT)
## Graphviz examples generation. ##
## ----------------------------- ##
-CLEANDIRS += doc/figs
+CLEANFILES += $(FIGS_GV:.gv=.eps) $(FIGS_GV:.gv=.pdf) $(FIGS_GV:.gv=.png)
FIGS_GV = \
doc/figs/example.gv \
doc/figs/example-reduce.gv doc/figs/example-shift.gv