Reworked documentation generation and installation.
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Wed, 23 Jan 2008 16:26:41 +0100
changeset 606ec5dbed8f18
parent 59 4ab73d92f0fb
child 61 d718974f1290
child 62 4790635473ef
child 96 b55e501a90ee
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.
configure.ac
doc/Makefile.am
     1.1 --- a/configure.ac	Tue Jan 22 10:59:14 2008 +0000
     1.2 +++ b/configure.ac	Wed Jan 23 16:26:41 2008 +0100
     1.3 @@ -26,44 +26,17 @@
     1.4  AC_DISABLE_SHARED
     1.5  AC_PROG_LIBTOOL
     1.6  
     1.7 +AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
     1.8 +
     1.9  if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
    1.10    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"
    1.11  fi
    1.12  
    1.13 -AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
    1.14 -
    1.15  dnl Checks for libraries.
    1.16  LX_CHECK_GLPK
    1.17  LX_CHECK_CPLEX
    1.18  LX_CHECK_SOPLEX
    1.19  
    1.20 -dnl Enable/disable installing the documentation
    1.21 -AC_ARG_ENABLE([doc],
    1.22 -AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
    1.23 -AS_HELP_STRING([--disable-doc], [do not build the documentation]),
    1.24 -              [], [enable_doc=yes])
    1.25 -
    1.26 -AC_MSG_CHECKING([whether to build the documention])
    1.27 -case "$enable_doc" in
    1.28 -  yes)
    1.29 -    DOXYGEN_INTERNAL_DOCS=NO
    1.30 -    AC_MSG_RESULT([yes])
    1.31 -    ;;
    1.32 -  full)
    1.33 -    DOXYGEN_INTERNAL_DOCS=YES
    1.34 -    AC_MSG_RESULT([full])
    1.35 -    ;;
    1.36 -  no)
    1.37 -    DOXYGEN_INTERNAL_DOCS=NO
    1.38 -    AC_MSG_RESULT([no])
    1.39 -    ;;
    1.40 -  *)
    1.41 -    AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
    1.42 -    ;;
    1.43 -esac
    1.44 -AC_SUBST(DOXYGEN_INTERNAL_DOCS)
    1.45 -AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
    1.46 -
    1.47  dnl Disable/enable building the demo programs
    1.48  AC_ARG_ENABLE([demo],
    1.49  AS_HELP_STRING([--enable-demo], [build the demo programs])
    1.50 @@ -145,10 +118,6 @@
    1.51  echo -n '  '
    1.52  echo $prefix.
    1.53  echo
    1.54 -echo The documentation will be installed in
    1.55 -echo -n '  '
    1.56 -eval echo ${datadir}/doc/$PACKAGE.
    1.57 -echo
    1.58  echo '*********************************************************************'
    1.59  
    1.60  echo
     2.1 --- a/doc/Makefile.am	Tue Jan 22 10:59:14 2008 +0000
     2.2 +++ b/doc/Makefile.am	Wed Jan 23 16:26:41 2008 +0100
     2.3 @@ -1,56 +1,53 @@
     2.4 -htmldir = $(datadir)/doc/$(PACKAGE)/html
     2.5 -
     2.6  EXTRA_DIST += \
     2.7  	doc/Makefile \
     2.8 -	doc/Doxyfile.in
     2.9 +	doc/Doxyfile.in \
    2.10 +	doc/coding_style.dox \
    2.11 +	doc/dirs.dox \
    2.12 +	doc/groups.dox \
    2.13 +	doc/license.dox \
    2.14 +	doc/mainpage.dox \
    2.15 +	doc/namespaces.dox \
    2.16 +	doc/html
    2.17  
    2.18 -doc:
    2.19 +doc/html:
    2.20 +	$(MAKE) $(AM_MAKEFLAGS) html
    2.21 +
    2.22 +html-local:
    2.23  	if test ${doxygen_found} = yes; then \
    2.24  	  cd doc; \
    2.25  	  doxygen Doxyfile; \
    2.26  	  cd ..; \
    2.27 -	fi
    2.28 -
    2.29 -doc-clean:
    2.30 -	if test ${doxygen_found} = yes; then \
    2.31 -	  rm -rf doc/html; \
    2.32 -	  rm -f doc/doxygen.log; \
    2.33 -	  cd doc; \
    2.34 -	  doxygen Doxyfile; \
    2.35 -	  cd ..; \
    2.36 +	else \
    2.37 +	  echo; \
    2.38 +	  echo "Doxygen not found."; \
    2.39 +	  echo; \
    2.40 +	  exit 1; \
    2.41  	fi
    2.42  
    2.43  clean-local:
    2.44  	-rm -rf doc/html
    2.45  	-rm -f doc/doxygen.log
    2.46  
    2.47 -doc/html:
    2.48 -	$(MAKE) $(AM_MAKEFLAGS) doc-clean
    2.49 -
    2.50  update-external-tags:
    2.51  	wget -O doc/libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag && \
    2.52  	mv doc/libstdc++.tag.tmp doc/libstdc++.tag || \
    2.53  	rm doc/libstdc++.tag.tmp
    2.54  
    2.55 -if WANT_DOC
    2.56 -
    2.57 -install-data-local: doc/html
    2.58 +install-html-local: doc/html
    2.59  	@$(NORMAL_INSTALL)
    2.60 -	$(mkinstalldirs) $(DESTDIR)$(htmldir)
    2.61 -	@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 \
    2.62 +	$(mkinstalldirs) $(DESTDIR)$(htmldir)/docs
    2.63 +	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
    2.64  	  f="`echo $$p | sed -e 's|^.*/||'`"; \
    2.65 -	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/$$f"; \
    2.66 -	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/$$f; \
    2.67 +	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f"; \
    2.68 +	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/docs/$$f; \
    2.69  	done
    2.70  
    2.71 -uninstall-local: doc/html
    2.72 +uninstall-local:
    2.73  	@$(NORMAL_UNINSTALL)
    2.74 -	@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 \
    2.75 +	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
    2.76  	  f="`echo $$p | sed -e 's|^.*/||'`"; \
    2.77 -	  echo " rm -f $(DESTDIR)$(htmldir)/$$f"; \
    2.78 -	  rm -f $(DESTDIR)$(htmldir)/$$f; \
    2.79 +	  echo " rm -f $(DESTDIR)$(htmldir)/docs/$$f"; \
    2.80 +	  rm -f $(DESTDIR)$(htmldir)/docs/$$f; \
    2.81  	done
    2.82  
    2.83 -endif WANT_DOC
    2.84 -
    2.85 -.PHONY: doc doc-clean
    2.86 +.PHONY: update-external-tags