| @@ -2,7 +2,7 @@ | |||
| include $(top_srcdir)/build/autotools/common.am | |||
| # Put "people" at the end because they're more likely to break builds. | |||
| SUBDIRS = build src tutorial test tools games people | |||
| SUBDIRS = build src tutorial test tools games people doc | |||
| DIST_SUBDIRS = $(SUBDIRS) binaries | |||
| EXTRA_DIST = bootstrap COPYING TODO | |||
| @@ -69,6 +69,8 @@ AC_ARG_ENABLE(release, | |||
| [ --enable-release build final release of the game (default no)]) | |||
| AC_ARG_ENABLE(experimental, | |||
| [ --enable-experimental experimental build (default no)]) | |||
| AC_ARG_ENABLE(doc, | |||
| [ --enable-doc build documentation (needs doxygen and LaTeX)]) | |||
| AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h) | |||
| AC_CHECK_HEADERS(fastmath.h pthread.h libutil.h util.h pty.h glob.h) | |||
| @@ -96,6 +98,38 @@ if test "${enable_experimental}" = "yes"; then | |||
| AC_DEFINE(LOL_EXPERIMENTAL, 1, Define to 1 to activate experimental build) | |||
| fi | |||
| # Build documentation? | |||
| DOXYGEN="no" | |||
| LATEX="no" | |||
| if test "${enable_doc}" != "no"; then | |||
| AC_PATH_PROG(DOXYGEN, doxygen, no) | |||
| if test "${DOXYGEN}" != "no"; then | |||
| # Build LaTeX documentation? | |||
| AC_PATH_PROG(LATEX, pdflatex, no) | |||
| AC_PATH_PROG(KPSEWHICH, kpsewhich, no) | |||
| AC_PATH_PROG(DVIPS, dvips, no) | |||
| if test "${DVIPS}" = "no" -o "${KPSEWHICH}" = "no"; then | |||
| LATEX="no" | |||
| fi | |||
| if test "${LATEX}" != "no"; then | |||
| AC_MSG_CHECKING(for a4.sty and a4wide.sty) | |||
| if "${KPSEWHICH}" a4.sty >/dev/null 2>&1; then | |||
| if "${KPSEWHICH}" a4wide.sty >/dev/null 2>&1; then | |||
| AC_MSG_RESULT(yes) | |||
| else | |||
| LATEX="no" | |||
| AC_MSG_RESULT(no) | |||
| fi | |||
| else | |||
| LATEX="no" | |||
| AC_MSG_RESULT(no) | |||
| fi | |||
| fi | |||
| fi | |||
| fi | |||
| AM_CONDITIONAL(BUILD_DOCUMENTATION, test "${DOXYGEN}" != "no") | |||
| AM_CONDITIONAL(USE_LATEX, test "${LATEX}" != "no") | |||
| dnl No exceptions | |||
| CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti" | |||
| dnl Optimizations | |||
| @@ -395,6 +429,8 @@ AC_CONFIG_FILES( | |||
| tools/Makefile | |||
| tools/vimlol/Makefile | |||
| tools/vslol/Makefile | |||
| doc/Makefile | |||
| doc/doxygen.cfg | |||
| ]) | |||
| AC_CONFIG_FILES( | |||
| [games/monsterz/Makefile | |||
| @@ -0,0 +1,59 @@ | |||
| EXTRA_DIST = doxygen.cfg.in doxygen.css footer.html header.html \ | |||
| $(man_MANS) $(doxygen_DOX) | |||
| CLEANFILES = doxygen.log stamp-latex stamp-doxygen | |||
| doxygen_DOX = lolengine.dox | |||
| man_MANS = lolengine.1 | |||
| if BUILD_DOCUMENTATION | |||
| htmldoc_DATA = html/doxygen.css | |||
| htmldocdir = $(datadir)/doc/lolengine-dev/html | |||
| if USE_LATEX | |||
| pdfdoc_DATA = latex/lolengine.pdf | |||
| pdfdocdir = $(datadir)/doc/lolengine-dev/pdf | |||
| endif | |||
| endif | |||
| html/doxygen.css html/doxygen.png: stamp-doxygen | |||
| latex/lolengine.pdf: stamp-latex | |||
| stamp-doxygen: $(doxygen_DOX) | |||
| if BUILD_DOCUMENTATION | |||
| doxygen doxygen.cfg 2>&1 | tee doxygen.log | |||
| touch stamp-doxygen | |||
| endif | |||
| stamp-latex: stamp-doxygen | |||
| if BUILD_DOCUMENTATION | |||
| if USE_LATEX | |||
| rm -f latex/lolengine.tex latex/lolengine.pdf | |||
| mv latex/refman.tex latex/lolengine.tex | |||
| sed 's/setlength{/renewcommand{/' latex/lolengine.tex \ | |||
| | sed 's/.*usepackage.*times.*//' > latex/refman.tex | |||
| cd latex && $(MAKE) $(AM_CFLAGS) refman.pdf || (cat refman.log; exit 1) | |||
| mv latex/refman.pdf latex/lolengine.pdf | |||
| touch stamp-latex | |||
| endif | |||
| endif | |||
| clean-local: | |||
| -rm -Rf html latex man | |||
| install-data-local: | |||
| if BUILD_DOCUMENTATION | |||
| mkdir -p $(DESTDIR)$(datadir)/doc | |||
| $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/lolengine-dev/html | |||
| cp `find html -name '*.html' -o -name '*.gif' -o -name '*.png'` \ | |||
| $(DESTDIR)$(datadir)/doc/lolengine-dev/html | |||
| $(mkinstalldirs) $(DESTDIR)$(mandir)/man3 | |||
| for man in $$(find man -name '*.3lol'); do \ | |||
| sed -e 's/man3lol/man3/g' -e "s/fC'\([a-zA-Z0-9]*\)'/fC\"\1\"/g" \ | |||
| $$man >$(DESTDIR)$(mandir)/man3/$${man##*/}; \ | |||
| done | |||
| endif | |||
| $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 | |||
| uninstall-local: | |||
| rm -f $(DESTDIR)$(datadir)/doc/libcucul-dev | |||
| rmdir $(DESTDIR)$(datadir)/doc 2>/dev/null || true | |||
| @@ -0,0 +1,80 @@ | |||
| .fragment { | |||
| font-family: monospace, fixed; | |||
| font-size: 95%; | |||
| } | |||
| pre.fragment { | |||
| border: 1px solid #CCCCCC; | |||
| background-color: #f5f5f5; | |||
| margin-top: 4px; | |||
| margin-bottom: 4px; | |||
| margin-left: 2px; | |||
| margin-right: 8px; | |||
| padding-left: 6px; | |||
| padding-right: 6px; | |||
| padding-top: 4px; | |||
| padding-bottom: 4px; | |||
| } | |||
| span.keyword { color: #008000 } | |||
| span.keywordtype { color: #604020 } | |||
| span.keywordflow { color: #e08000 } | |||
| span.comment { color: #800000 } | |||
| span.preprocessor { color: #806020 } | |||
| span.stringliteral { color: #002080 } | |||
| span.charliteral { color: #008080 } | |||
| /* Style for detailed member documentation */ | |||
| .memtemplate { | |||
| font-size: 80%; | |||
| color: #606060; | |||
| font-weight: normal; | |||
| } | |||
| .memnav { | |||
| background-color: #e8eef2; | |||
| border: 1px solid #84b0c7; | |||
| text-align: center; | |||
| margin: 2px; | |||
| margin-right: 15px; | |||
| padding: 2px; | |||
| } | |||
| .memitem { | |||
| padding: 4px; | |||
| /*background-color: #eef3f5;*/ | |||
| /*border-width: 1px;*/ | |||
| /*border-style: solid;*/ | |||
| /*border-color: #dedeee;*/ | |||
| /*-moz-border-radius: 8px 8px 8px 8px;*/ | |||
| } | |||
| .memname { | |||
| white-space: nowrap; | |||
| font-weight: bold; | |||
| } | |||
| .memdoc{ | |||
| padding-left: 10px; | |||
| } | |||
| .memproto { | |||
| background-color: #d5e1e8; | |||
| width: 100%; | |||
| border-width: 1px; | |||
| border-style: solid; | |||
| border-color: #84b0c7; | |||
| font-weight: bold; | |||
| -moz-border-radius: 8px 8px 8px 8px; | |||
| } | |||
| .paramkey { | |||
| text-align: right; | |||
| } | |||
| .paramtype { | |||
| white-space: nowrap; | |||
| } | |||
| .paramname { | |||
| color: #602020; | |||
| font-style: italic; | |||
| } | |||
| /* End Styling for detailed member documentation */ | |||
| /* Remove those ugly <hr>s */ | |||
| hr { | |||
| display: none; | |||
| } | |||
| @@ -0,0 +1,2 @@ | |||
| </body> | |||
| </html> | |||
| @@ -0,0 +1,8 @@ | |||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |||
| <html> | |||
| <head> | |||
| <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | |||
| <title>lolengine documentation</title> | |||
| <link href="doxygen.css" rel="stylesheet" type="text/css"> | |||
| </head> | |||
| <body> | |||
| @@ -0,0 +1,10 @@ | |||
| .TH lolengine 1 "2012-01-01" "lolengine" | |||
| .SH NAME | |||
| lolengine\- foo bar | |||
| .SH SYNOPSIS | |||
| .B lolengine | |||
| [ | |||
| .B \--crash | |||
| .I activated by default | |||
| ] | |||
| @@ -0,0 +1,19 @@ | |||
| /** \mainpage lolengine Documentation | |||
| \section intro Introduction | |||
| \e lolengine | |||
| \e lolengine is free software, released under the Do What The Fuck You | |||
| Want To Public License. This ensures that no one, not even \e lolengine | |||
| developers, will ever have anything to say about what you do with the | |||
| software. It used to be licensed under the GNU Lesser General Public | |||
| License, but that was not free enough. | |||
| \section license License | |||
| Permission is granted to copy, distribute and/or modify this document | |||
| under the terms of the Do What The Fuck You Want To Public License, version | |||
| 2 as published by Sam Hocevar. For details see http://sam.zoy.org/wtfpl/ . | |||
| */ | |||