## @configure_input@ ## ## @file Makefile ## @brief Create the API reference manuals and other documentation. ## @author Michael Hucka (Caltech) ## ## $Id: Makefile.in 9563 2009-06-05 20:09:49Z ajouraku $ ## $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/docs/src/Makefile.in $ ## ## This file is part of libSBML. Please visit http://sbml.org for more ## information about SBML, and the latest version of libSBML. ## ## Copyright 2005-2009 California Institute of Technology. ## Copyright 2002-2005 California Institute of Technology and ## Japan Science and Technology Corporation. ## ## This library is free software; you can redistribute it and/or modify it ## under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation. A copy of the license agreement is provided ## in the file named "LICENSE.txt" included with this software distribution ## and also available online as http://sbml.org/software/libsbml/license.html ## # ----------------------------------------------------------------------------- # Configuration variables # ----------------------------------------------------------------------------- # Some of the following are substituted automatically by `configure'. If # you are looking at "Makefile", do not edit these values; instead, run the # configure script at the top level of the src tree. It will recreate # "Makefile". include @top_srcdir@/config/makefile-common-vars.mk # `srcdir' points to the current directory, but should be set by configure. # `subdir' must be set manually to the relative dir under srcdir. Don't # set `subdir' to an absolute path, or some `make' actions will fail. srcdir = @srcdir@ thisdir = docs/src # We currently only generate documentation in HTML format. # In order to be able to create distributions with ready-to-read docs, we # have a separate directory for formatted docs. formatted = ../formatted cpp-manual = $(formatted)/cpp-api c-manual = $(formatted)/c-api java-manual = $(formatted)/java-api python-manual = $(formatted)/python-api perl-manual = $(formatted)/perl-api # The C++ and C manuals are always made, but additional manuals depend on # the options with which libSBML was configured. docs = $(cpp-manual) $(c-manual) ifdef USE_JAVA docs += $(java-manual) endif ifdef USE_PYTHON docs += $(python-manual) endif ifdef USE_PERL docs += $(perl-manual) endif # The variable `extra_clean' is used in `makefile-common-actions.mk' # for `make dist'. Normally you wouldn't want to remove documentation # files, but the following are all generated files and directories. # We don't want to remove the formatted docs during a regular make clean, # only a distclean. extra_distclean = \ Makefile \ $(docs) \ doxygen-config-c.txt \ doxygen-config-cpp.txt \ doxygen-config-perl.txt \ doxygen-config-python.txt # The `make dist' rules for this directory are more complicated than usual. # There are additional separate rules below. distfiles = \ DoxygenLayout.xml \ ExcludeDoclet.java \ doxygen-base.css \ doxygen-config-c.txt.in \ doxygen-config-common.txt \ doxygen-config-cpp.txt.in \ doxygen-config-perl.txt.in \ doxygen-config-python.txt.in \ doxygen-footer.html \ doxygen-header.html \ doxygen-tabs.css \ doxygen-tree.css \ Makefile.in \ examples/readmath.cpp \ examples/readSBML.java \ examples/simpleread.cpp \ graphics/astnode-illustration.jpg \ graphics/built-in-units.jpg \ graphics/compartment-size.jpg \ graphics/enzymatic-reaction.jpg \ graphics/listof-illustration.jpg \ graphics/right-arrow.gif \ graphics/math-formula-precedence.jpg \ graphics/math-string-functions.jpg \ graphics/sbase-species.eps \ graphics/sbase-species.pdf \ graphics/sbase-species.vthought \ graphics/sbase.eps \ graphics/sbase.pdf \ graphics/sbase.vtt \ graphics/official-sbml-supported-40.jpg \ graphics/species-boundarycondition.jpg \ graphics/species-hasonlysubstance.jpg \ graphics/species.eps \ graphics/species.pdf \ graphics/species.vtt \ graphics/string-functions.jpg \ graphics/string-syntax.jpg \ graphics/top-level.eps \ graphics/top-level.pdf \ graphics/top-level.vtt \ graphics/unitdefinition.eps \ graphics/unitdefinition.pdf \ graphics/unitdefinition.vtt \ java-skip.txt \ libsbml-accessing.html \ libsbml-accessing.txt \ libsbml-astnode-types.html \ libsbml-authors.html \ libsbml-base-units.html \ libsbml-blurb.html \ libsbml-blurb.txt \ libsbml-coding.txt \ libsbml-comment-set-methods.html \ libsbml-communications.html \ libsbml-communications.txt \ libsbml-compartment-size-restrictions.html \ libsbml-conversion-warnings.txt \ libsbml-conversion-warnings.html \ libsbml-example.txt \ libsbml-features.html \ libsbml-features.txt \ libsbml-installation.html \ libsbml-installation.txt \ libsbml-issues.html \ libsbml-issues.txt \ libsbml-java-bottom.html \ libsbml-java-fake-overview.html \ libsbml-java-footer.html \ libsbml-java-math.html \ libsbml-java-overview.html \ libsbml-java-reading.html \ libsbml-java-top.html \ libsbml-java-verb-top.html \ libsbml-java-verb-bottom.html \ libsbml-license.txt \ libsbml-mainpage.txt \ libsbml-math-functions.html \ libsbml-math-precedence-table.html \ libsbml-math.txt \ libsbml-news.txt \ libsbml-not-sbml-warning.html \ libsbml-papers.html \ libsbml-papers.txt \ libsbml-predefined-units.html \ libsbml-python-mainpage.txt \ libsbml-python-math.txt \ libsbml-python-reading-files.txt \ libsbml-reading-files.txt \ libsbml-rule-general-summary.html \ libsbml-string-functions-table.html \ libsbml-species-boundarycondition.html \ libsbml-species-hasonlysubstance.html \ libsbml-string-functions-table.html \ libsbml-uninstallation.html \ libsbml-uninstallation.txt \ libsbml-unitkind-table.html \ pythondocfilter.py \ sbml.js \ templates/c++.txt \ templates/c.txt \ templates/m4.txt \ templates/makefile.txt \ templates/python.txt # Additional odds and ends. logo-file = graphics/official-sbml-supported-40.jpg # ----------------------------------------------------------------------------- # Primary build actions # ----------------------------------------------------------------------------- # The default rules in `makefile-common-actions.mk' know to interpret goals # of the form `foo-recursive' to run 'make foo' in directories defined in # variable `subdirs'. all docs: Makefile $(docs) # ----------------------------------------------------------------------------- # Checking. # ----------------------------------------------------------------------------- ifdef USE_LIBCHECK check: all run-checks else check: $(error "Please first rerun 'configure' with the --with-check flag") endif # ----------------------------------------------------------------------------- # API reference manuals. # ----------------------------------------------------------------------------- # # Rules for remaking the C++, C, Python and Perl manuals. # # These require configuring libSBML with --with-doxygen *and* a # sufficiently recent version of doxygen. The version check is done by # configure. # doxygen-cpp-conf = doxygen-config-cpp.txt.in doxygen-config-common.txt doxygen-c-conf = doxygen-config-c.txt.in doxygen-config-common.txt doxygen-py-conf = doxygen-config-python.txt.in doxygen-config-common.txt doxygen-perl-conf = doxygen-config-perl.txt.in doxygen-config-common.txt doxygen-config-cpp.txt: $(doxygen-cpp-conf) $(TOP_SRCDIR)/VERSION.txt cd $(TOP_BUILDDIR) && \ $(SHELL) ./config.status $(thisdir)/doxygen-config-cpp.txt doxygen-config-c.txt: $(doxygen-c-conf) $(TOP_SRCDIR)/VERSION.txt cd $(TOP_BUILDDIR) && \ $(SHELL) ./config.status $(thisdir)/doxygen-config-c.txt doxygen-config-python.txt: $(doxygen-py-conf) $(TOP_SRCDIR)/VERSION.txt cd $(TOP_BUILDDIR) && \ $(SHELL) ./config.status $(thisdir)/doxygen-config-python.txt doxygen-config-perl.txt: $(doxygen-perl-conf) $(TOP_SRCDIR)/VERSION.txt cd $(TOP_BUILDDIR) && \ $(SHELL) ./config.status $(thisdir)/doxygen-config-perl.txt core-sources = \ $(wildcard ../../src/*/*.[cpp,h]) \ $(wildcard libsbml-*.txt) \ $(wildcard libsbml-*.html) ifneq "$(USE_DOXYGEN)" "" doxygen-minor-version = $(shell $(DOXYGEN) --version | cut -f2 -d'.') # Helper function for running doxygen and doing some kludgy hacking of the # output. This will surely break in other versions of doxygen, but the # necessity comes from the fact that doxygen before 1.5.x did not provide # any control over the appearance of the left-hand side tree listing. # Doxygen 1.5.x does, but now it does other silly things that we want to # correct. define run_doxygen mkdir -p $(2) $(DOXYGEN) $(1) cp $(logo-file) $(2) cp graphics/right-arrow.gif $(2) cp sbml.js $(2) if test $(doxygen-minor-version) -lt 5; then \ cp -rf doxygen-tabs.css $(2)/tabs.css; \ head -n 9 $(2)/tree.html > tmp.html;\ cat doxygen-tree.css >> tmp.html;\ tail -n +15 $(2)/tree.html >> tmp.html;\ mv -f tmp.html $(2)/tree.html;\ else \ cp -rf doxygen-tabs.css $(2)/doxygen-tabs.css; \ sed -is 's/libSBML Python Public API //' $(2)/tree.html;\ sed -is 's/libSBML C++ Public API //' $(2)/tree.html;\ sed -is 's/libSBML C Public API //' $(2)/tree.html;\ sed -is 's/libSBML Perl Public API //' $(2)/tree.html;\ fi endef cpp-manual $(cpp-manual): doxygen-config-cpp.txt $(core-sources) $(call run_doxygen,doxygen-config-cpp.txt,$(cpp-manual)) c-manual $(c-manual): doxygen-config-c.txt $(core-sources) $(call run_doxygen,doxygen-config-c.txt,$(c-manual)) ifdef USE_PYTHON python-sources = ../../src/bindings/python/libsbml.py python-manual $(python-manual): doxygen-config-python.txt $(python-sources) $(call run_doxygen,doxygen-config-python.txt,$(python-manual)) endif ifdef USE_PERL perl-sources = ../../src/bindings/perl/LibSBML.pm perl-manual $(perl-manual): doxygen-config-perl.txt $(perl-sources) $(call run_doxygen,doxygen-config-perl.txt,$(perl-manual)) endif else # Doxygen hasn't been configured suitably. define nodoxygen Cannot make create this manual, either because libSBML was not configured using --with-doxygen, or 'doxygen' cannot be found, or the version of 'doxygen' found is too old. Please reconfigure with a suitable value for the configuration flag --with-doxygen endef docs cpp-manual c-manual perl-manual python-manual: $(error $(nodoxygen)) endif # # Rules for making the Java manual. # # This runs Javadoc on the .java files in src/bindings/java/java-files/ and # doesn't need doxygen at all. The Java bindings need to have been created # first, which should be the case for the copy of libSBML that's shipped # anyway even if the end users does not configure --with-java. Creating # the Java bindings should have run src/bindings/swig/swigdoc.py as a # by-product. Our swigdoc.py program has the task of inserting back into # the .java files the documentation comments that are currently left out by # swig itself. # ifdef USE_JAVA java-dir = ../../src/bindings/java/java-files javadoc-doctitle = "@PACKAGE_NAME@ @PACKAGE_VERSION@ Java API Reference" javadoc-header = "@PACKAGE_NAME@
@PACKAGE_VERSION@
" javadoc-footer = "`cat libsbml-java-footer.html`" javadoc-windowtitle = "LibSBML Java API" define merge_html cat libsbml-java-top.html $(1) libsbml-java-bottom.html libsbml-java-footer.html \ | sed -e 's/%%title%%/$(3)/g;s/%%version%%/@PACKAGE_VERSION@/g' > $(2) endef define merge_html_verb cat libsbml-java-top.html libsbml-java-verb-top.html $(1) \ libsbml-java-verb-bottom.html libsbml-java-bottom.html libsbml-java-footer.html \ | sed -e 's/%%title%%/$(3)/g;s/%%version%%/@PACKAGE_VERSION@/g' > $(2) endef define insert_javascript sed -i -e 's: