[cig-commits] [commit] master: Add build rule for documentation. (3abe0b4)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Sun Apr 13 22:09:39 PDT 2014
Repository : ssh://geoshell/mineos
On branch : master
Link : https://github.com/geodynamics/mineos/compare/17a054a4092f47b71487a398aad1c03b8413fb83...e0b73d40912608f8f110d14a440748f62d33761f
>---------------------------------------------------------------
commit 3abe0b4c19fe0f570da6dccf822f29efd14bf2b6
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date: Sun Apr 13 20:18:06 2014 -0400
Add build rule for documentation.
>---------------------------------------------------------------
3abe0b4c19fe0f570da6dccf822f29efd14bf2b6
Makefile.am | 19 ++++++++++++++++++-
configure.ac | 12 ++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 407ee15..9745902 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,11 +24,28 @@ bin_PROGRAMS = minos_bran syndat green eigcon \
dist_bin_SCRIPTS = scripts/creat_origin
-# demo
+# documentation
+
+if HAVE_LYX
dist_pkgdata_DATA = \
doc/mineos.pdf
+doc/mineos.pdf: doc/mineos.lyx \
+ doc/eigcon.lyx \
+ doc/green.lyx \
+ doc/syndat.lyx \
+ doc/utilities.lyx \
+ doc/fun.lyx \
+ doc/tab.lyx \
+ doc/examples.lyx \
+ doc/model.lyx \
+ doc/benchmark.lyx \
+ doc/frame.lyx
+ $(LYX) --export pdf2 doc/mineos.lyx
+
+endif
+
# main programs
minos_bran_SOURCES = minos_bran.f
diff --git a/configure.ac b/configure.ac
index 1bf6b2b..e04e59e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,18 @@ AC_PROG_F77
AC_PROG_CC
AC_F77_WRAPPERS
+AC_ARG_ENABLE([doc],
+ [AS_HELP_STRING([--disable-doc], [disable installation of documentation])],
+ [enable_doc="$enableval"],
+ [enable_doc=yes])
+if test "x$enable_doc" != "xno"; then
+ AC_CHECK_PROG([LYX], [lyx], [lyx])
+ if test -z "$LYX"; then
+ AC_MSG_ERROR([Unable to create PDF version of the user manual without LyX.])
+ fi
+fi
+AM_CONDITIONAL([HAVE_LYX], test -n "$LYX")
+
# Checks for libraries.
# Checks for header files.
More information about the CIG-COMMITS
mailing list