X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b97bbbaed7f4e377e8f3535f1af94e38ab881349..8bf276d8207dd31432305002f3a9e81c80ca62af:/doc/local.mk

diff --git a/doc/local.mk b/doc/local.mk
index c3a35d3b..c340452a 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -1,4 +1,4 @@
-## Copyright (C) 2001-2003, 2005-2013 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
@@ -24,6 +24,7 @@ doc_bison_TEXINFOS =                            \
 # Obfuscate with a variable.
 doc_bison = doc/bison
 $(doc_bison).dvi: $(FIGS_GV:.gv=.eps)
+$(doc_bison).info: $(FIGS_GV:.gv=.txt)
 $(doc_bison).pdf: $(FIGS_GV:.gv=.pdf)
 $(doc_bison).html: $(FIGS_GV:.gv=.png)
 
@@ -84,11 +85,13 @@ doc/refcard.pdf: doc/refcard.tex
 # 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
 
 
 ## ----------- ##
@@ -105,7 +108,11 @@ remove_time_stamp = \
   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)
@@ -117,18 +124,20 @@ $(top_srcdir)/doc/bison.1: doc/bison.help doc/bison.x $(top_srcdir)/configure
 	fi
 	$(AM_V_at)rm -f $@*.t
 
+if ENABLE_YACC
 nodist_man_MANS = doc/yacc.1
+endif
 
 ## ----------------------------- ##
 ## 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
 EXTRA_DIST +=                                                   \
-  $(FIGS_GV)                                                    \
+  $(FIGS_GV) $(FIGS_GV:.gv=.txt)                                \
   $(FIGS_GV:.gv=.eps) $(FIGS_GV:.gv=.pdf) $(FIGS_GV:.gv=.png)
 SUFFIXES += .gv .eps .pdf .png