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
... ...
@@ -14,48 +14,50 @@
14 14
    OUTPUT_VARIABLE HG_REVISION
15 15
    ERROR_QUIET
16 16
    OUTPUT_STRIP_TRAILING_WHITESPACE
17 17
  )
18 18
  IF(HG_REVISION STREQUAL "")
19 19
    SET(HG_REVISION "hg-tip")
20 20
  ENDIF()
21 21
  SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
22 22
ENDIF()
23 23

	
24 24
SET(PROJECT_VERSION ${LEMON_VERSION})
25 25

	
26 26
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
27 27

	
28 28
FIND_PACKAGE(Doxygen)
29 29
FIND_PACKAGE(Ghostscript)
30 30
FIND_PACKAGE(GLPK 4.33)
31 31
FIND_PACKAGE(CPLEX)
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)
44 46
  ADD_SUBDIRECTORY(doc)
45 47
  ADD_SUBDIRECTORY(test)
46 48
ENDIF()
47 49

	
48 50
CONFIGURE_FILE(
49 51
  ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
50 52
  ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
51 53
  @ONLY
52 54
)
53 55
IF(UNIX)
54 56
  INSTALL(
55 57
    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
56 58
    DESTINATION share/lemon/cmake
57 59
  )
58 60
ELSEIF(WIN32)
59 61
  INSTALL(
60 62
    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
61 63
    DESTINATION cmake
Ignore white space 6 line context
... ...
@@ -20,48 +20,49 @@
20 20
AC_CONFIG_MACRO_DIR([m4])
21 21
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc])
22 22
AC_CONFIG_SRCDIR([lemon/list_graph.h])
23 23
AC_CONFIG_HEADERS([config.h lemon/config.h])
24 24

	
25 25
AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string])
26 26

	
27 27
dnl Do compilation tests using the C++ compiler.
28 28
AC_LANG([C++])
29 29

	
30 30
dnl Check the existence of long long type.
31 31
AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
32 32
if test x"$long_long_found" = x"yes"; then
33 33
  AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
34 34
fi
35 35

	
36 36
dnl Checks for programs.
37 37
AC_PROG_CXX
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
50 51
#endif], [ICC=[yes]], [ICC=[no]])
51 52
if test x"$ICC" = x"yes"; then
52 53
  AC_MSG_RESULT([yes])
53 54
else
54 55
  AC_MSG_RESULT([no])
55 56
fi
56 57

	
57 58
dnl Set custom compiler flags when using g++.
58 59
if test "$GXX" = yes -a "$ICC" = no; then
59 60
  WARNINGCXXFLAGS="-Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
60 61
fi
61 62
AC_SUBST([WARNINGCXXFLAGS])
62 63

	
63 64
dnl Checks for libraries.
64 65
LX_CHECK_GLPK
65 66
LX_CHECK_CPLEX
66 67
LX_CHECK_SOPLEX
67 68
LX_CHECK_COIN
Ignore white space 6 line context
1 1
SET(PACKAGE_NAME ${PROJECT_NAME})
2 2
SET(PACKAGE_VERSION ${PROJECT_VERSION})
3 3
SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
4 4
SET(abs_top_builddir ${PROJECT_BINARY_DIR})
5 5

	
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
19 19
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/bipartite_partitions.png ${CMAKE_CURRENT_SOURCE_DIR}/images/bipartite_partitions.eps
20 20
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/connected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/connected_components.eps
21 21
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/edge_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/edge_biconnected_components.eps
22 22
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/grid_graph.png ${CMAKE_CURRENT_SOURCE_DIR}/images/grid_graph.eps
23 23
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/node_biconnected_components.png ${CMAKE_CURRENT_SOURCE_DIR}/images/node_biconnected_components.eps
24 24
    COMMAND ${GHOSTSCRIPT_EXECUTABLE} ${GHOSTSCRIPT_OPTIONS} -r18 -sOutputFile=gen-images/nodeshape_0.png ${CMAKE_CURRENT_SOURCE_DIR}/images/nodeshape_0.eps
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

	
37 38
  IF(UNIX)
38 39
    INSTALL(
39 40
      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
40 41
      DESTINATION share/doc/lemon/html
41 42
      COMPONENT html_documentation
42 43
    )
43 44
  ELSEIF(WIN32)
44 45
    INSTALL(
45 46
      DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
46 47
      DESTINATION doc
47 48
      COMPONENT html_documentation
48 49
    )
49 50
  ENDIF()
50 51

	
51 52
ENDIF()
Ignore white space 6 line context
... ...
@@ -70,49 +70,50 @@
70 70
SHOW_DIRECTORIES       = YES
71 71
SHOW_FILES             = YES
72 72
SHOW_NAMESPACES        = YES
73 73
FILE_VERSION_FILTER    = 
74 74
LAYOUT_FILE            = DoxygenLayout.xml
75 75
#---------------------------------------------------------------------------
76 76
# configuration options related to warning and progress messages
77 77
#---------------------------------------------------------------------------
78 78
QUIET                  = NO
79 79
WARNINGS               = YES
80 80
WARN_IF_UNDOCUMENTED   = YES
81 81
WARN_IF_DOC_ERROR      = YES
82 82
WARN_NO_PARAMDOC       = NO
83 83
WARN_FORMAT            = "$file:$line: $text"
84 84
WARN_LOGFILE           = doxygen.log
85 85
#---------------------------------------------------------------------------
86 86
# configuration options related to the input files
87 87
#---------------------------------------------------------------------------
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                = 
101 102
EXCLUDE_SYMLINKS       = NO
102 103
EXCLUDE_PATTERNS       = 
103 104
EXCLUDE_SYMBOLS        = 
104 105
EXAMPLE_PATH           = "@abs_top_srcdir@/demo" \
105 106
                         "@abs_top_srcdir@/LICENSE" \
106 107
                         "@abs_top_srcdir@/doc"
107 108
EXAMPLE_PATTERNS       = 
108 109
EXAMPLE_RECURSIVE      = NO
109 110
IMAGE_PATH             = "@abs_top_srcdir@/doc/images" \
110 111
                         "@abs_top_builddir@/doc/gen-images"
111 112
INPUT_FILTER           = 
112 113
FILTER_PATTERNS        = 
113 114
FILTER_SOURCE_FILES    = NO
114 115
#---------------------------------------------------------------------------
115 116
# configuration options related to source browsing
116 117
#---------------------------------------------------------------------------
117 118
SOURCE_BROWSER         = NO
118 119
INLINE_SOURCES         = NO
Ignore white space 48 line context
... ...
@@ -45,49 +45,61 @@
45 45
GS_COMMAND=gs -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4
46 46

	
47 47
$(DOC_EPS_IMAGES18:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps
48 48
	-mkdir doc/gen-images
49 49
	if test ${gs_found} = yes; then \
50 50
	  $(GS_COMMAND) -sDEVICE=pngalpha -r18 -sOutputFile=$@ $<; \
51 51
	else \
52 52
	  echo; \
53 53
	  echo "Ghostscript not found."; \
54 54
	  echo; \
55 55
	  exit 1; \
56 56
	fi
57 57

	
58 58
$(DOC_EPS_IMAGES27:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps
59 59
	-mkdir doc/gen-images
60 60
	if test ${gs_found} = yes; then \
61 61
	  $(GS_COMMAND) -sDEVICE=pngalpha -r27 -sOutputFile=$@ $<; \
62 62
	else \
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; \
76 88
	  echo "Doxygen not found."; \
77 89
	  echo; \
78 90
	  exit 1; \
79 91
	fi
80 92

	
81 93
clean-local:
82 94
	-rm -rf doc/html
83 95
	-rm -f doc/doxygen.log
84 96
	-rm -f $(DOC_PNG_IMAGES)
85 97
	-rm -rf doc/gen-images
86 98

	
87 99
update-external-tags:
88 100
	wget -O doc/libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag && \
89 101
	mv doc/libstdc++.tag.tmp doc/libstdc++.tag || \
90 102
	rm doc/libstdc++.tag.tmp
91 103

	
92 104
install-html-local: doc/html
93 105
	@$(NORMAL_INSTALL)
0 comments (0 inline)