Changeset 1905 for trunk/doc


Ignore:
Timestamp:
Apr 17, 2009, 6:46:43 PM (12 years ago)
Author:
Peter
Message:

Revised make dependencies for generating doxygen docs (fixes #438 and #501).

In doxygen.config removed variables INPUT and FILE_PATTERN to avoid us
from editing these values. The variables ignored in the new setup.

doc/Makefile includes a 'doxygen.mk' located in each of the
directories with header files. This is similar to how Maefiles include
files from '.deps/' to get dependencies for source and header
files. The inclusion relies on an undocumented feature in Automake,
but it should likely not be a problem with future versions of Automake
as it has been frequently been mentioned as a solution on the automake
mailing list.

These 'doxygen.mk' are generated during 'make all' in each of these
directories; they are also updated during 'make {doc|html|dvi|ps|pdf}'
in topdir and topdir/yat. This latter is to avoid situations in which
doc/Makefile is corrupted because of missing include.

This implies that obscure things like
make clean && cd doc && make doc
will fail noisily.

One could let doc/Makefile go into yat/subdirs and create the
doxygen.mk files but I don't like that kind of setup.

Another thought might be to have doxygen.mk removed during 'make
distclean' rather than 'make clean'. Thoughts are welcome.

Location:
trunk/doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/Makefile.am

    r1797 r1905  
    2626
    2727
     28@am__include@ @am__quote@./$(top_builddir)/yat/classifier/doxygen.mk@am__quote@
     29@am__include@ @am__quote@./$(top_builddir)/yat/normalizer/doxygen.mk@am__quote@
     30@am__include@ @am__quote@./$(top_builddir)/yat/random/doxygen.mk@am__quote@
     31@am__include@ @am__quote@./$(top_builddir)/yat/regression/doxygen.mk@am__quote@
     32@am__include@ @am__quote@./$(top_builddir)/yat/statistics/doxygen.mk@am__quote@
     33@am__include@ @am__quote@./$(top_builddir)/yat/utility/doxygen.mk@am__quote@
     34
     35DOXYGEN_INPUT=$(classifier_doxygen_input) \
     36$(normalizer_doxygen_input) \
     37$(random_doxygen_input) \
     38$(regression_doxygen_input) \
     39$(statistics_doxygen_input) \
     40$(utility_doxygen_input) \
     41$(srcdir)/build_tool.doxygen \
     42$(builddir)/first_page.doxygen \
     43$(srcdir)/namespaces.doxygen \
     44$(srcdir)/concepts.doxygen \
     45$(srcdir)/Statistics.doxygen
     46
     47DOXYGEN_DEPS = $(DOXYGEN_INPUT) doxygen.config \
     48$(top_builddir)/yat/classifier/doxygen.mk \
     49$(top_builddir)/yat/normalizer/doxygen.mk \
     50$(top_builddir)/yat/random/doxygen.mk \
     51$(top_builddir)/yat/regression/doxygen.mk \
     52$(top_builddir)/yat/statistics/doxygen.mk \
     53$(top_builddir)/yat/utility/doxygen.mk
     54
    2855doc: html dvi ps pdf
    29 
    30 stamp-doxygen: doxygen.config Makefile first_page.doxygen
    31   @$(MAKE) $(AM_MAKEFLAGS) update-stamp-doxygen
    32 
    33 update-stamp-doxygen: FORCE
    34   @input=`$(SED) -n 's/^[ \t]*INPUT[ \t]*=[ \t]*//p' doxygen.config`;\
    35   pattern=`$(SED) -n 's/^[ \t]*FILE_PATTERNS[ \t]*=[ \t]*//p' \
    36   doxygen.config`;\
    37   if (test -z "$$pattern"); then \
    38     pattern="*.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp *.h++ *.idl";\
    39   fi;\
    40   for i in $$input; do \
    41     if (test -d $$i); then \
    42       for p in $$pattern; do \
    43         input2="$$input2 `find $$i -name \"$$p\"|xargs`";\
    44       done; \
    45     else \
    46       input2="$$input2 $$i"; \
    47     fi; \
    48   done; \
    49   for i in $$input2; do \
    50     if (test $$i -nt stamp-doxygen); then \
    51       echo timestamp > stamp-doxygen; \
    52     fi; \
    53   done;
    5456
    5557if HAVE_DOXYGEN
     
    5759
    5860# these are supported by automake and *-local will add target to *
    59 dvi-local: update-stamp-doxygen $(PACKAGE).dvi
    60 ps-local: update-stamp-doxygen $(PACKAGE).ps
    61 pdf-local: update-stamp-doxygen $(PACKAGE).pdf
    62 html-local: update-stamp-doxygen $(DX_HTML_OUTPUT)/index.html
     61dvi-local: $(PACKAGE).dvi
     62ps-local: $(PACKAGE).ps
     63pdf-local: $(PACKAGE).pdf
     64html-local: $(DX_HTML_OUTPUT)/index.html
    6365
    6466# this is not supported by automake - there is no target latex
    6567latex-local: $(DX_LATEX_OUTPUT)/refman.tex
    6668
    67 $(DX_HTML_OUTPUT)/index.html: Makefile doxygen.config stamp-doxygen
    68   @(cat doxygen.config; $(ECHO) GENERATE_HTML = YES) | $(DOXYGEN) -;
     69$(DX_HTML_OUTPUT)/index.html: $(DOXYGEN_DEPS)
     70  @(cat doxygen.config && $(ECHO) "INPUT = $(DOXYGEN_INPUT)" && \
     71  $(ECHO) GENERATE_HTML = YES) | $(DOXYGEN) -;
    6972
    70 $(DX_LATEX_OUTPUT)/refman.tex: Makefile doxygen.config stamp-doxygen
    71   @(cat doxygen.config; $(ECHO) GENERATE_LATEX = YES) | $(DOXYGEN) -;
     73$(DX_LATEX_OUTPUT)/refman.tex: $(DOXYGEN_DEPS)
     74  @(cat doxygen.config && $(ECHO) "INPUT = $(DOXYGEN_INPUT)" && \
     75  $(ECHO) GENERATE_LATEX = YES) | $(DOXYGEN) -;
    7276
    7377$(PACKAGE).dvi: $(DX_LATEX_OUTPUT)/refman.tex
     
    136140
    137141FORCE:
    138 
    139 
  • trunk/doc/doxygen.config.in

    r1814 r1905  
    346346#---------------------------------------------------------------------------
    347347
    348 # The INPUT tag can be used to specify the files and/or directories that contain
    349 # documented source files. You may enter file names like "myfile.cpp" or
    350 # directories like "/usr/src/myproject". Separate the files or directories
    351 # with spaces.
    352 
    353 INPUT                  = @srcdir@/build_tool.doxygen @builddir@/first_page.doxygen @srcdir@/namespaces.doxygen @srcdir@/concepts.doxygen @srcdir@/Statistics.doxygen @top_srcdir@/yat @top_builddir@/yat
    354 
    355 # If the value of the INPUT tag contains directories, you can use the
    356 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
    357 # and *.h) to filter out the source-files in the directories. If left
    358 # blank the following patterns are tested:
    359 # *.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
    360 # *.h++ *.idl
    361 
    362 FILE_PATTERNS          = *.h
    363 
    364348# The RECURSIVE tag can be used to turn specify whether or not subdirectories
    365349# should be searched for input files as well. Possible values are YES and NO.
Note: See TracChangeset for help on using the changeset viewer.