gravatar
ladanyi@tmit.bme.hu
ladanyi@tmit.bme.hu
Reworked documentation generation and installation. Details: - Remove configure flag used to disable the automatic generation of the documentation when istalling. - Now 'make html' generates the documentation. - Now 'make install' does not install the documentation, 'make install-html' does that. The latter two changes follow newer automake conventions. - This also fixes the bug that caused the documentation missing from the tarball.
0 2 0
default
2 files changed with 29 insertions and 63 deletions:
↑ Collapse diff ↑
Ignore white space 96 line context
1 1
dnl Process this file with autoconf to produce a configure script.
2 2

	
3 3
dnl Version information.
4 4
m4_define([lemon_version_major], [0])
5 5
m4_define([lemon_version_minor], [99])
6 6
m4_define([lemon_version_micro], [])
7 7
m4_define([lemon_version_nano], [])
8 8
m4_define([lemon_version_tag], [hg])
9 9
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))])
10 10
m4_define([lemon_version], [lemon_version_major().lemon_version_minor()ifelse(lemon_version_micro(), [], [], [.lemon_version_micro()])ifelse(lemon_version_nano(), [], [], [.lemon_version_nano()])ifelse(lemon_version_tag(), [], [], lemon_version_tag(), [hg], [[_]lemon_version_tag()[_]lemon_hg_revision()], [[_]lemon_version_tag()])])
11 11

	
12 12
AC_PREREQ([2.59])
13 13
AC_INIT([LEMON], [lemon_version()], [etik-ol@cs.elte.hu], [lemon])
14 14
AC_CONFIG_AUX_DIR([build-aux])
15 15
AC_CONFIG_MACRO_DIR([m4])
16 16
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
17 17
AC_CONFIG_SRCDIR([lemon/list_graph.h])
18 18
AC_CONFIG_HEADERS([config.h lemon/config.h])
19 19

	
20 20
lx_cmdline_cxxflags_set=${CXXFLAGS+set}
21 21

	
22 22
dnl Checks for programs.
23 23
AC_PROG_CXX
24 24
AC_PROG_CXXCPP
25 25
AC_PROG_INSTALL
26 26
AC_DISABLE_SHARED
27 27
AC_PROG_LIBTOOL
28 28

	
29
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
30

	
29 31
if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
30 32
  CXXFLAGS="$CXXFLAGS -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 -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
31 33
fi
32 34

	
33
AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
34

	
35 35
dnl Checks for libraries.
36 36
LX_CHECK_GLPK
37 37
LX_CHECK_CPLEX
38 38
LX_CHECK_SOPLEX
39 39

	
40
dnl Enable/disable installing the documentation
41
AC_ARG_ENABLE([doc],
42
AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
43
AS_HELP_STRING([--disable-doc], [do not build the documentation]),
44
              [], [enable_doc=yes])
45

	
46
AC_MSG_CHECKING([whether to build the documention])
47
case "$enable_doc" in
48
  yes)
49
    DOXYGEN_INTERNAL_DOCS=NO
50
    AC_MSG_RESULT([yes])
51
    ;;
52
  full)
53
    DOXYGEN_INTERNAL_DOCS=YES
54
    AC_MSG_RESULT([full])
55
    ;;
56
  no)
57
    DOXYGEN_INTERNAL_DOCS=NO
58
    AC_MSG_RESULT([no])
59
    ;;
60
  *)
61
    AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
62
    ;;
63
esac
64
AC_SUBST(DOXYGEN_INTERNAL_DOCS)
65
AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
66

	
67 40
dnl Disable/enable building the demo programs
68 41
AC_ARG_ENABLE([demo],
69 42
AS_HELP_STRING([--enable-demo], [build the demo programs])
70 43
AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
71 44
              [], [enable_demo=no])
72 45
AC_MSG_CHECKING([whether to build the demo programs])
73 46
if test x"$enable_demo" != x"no"; then
74 47
  AC_MSG_RESULT([yes])
75 48
else
76 49
  AC_MSG_RESULT([no])
77 50
fi
78 51
AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
79 52

	
80 53
dnl Disable/enable building the binary tools
81 54
AC_ARG_ENABLE([tools],
82 55
AS_HELP_STRING([--enable-tools], [build additional tools @<:@default@:>@])
83 56
AS_HELP_STRING([--disable-tools], [do not build additional tools]),
84 57
              [], [enable_tools=yes])
85 58
AC_MSG_CHECKING([whether to build the additional tools])
86 59
if test x"$enable_tools" != x"no"; then
87 60
  AC_MSG_RESULT([yes])
88 61
else
89 62
  AC_MSG_RESULT([no])
90 63
fi
91 64
AM_CONDITIONAL([WANT_TOOLS], [test x"$enable_tools" != x"no"])
92 65

	
93 66
dnl Disable/enable building the benchmarks
94 67
AC_ARG_ENABLE([benchmark],
95 68
AS_HELP_STRING([--enable-benchmark], [build the benchmarks])
96 69
AS_HELP_STRING([--disable-benchmark], [do not build the benchmarks @<:@default@:>@]),
97 70
              [], [enable_benchmark=no])
98 71
AC_MSG_CHECKING([whether to build the benchmarks])
99 72
if test x"$enable_benchmark" != x"no"; then
100 73
  AC_MSG_RESULT([yes])
101 74
else
102 75
  AC_MSG_RESULT([no])
103 76
fi
104 77
AM_CONDITIONAL([WANT_BENCHMARK], [test x"$enable_benchmark" != x"no"])
105 78

	
106 79
dnl Checks for header files.
107 80
AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
108 81

	
109 82
dnl Checks for typedefs, structures, and compiler characteristics.
110 83
AC_C_CONST
111 84
AC_C_INLINE
112 85
AC_TYPE_SIZE_T
113 86
AC_HEADER_TIME
114 87
AC_STRUCT_TM
115 88

	
116 89
dnl Checks for library functions.
117 90
AC_HEADER_STDC
118 91
AC_CHECK_FUNCS(gettimeofday times ctime_r)
119 92

	
120 93
AC_CONFIG_FILES([
121 94
Makefile
122 95
doc/Doxyfile
123 96
lemon/lemon.pc
124 97
])
125 98

	
126 99
AC_OUTPUT
127 100

	
128 101
echo
129 102
echo '****************************** SUMMARY ******************************'
130 103
echo
131 104
echo Package version............... : $PACKAGE-$VERSION
132 105
echo
133 106
echo C++ compiler.................. : $CXX
134 107
echo C++ compiles flags............ : $CXXFLAGS
135 108
echo
136 109
echo GLPK support.................. : $lx_glpk_found
137 110
echo CPLEX support................. : $lx_cplex_found
138 111
echo SOPLEX support................ : $lx_soplex_found
139 112
echo
140 113
echo Build benchmarks.............. : $enable_benchmark
141 114
echo Build demo programs........... : $enable_demo
142 115
echo Build additional tools........ : $enable_tools
143 116
echo
144 117
echo The packace will be installed in
145 118
echo -n '  '
146 119
echo $prefix.
147 120
echo
148
echo The documentation will be installed in
149
echo -n '  '
150
eval echo ${datadir}/doc/$PACKAGE.
151
echo
152 121
echo '*********************************************************************'
153 122

	
154 123
echo
155 124
echo Configure complete, now type \'make\' and then \'make install\'.
156 125
echo
Ignore white space 96 line context
1
htmldir = $(datadir)/doc/$(PACKAGE)/html
2

	
3 1
EXTRA_DIST += \
4 2
	doc/Makefile \
5
	doc/Doxyfile.in
3
	doc/Doxyfile.in \
4
	doc/coding_style.dox \
5
	doc/dirs.dox \
6
	doc/groups.dox \
7
	doc/license.dox \
8
	doc/mainpage.dox \
9
	doc/namespaces.dox \
10
	doc/html
6 11

	
7
doc:
12
doc/html:
13
	$(MAKE) $(AM_MAKEFLAGS) html
14

	
15
html-local:
8 16
	if test ${doxygen_found} = yes; then \
9 17
	  cd doc; \
10 18
	  doxygen Doxyfile; \
11 19
	  cd ..; \
12
	fi
13

	
14
doc-clean:
15
	if test ${doxygen_found} = yes; then \
16
	  rm -rf doc/html; \
17
	  rm -f doc/doxygen.log; \
18
	  cd doc; \
19
	  doxygen Doxyfile; \
20
	  cd ..; \
20
	else \
21
	  echo; \
22
	  echo "Doxygen not found."; \
23
	  echo; \
24
	  exit 1; \
21 25
	fi
22 26

	
23 27
clean-local:
24 28
	-rm -rf doc/html
25 29
	-rm -f doc/doxygen.log
26 30

	
27
doc/html:
28
	$(MAKE) $(AM_MAKEFLAGS) doc-clean
29

	
30 31
update-external-tags:
31 32
	wget -O doc/libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag && \
32 33
	mv doc/libstdc++.tag.tmp doc/libstdc++.tag || \
33 34
	rm doc/libstdc++.tag.tmp
34 35

	
35
if WANT_DOC
36

	
37
install-data-local: doc/html
36
install-html-local: doc/html
38 37
	@$(NORMAL_INSTALL)
39
	$(mkinstalldirs) $(DESTDIR)$(htmldir)
40
	@dir='doc/html'; shopt -s nullglob; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.gif $$dir/*.dot $$dir/*.php $$dir/*.idx $$dir/*.tag ; do \
38
	$(mkinstalldirs) $(DESTDIR)$(htmldir)/docs
39
	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
41 40
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
42
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/$$f"; \
43
	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/$$f; \
41
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f"; \
42
	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f; \
44 43
	done
45 44

	
46
uninstall-local: doc/html
45
uninstall-local:
47 46
	@$(NORMAL_UNINSTALL)
48
	@dir='doc/html'; shopt -s nullglob; for p in $$dir/*.html $$dir/*.css $$dir/*.png $$dir/*.gif $$dir/*.dot $$dir/*.php $$dir/*.idx $$dir/*.tag ; do \
47
	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
49 48
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
50
	  echo " rm -f $(DESTDIR)$(htmldir)/$$f"; \
51
	  rm -f $(DESTDIR)$(htmldir)/$$f; \
49
	  echo " rm -f $(DESTDIR)$(htmldir)/docs/$$f"; \
50
	  rm -f $(DESTDIR)$(htmldir)/docs/$$f; \
52 51
	done
53 52

	
54
endif WANT_DOC
55

	
56
.PHONY: doc doc-clean
53
.PHONY: update-external-tags
0 comments (0 inline)