Changeset 1905


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
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r1797 r1905  
    3030SUBDIRS = build_support m4 yat test doc
    3131
    32 .PHONY: doc maintainer-check news-check svn-check svn-clean release
    33 doc:; @(cd doc; $(MAKE) $(AM_MAKEFLAGS) $@)
     32.PHONY: doc doxygen_mk maintainer-check news-check svn-check svn-clean release
     33doc: doxygen_mk
     34  @(cd doc; $(MAKE) $(AM_MAKEFLAGS) $@)
    3435
     36doxygen_mk:; @(cd yat; $(MAKE) $(AM_MAKEFLAGS) $@)
    3537
    3638if ENABLE_SVN_SUPPORT
  • 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.
  • trunk/yat/Makefile.am

    r1897 r1905  
    4141  utility/libutility.la \
    4242  $(YAT_PRIMARY_LIBS) $(LIBM)
     43
     44.PHONY: doxygen_mk
     45
     46html-local:doxygen_mk
     47dvi-local:doxygen_mk
     48ps-local:doxygen_mk
     49pdf-local:doxygen_mk
     50
     51doxygen_mk:
     52  for subdir in $(SUBDIRS); do \
     53    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) doxygen.mk) \
     54  done;
  • trunk/yat/classifier/Makefile.am

    r1855 r1905  
    9191  Target.h \
    9292  utility.h
     93
     94CLEANFILES = doxygen.mk
     95
     96all-local: doxygen.mk
     97
     98doxygen.mk: Makefile.am
     99  @echo "# generated by make" > $@ && \
     100  echo $(ECHO_N) "classifier_doxygen_input=" >> $@
     101  for f in $(include_classifier_HEADERS); do \
     102    echo $(ECHO_N) "\$$(top_srcdir)/$(subdir)/$$f " >> $@; \
     103  done && \
     104  echo >> $@
     105
  • trunk/yat/normalizer/Makefile.am

    r1797 r1905  
    2929  Gauss.h qQuantileNormalizer.h QuantileNormalizer.h RowNormalizer.h  \
    3030  Spearman.h Zscore.h
     31
     32CLEANFILES = doxygen.mk
     33
     34all-local: doxygen.mk
     35
     36doxygen.mk: Makefile.am
     37  @echo "# generated by make" > $@ && \
     38  echo $(ECHO_N) "normalizer_doxygen_input=" >> $@
     39  for f in $(include_normalizer_HEADERS); do \
     40    echo $(ECHO_N) "\$$(top_srcdir)/$(subdir)/$$f " >> $@; \
     41  done && \
     42  echo >> $@
     43
  • trunk/yat/random/Makefile.am

    r1797 r1905  
    2929include_random_HEADERS = \
    3030  random.h
     31
     32CLEANFILES = doxygen.mk
     33
     34all-local: doxygen.mk
     35
     36doxygen.mk: Makefile.am
     37  @echo "# generated by make" > $@ && \
     38  echo $(ECHO_N) "random_doxygen_input=" >> $@
     39  for f in $(include_random_HEADERS); do \
     40    echo $(ECHO_N) "\$$(top_srcdir)/$(subdir)/$$f " >> $@; \
     41  done && \
     42  echo >> $@
     43
  • trunk/yat/regression/Makefile.am

    r1797 r1905  
    4040  OneDimensionalWeighted.h Polynomial.h PolynomialInterpolation.h   \
    4141  PolynomialWeighted.h
     42
     43CLEANFILES = doxygen.mk
     44
     45all-local: doxygen.mk
     46
     47doxygen.mk: Makefile.am
     48  @echo "# generated by make" > $@ && \
     49  echo $(ECHO_N) "regression_doxygen_input=" >> $@
     50  for f in $(include_regression_HEADERS); do \
     51    echo $(ECHO_N) "\$$(top_srcdir)/$(subdir)/$$f " >> $@; \
     52  done && \
     53  echo >> $@
     54
  • trunk/yat/statistics/Makefile.am

    r1797 r1905  
    4141  SAMScore.h Score.h Smoother.h SNRScore.h tScore.h tTest.h \
    4242  utility.h VectorFunction.h WilcoxonFoldChange.h
     43CLEANFILES = doxygen.mk
     44
     45all-local: doxygen.mk
     46
     47doxygen.mk: Makefile.am
     48  @echo "# generated by make" > $@ && \
     49  echo $(ECHO_N) "statistics_doxygen_input=" >> $@
     50  for f in $(include_statistics_HEADERS); do \
     51    echo $(ECHO_N) "\$$(top_srcdir)/$(subdir)/$$f " >> $@; \
     52  done && \
     53  echo >> $@
     54
  • trunk/yat/utility/Makefile.am

    r1888 r1905  
    4949extra_headersdir = $(include_utilitydir)
    5050extra_headers_DATA = config_public.h version.h
     51
     52CLEANFILES = doxygen.mk
     53
     54all-local: doxygen.mk
     55
     56doxygen.mk: Makefile.am
     57  @echo "# generated by make" > $@ && \
     58  echo $(ECHO_N) "utility_doxygen_input=" >> $@
     59  for f in $(include_utility_HEADERS); do \
     60    echo $(ECHO_N) "\$$(top_srcdir)/$(subdir)/$$f " >> $@; \
     61  done && \
     62  for f in $(extra_headers_DATA); do \
     63    echo $(ECHO_N) "\$$(top_builddir)/$(subdir)/$$f " >> $@; \
     64  done && \
     65  echo >> $@
     66
Note: See TracChangeset for help on using the changeset viewer.