gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Integrate bib2dox.py into the build environments (#184)
0 5 0
default
5 files changed with 20 insertions and 3 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -32,12 +32,14 @@
32 32
FIND_PACKAGE(COIN)
33 33

	
34 34
INCLUDE(CheckTypeSize)
35 35
CHECK_TYPE_SIZE("long long" LONG_LONG)
36 36
SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
37 37

	
38
INCLUDE(FindPythonInterp)
39

	
38 40
ENABLE_TESTING()
39 41

	
40 42
ADD_SUBDIRECTORY(lemon)
41 43
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
42 44
  ADD_SUBDIRECTORY(demo)
43 45
  ADD_SUBDIRECTORY(tools)
Ignore white space 6 line context
... ...
@@ -38,12 +38,13 @@
38 38
AC_PROG_CXXCPP
39 39
AC_PROG_INSTALL
40 40
AC_DISABLE_SHARED
41 41
AC_PROG_LIBTOOL
42 42

	
43 43
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
44
AC_CHECK_PROG([python_found],[python],[yes],[no])
44 45
AC_CHECK_PROG([gs_found],[gs],[yes],[no])
45 46

	
46 47
dnl Detect Intel compiler.
47 48
AC_MSG_CHECKING([whether we are using the Intel C++ compiler])
48 49
AC_COMPILE_IFELSE([#ifndef __INTEL_COMPILER
49 50
choke me
Ignore white space 6 line context
... ...
@@ -6,13 +6,13 @@
6 6
CONFIGURE_FILE(
7 7
  ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
8 8
  ${PROJECT_BINARY_DIR}/doc/Doxyfile
9 9
  @ONLY
10 10
)
11 11

	
12
IF(DOXYGEN_EXECUTABLE AND GHOSTSCRIPT_EXECUTABLE)
12
IF(DOXYGEN_EXECUTABLE AND PYTHONINTERP_FOUND AND GHOSTSCRIPT_EXECUTABLE)
13 13
  FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/)
14 14
  SET(GHOSTSCRIPT_OPTIONS -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha)
15 15
  ADD_CUSTOM_TARGET(html
16 16
    COMMAND ${CMAKE_COMMAND} -E remove_directory gen-images
17 17
    COMMAND ${CMAKE_COMMAND} -E make_directory gen-images
18 18
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_matching.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_matching.eps
... ...
@@ -25,12 +25,13 @@
25 25
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_1.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_1.eps
26 26
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_2.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_2.eps
27 27
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_3.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_3.eps
28 28
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_4.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_4.eps
29 29
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/strongly_connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/strongly_connected_components.eps
30 30
    COMMAND ${CMAKE_COMMAND} -E remove_directory html
31
    COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/bib2dox.py ${CMAKE_CURRENT_SOURCE_DIR}/references.bib >references.dox
31 32
    COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
32 33
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
33 34
  )
34 35

	
35 36
  SET_TARGET_PROPERTIES(html PROPERTIES PROJECT_LABEL BUILD_DOC)
36 37

	
Ignore white space 12 line context
... ...
@@ -88,13 +88,14 @@
88 88
INPUT                  = "@abs_top_srcdir@/doc" \
89 89
                         "@abs_top_srcdir@/lemon" \
90 90
                         "@abs_top_srcdir@/lemon/bits" \
91 91
                         "@abs_top_srcdir@/lemon/concepts" \
92 92
                         "@abs_top_srcdir@/demo" \
93 93
                         "@abs_top_srcdir@/tools" \
94
                         "@abs_top_srcdir@/test/test_tools.h"
94
                         "@abs_top_srcdir@/test/test_tools.h" \
95
                         "@abs_top_builddir@/doc/references.dox"
95 96
INPUT_ENCODING         = UTF-8
96 97
FILE_PATTERNS          = *.h \
97 98
                         *.cc \
98 99
                         *.dox
99 100
RECURSIVE              = NO
100 101
EXCLUDE                = 
Ignore white space 6 line context
... ...
@@ -63,13 +63,25 @@
63 63
	  echo; \
64 64
	  echo "Ghostscript not found."; \
65 65
	  echo; \
66 66
	  exit 1; \
67 67
	fi
68 68

	
69
html-local: $(DOC_PNG_IMAGES)
69
references.dox: doc/references.bib
70
	if test ${python_found} = yes; then \
71
	  cd doc; \
72
	  python @abs_top_srcdir@/scripts/bib2dox.py @abs_top_builddir@/$< >$@; \
73
	  cd ..; \
74
	else \
75
	  echo; \
76
	  echo "Python not found."; \
77
	  echo; \
78
	  exit 1; \
79
	fi
80

	
81
html-local: $(DOC_PNG_IMAGES) references.dox
70 82
	if test ${doxygen_found} = yes; then \
71 83
	  cd doc; \
72 84
	  doxygen Doxyfile; \
73 85
	  cd ..; \
74 86
	else \
75 87
	  echo; \
0 comments (0 inline)