Integrate bib2dox.py into the build environments (#184)
authorAlpar Juttner <alpar@cs.elte.hu>
Sat, 26 Sep 2009 10:15:49 +0200
changeset 791f8c468367dab
parent 790 94ef0a5c0005
child 792 68792fb2870f
Integrate bib2dox.py into the build environments (#184)
CMakeLists.txt
configure.ac
doc/CMakeLists.txt
doc/Doxyfile.in
doc/Makefile.am
     1.1 --- a/CMakeLists.txt	Sat Sep 26 10:15:49 2009 +0200
     1.2 +++ b/CMakeLists.txt	Sat Sep 26 10:15:49 2009 +0200
     1.3 @@ -35,6 +35,8 @@
     1.4  CHECK_TYPE_SIZE("long long" LONG_LONG)
     1.5  SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
     1.6  
     1.7 +INCLUDE(FindPythonInterp)
     1.8 +
     1.9  ENABLE_TESTING()
    1.10  
    1.11  ADD_SUBDIRECTORY(lemon)
     2.1 --- a/configure.ac	Sat Sep 26 10:15:49 2009 +0200
     2.2 +++ b/configure.ac	Sat Sep 26 10:15:49 2009 +0200
     2.3 @@ -41,6 +41,7 @@
     2.4  AC_PROG_LIBTOOL
     2.5  
     2.6  AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
     2.7 +AC_CHECK_PROG([python_found],[python],[yes],[no])
     2.8  AC_CHECK_PROG([gs_found],[gs],[yes],[no])
     2.9  
    2.10  dnl Detect Intel compiler.
     3.1 --- a/doc/CMakeLists.txt	Sat Sep 26 10:15:49 2009 +0200
     3.2 +++ b/doc/CMakeLists.txt	Sat Sep 26 10:15:49 2009 +0200
     3.3 @@ -9,7 +9,7 @@
     3.4    @ONLY
     3.5  )
     3.6  
     3.7 -IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
     3.8 +IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE)
     3.9    FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
    3.10    SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha)
    3.11    ADD_CUSTOM_TARGET(html
    3.12 @@ -28,6 +28,7 @@
    3.13      COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
    3.14      COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
    3.15      COMMAND ${CMAKE_COMMAND} -E remove_directory html
    3.16 +    COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/bib2dox.py ${CMAKE_CURRENT_SOURCE_DIR}/references.bib >references.dox
    3.17      COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
    3.18      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    3.19    )
     4.1 --- a/doc/Doxyfile.in	Sat Sep 26 10:15:49 2009 +0200
     4.2 +++ b/doc/Doxyfile.in	Sat Sep 26 10:15:49 2009 +0200
     4.3 @@ -91,7 +91,8 @@
     4.4                           "@abs_top_srcdir@/lemon/concepts" \
     4.5                           "@abs_top_srcdir@/demo" \
     4.6                           "@abs_top_srcdir@/tools" \
     4.7 -                         "@abs_top_srcdir@/test/test_tools.h"
     4.8 +                         "@abs_top_srcdir@/test/test_tools.h" \
     4.9 +                         "@abs_top_builddir@/doc/references.dox"
    4.10  INPUT_ENCODING         = UTF-8
    4.11  FILE_PATTERNS          = *.h \
    4.12                           *.cc \
     5.1 --- a/doc/Makefile.am	Sat Sep 26 10:15:49 2009 +0200
     5.2 +++ b/doc/Makefile.am	Sat Sep 26 10:15:49 2009 +0200
     5.3 @@ -66,7 +66,19 @@
     5.4  	  exit 1; \
     5.5  	fi
     5.6  
     5.7 -html-local: $(DOC_PNG_IMAGES)
     5.8 +references.dox: doc/references.bib
     5.9 +	if test ${python_found} = yes; then \
    5.10 +	  cd doc; \
    5.11 +	  python @abs_top_srcdir@/scripts/bib2dox.py @abs_top_builddir@/$< >$@; \
    5.12 +	  cd ..; \
    5.13 +	else \
    5.14 +	  echo; \
    5.15 +	  echo "Python not found."; \
    5.16 +	  echo; \
    5.17 +	  exit 1; \
    5.18 +	fi
    5.19 +
    5.20 +html-local: $(DOC_PNG_IMAGES) references.dox
    5.21  	if test ${doxygen_found} = yes; then \
    5.22  	  cd doc; \
    5.23  	  doxygen Doxyfile; \