[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] maint: check for dot before using it
From: |
Akim Demaille |
Subject: |
[PATCH 1/3] maint: check for dot before using it |
Date: |
Fri, 19 Oct 2012 17:27:44 +0200 |
* configure.ac: here.
* doc/Makefile.am: Use $(DOT).
Ship the generated files, to spare the user the need for Graphviz.
---
README-hacking | 25 +++++++++++++------------
configure.ac | 1 +
doc/Makefile.am | 17 ++++++++++-------
3 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/README-hacking b/README-hacking
index 26391e9..11b9f82 100644
--- a/README-hacking
+++ b/README-hacking
@@ -43,16 +43,17 @@ These requirements do not apply when building from a
distribution tarball.
** Requirements
-We've opted to keep only the highest-level sources in the repository.
-This eases our maintenance burden, (fewer merges etc.), but imposes more
+We've opted to keep only the highest-level sources in the repository. This
+eases our maintenance burden, (fewer merges etc.), but imposes more
requirements on anyone wishing to build from the just-checked-out sources.
For example, you have to use the latest stable versions of the maintainer
tools we depend upon, including:
-- Automake <http://www.gnu.org/software/automake/>
- Autoconf <http://www.gnu.org/software/autoconf/>
+- Automake <http://www.gnu.org/software/automake/>
- Flex <http://www.gnu.org/software/flex/>
- Gettext <http://www.gnu.org/software/gettext/>
+- Graphviz <http://www.graphviz.org>
- Gzip <http://www.gnu.org/software/gzip/>
- Perl <http://www.cpan.org/>
- Rsync <http://samba.anu.edu.au/rsync/>
@@ -61,16 +62,16 @@ tools we depend upon, including:
Valgrind <http://valgrind.org/> is also highly recommended, if it supports
your architecture.
-Bison is written using Bison grammars, so there are bootstrapping
-issues. The bootstrap script attempts to discover when the C code
-generated from the grammars is out of date, and to bootstrap with an
-out-of-date version of the C code, but the process is not foolproof.
-Also, you may run into similar problems yourself if you modify Bison.
+Bison is written using Bison grammars, so there are bootstrapping issues.
+The bootstrap script attempts to discover when the C code generated from the
+grammars is out of date, and to bootstrap with an out-of-date version of the
+C code, but the process is not foolproof. Also, you may run into similar
+problems yourself if you modify Bison.
-Only building the initial full source tree will be a bit painful.
-Later, after synchronizing from the repository a plain 'make' should
-be sufficient. Note, however, that when gnulib is updated, running
-'./bootstrap' again might be needed.
+Only building the initial full source tree will be a bit painful. Later,
+after synchronizing from the repository a plain 'make' should be sufficient.
+Note, however, that when gnulib is updated, running './bootstrap' again
+might be needed.
** First checkout
diff --git a/configure.ac b/configure.ac
index 4cc9ef9..6a0e9c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,7 @@ AC_SUBST([YACC_SCRIPT])
AC_SUBST([YACC_LIBRARY])
# Checks for programs.
+AM_MISSING_PROG([DOT], [dot])
AC_PROG_LEX
$LEX_IS_FLEX || AC_MSG_ERROR([Flex is required])
AC_PROG_YACC
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 9c650bf..9c9c24c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -101,26 +101,29 @@ nodist_man_MANS = yacc.1
## ----------------------------- ##
CLEANDIRS += figs
-EXTRA_DIST += figs/example-reduce.dot figs/example-shift.dot
+FIGS_DOT = figs/example-reduce.dot figs/example-shift.dot
+EXTRA_DIST += \
+ $(FIGS_DOT) \
+ $(FIGS_DOT:.dot=.eps) $(FIGS_DOT:.dot=.pdf) $(FIGS_DOT:.dot=.png)
SUFFIXES += .dot .eps .pdf .png
-bison.dvi: figs/example-reduce.eps figs/example-shift.eps
-bison.html: figs/example-reduce.png figs/example-shift.png
-bison.pdf: figs/example-reduce.pdf figs/example-shift.pdf
+bison.dvi: $(FIGS_DOT:.dot=.eps)
+bison.html: $(FIGS_DOT:.dot=.png)
+bison.pdf: $(FIGS_DOT:.dot=.pdf)
.dot.eps:
$(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
- $(AM_V_at) dot -Teps $< >address@hidden
+ $(AM_V_at) $(DOT) -Gmargin=0 -Teps $< >address@hidden
$(AM_V_at) mv address@hidden $@
.dot.pdf:
$(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
- $(AM_V_at) dot -Tpdf -Gmargin=0 $< >address@hidden
+ $(AM_V_at) $(DOT) -Gmargin=0 -Tpdf $< >address@hidden
$(AM_V_at) mv address@hidden $@
.dot.png:
$(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
- $(AM_V_at) dot -Tpng $< >address@hidden
+ $(AM_V_at) $(DOT) -Gmargin=0 -Tpng $< >address@hidden
$(AM_V_at) mv address@hidden $@
## -------------- ##
--
1.7.12.2