From: thurston Date: Sat, 4 Apr 2009 18:02:13 +0000 (+0000) Subject: Added doc to automake control. Using another conditional to control the X-Git-Tag: 2.0_alpha~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49747ef05b693752eaba7f949509c4c0e1bc59d9;p=external%2Fragel.git Added doc to automake control. Using another conditional to control the building of the manual. We don't want it built in the dist because the build dependencies cannot be expected to exist. git-svn-id: http://svn.complang.org/ragel/trunk@777 052ea7fc-9027-0410-9066-f65837a77df0 --- diff --git a/Makefile.am b/Makefile.am index 8f908d9..aed278f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,13 @@ -SUBDIRS = ragel aapl test +SUBDIRS = ragel aapl doc test -no_parsers = 's/build_parsers=yes/build_parsers=no/' +dist_doc_DATA = ChangeLog + +sed_script = 's/build_parsers=yes/build_parsers=no/;s/build_manual=yes/build_manual=no/;' dist-hook: cp $(top_distdir)/configure $(top_distdir)/configure.tmp cp $(top_distdir)/configure.in $(top_distdir)/configure.in.tmp - sed $(no_parsers) $(top_distdir)/configure.tmp > $(top_distdir)/configure - sed $(no_parsers) $(top_distdir)/configure.in.tmp > $(top_distdir)/configure.in + sed $(sed_script) $(top_distdir)/configure.tmp > $(top_distdir)/configure + sed $(sed_script) $(top_distdir)/configure.in.tmp > $(top_distdir)/configure.in rm $(top_distdir)/configure.tmp $(top_distdir)/configure.in.tmp diff --git a/configure.in b/configure.in index 4533a15..64cf2f8 100644 --- a/configure.in +++ b/configure.in @@ -31,6 +31,9 @@ dnl (production). build_parsers=yes; AM_CONDITIONAL(BUILD_PARSERS, [test "x$build_parsers" = "xyes"]) +build_manual=yes; +AM_CONDITIONAL(BUILD_MANUAL, [test "x$build_manual" = "xyes"]) + dnl Checks for programs. AC_PROG_CC AC_PROG_CXX @@ -96,7 +99,10 @@ AC_CHECK_PROG(GMCS, gmcs, gmcs) dnl write output files AC_OUTPUT( - [Makefile ragel/Makefile aapl/Makefile doc/Makefile test/Makefile test/runtests], + [ + Makefile ragel/Makefile aapl/Makefile doc/Makefile test/Makefile test/runtests + doc/ragel.1 + ], [chmod +x test/runtests] ) diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..4d1c620 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,50 @@ +# +# Copyright 2001-2007 Adrian Thurston +# + +# This file is part of Ragel. +# +# Ragel is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# Ragel is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ragel; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +man_MANS = ragel.1 + +dist_doc_DATA = ragel-guide.pdf + +if BUILD_MANUAL + +.fig.pdf: + fig2dev -L pdf $< $@ + +.tex.pdf: + pdflatex -interaction=nonstopmode $< >/dev/null + pdflatex -interaction=nonstopmode $< >/dev/null + pdflatex -interaction=nonstopmode $< >/dev/null + +version.tex: Makefile + echo '|def|version{$(PACKAGE_VERSION)}' | tr '|' '\\' > version.tex + echo '|def|pubdate{$(PUBDATE)}' | tr '|' '\\' >> version.tex + +ragel-guide.pdf: version.tex + +ragel-guide.pdf: bmconcat.pdf bmregex.pdf dropdown.pdf exdoneact.pdf \ + exoutact1.pdf exstrongsubtr.pdf lines2.pdf smallscanner.pdf bmnull.pdf \ + comments1.pdf entryguard.pdf exinter.pdf exoutact2.pdf exsubtr.pdf \ + lmkleene.pdf stembed.pdf bmnum.pdf comments2.pdf exaction.pdf \ + exnegate.pdf explus.pdf finguard.pdf opconcat.pdf bmor.pdf conds1.pdf \ + exallact.pdf exoption.pdf exstact.pdf leftguard.pdf opor.pdf \ + bmrange.pdf conds2.pdf exconcat.pdf exor.pdf exstar.pdf lines1.pdf \ + opstar.pdf + +endif diff --git a/doc/Makefile.in b/doc/Makefile.in deleted file mode 100644 index c11db98..0000000 --- a/doc/Makefile.in +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright 2001-2007 Adrian Thurston -# - -# This file is part of Ragel. -# -# Ragel is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Ragel is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ragel; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -INPUT = version.tex ragel-guide.tex - -# Pick up all the figures in the current dir. -FIGURES = $(wildcard *.fig) -PDFFIGS = $(FIGURES:%.fig=%.pdf) - -# Get the version info. -include ../version.mk - -# Installation locations. -PACKAGE = ragel -prefix = @prefix@ -datarootdir = @datarootdir@ -docdir = @docdir@ -mandir = @mandir@ - -MANPAGES = ragel.1 - -# Rules. -all: ragel-guide.pdf $(MANPAGES) - -ragel-guide.pdf: $(PDFFIGS) $(INPUT) - -%.pdf: %.fig - fig2dev -L pdf $< $@ - -%.pdf: %.tex - pdflatex -interaction=nonstopmode $< >/dev/null - pdflatex -interaction=nonstopmode $< >/dev/null - pdflatex -interaction=nonstopmode $< >/dev/null - -version.tex: ../version.mk - echo '|def|version{$(VERSION)}' | tr '|' '\\' > version.tex - echo '|def|pubdate{$(PUBDATE)}' | tr '|' '\\' >> version.tex - -%.1: %.1.in ../version.mk - cat $< | sed 's/@PUBDATE@/$(PUBDATE)/' \ - | sed 's/@VERSION@/$(VERSION)/' > $@ - -clean: - rm -f $(MANPAGES) *.bak *.aux *.dvi *.log *.toc *.pdf - -distclean: clean - rm -f Makefile - -man: $(MANPAGES) - -man-install: man - install -d $(DESTDIR)$(mandir)/man1 - install -m 644 ragel.1 $(DESTDIR)$(mandir)/man1/ragel.1 - -install: all man-install - install -d $(DESTDIR)$(docdir) - install -m 644 ragel-guide.pdf $(DESTDIR)$(docdir)/ragel-guide.pdf - gzip -c ../ChangeLog > ChangeLog.gz - install -m 644 ChangeLog.gz $(DESTDIR)$(docdir)/ChangeLog.gz - rm ChangeLog.gz