Changeset 1263 for trunk/doc


Ignore:
Timestamp:
Apr 9, 2008, 1:08:20 AM (13 years ago)
Author:
Peter
Message:

redesigning Makefile for dox generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/Makefile.am

    r1259 r1263  
    2525# 02111-1307, USA.
    2626
     27DX_HTML_OUTPUT=$(srcdir)/html
     28DX_LATEX_OUTPUT=$(srcdir)/latex
     29
    2730.doxygen/variables: Makefile .doxygen doxygen.config
    2831  @html=`$(SED) -n 's/^[ \t]*HTML_OUTPUT[ \t]*=[ \t]*//p' doxygen.config`;\
    2932  if (test -z $$html); then html="html"; fi;\
    3033  $(ECHO) "DX_HTML_OUTPUT=$$html" > $@
    31   @lt=`$(SED) -n 's/^[ \t]*LATEX_OUTPUT[ \t]*=[ \t]*//p' doxygen.config`;\
     34  @lt=
    3235  if (test -z $$lt); then lt="latex"; fi;\
    3336  $(ECHO) "DX_LATEX_OUTPUT=$$lt" >> $@
     
    3942  `$(SED) -n 's/^[ \t]*FILE_PATTERNS[ \t]*=[ \t]*//p' doxygen.config`" >> $@
    4043
    41 .doxygen/deps: Makefile .doxygen .doxygen/variables FORCE
    42   @$(ECHO) $(ECHO_N) "DX_DEPENDENCIES=" > $@
    43   @dirs='$(DX_INPUT)'; for d in $$dirs; do \
    44     if (test -d $$d); then \
    45       list='$(DX_FILE_PATTERN)'; for p in $$list; do \
    46           $(ECHO) $(ECHO_N) `find $$d -name $$p|xargs` >> $@;\
    47           $(ECHO) $(ECHO_N) " " >> $@;\
    48       done;\
     44stamp-doxygen: doxygen.config Makefile
     45  @$(MAKE) $(AM_MAKEFLAGS) update-stamp-doxygen
     46
     47update-stamp-doxygen: FORCE
     48  @input=`$(SED) -n 's/^[ \t]*INPUT[ \t]*=[ \t]*//p' doxygen.config`;\
     49  pattern=\
     50  `$(SED) -n 's/^[ \t]*FILE_PATTERNS[ \t]*=[ \t]*//p' doxygen.config`;\
     51  if (test -z "$$pattern"); then \
     52    pattern="*.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp *.h++ *.idl";\
     53  fi;\
     54  for i in $$input; do \
     55    if (test -d $$i); then \
     56      for p in $$pattern; do \
     57        input2="$$input2 `find $$i -name $$p|xargs`";\
     58      done; \
    4959    else \
    50       $(ECHO) $(ECHO_N) "$$d " >> $@;\
    51     fi;\
     60      input2="$$input2 $ii"; \
     61    fi; \
     62  done; \
     63  for i in $$input2; do \
     64    if (test $$i -nt stamp-doxygen); then \
     65      echo timestamp > stamp-doxygen; \
     66    fi; \
    5267  done;
    53   @$(ECHO)  >> $@;
    54   @$(ECHO) "# Dummie targets" >> $@;
    55   @dirs='$(DX_INPUT)'; for d in $$dirs; do \
    56     if (test -d $$d); then \
    57       list='$(DX_FILE_PATTERN)'; for p in $$list; do \
    58         files=`find $$d -name $$p`; for f in $$files; do \
    59     $(ECHO) "$$f:" >> $@;\
    60         done;\
    61       done;\
    62     else \
    63       $(ECHO) "$$d:" >> $@;\
    64     fi;\
    65   done
    6668
    67 .doxygen:;$(MKDIR_P) .doxygen
    68 
    69 
    70 @am__include@ @am__quote@.doxygen/variables@am__quote@
    71 @am__include@ @am__quote@.doxygen/deps@am__quote@
    7269if HAVE_DOXYGEN
    7370
    7471doc: html dvi ps pdf
    7572
     73EXTRA_DIST = $(srcdir)/$(PACKAGE).dvi $(srcdir)/$(PACKAGE).ps \
     74$(srcdir)/$(PACKAGE).pdf $(DX_LATEX_OUTPUT) $(DX_HTML_OUTPUT)
     75
    7676# these are supported by automake and *-local will add target to *
    77 dvi-local: $(srcdir)/$(PACKAGE).dvi
    78 ps-local: $(srcdir)/$(PACKAGE).ps
    79 pdf-local: $(srcdir)/$(PACKAGE).pdf
    80 html-local: $(DX_HTML_OUTPUT)/index.html
     77dvi-local: update-stamp-doxygen $(srcdir)/$(PACKAGE).dvi
     78ps-local: update-stamp-doxygen $(srcdir)/$(PACKAGE).ps
     79pdf-local: update-stamp-doxygen $(srcdir)/$(PACKAGE).pdf
     80html-local: update-stamp-doxygen $(DX_HTML_OUTPUT)/index.html
    8181
    8282# this is not supported by automake - there is no target latex
    8383latex-local: $(DX_LATEX_OUTPUT)/refman.tex
    8484
    85 $(DX_HTML_OUTPUT)/index.html: Makefile doxygen.config $(DX_DEPENDENCIES)
     85$(DX_HTML_OUTPUT)/index.html: Makefile doxygen.config stamp-doxygen
    8686  @(cat doxygen.config; $(ECHO) GENERATE_HTML = YES) | doxygen -;
    8787
    88 $(DX_LATEX_OUTPUT)/refman.tex: Makefile doxygen.config $(DX_DEPENDENCIES)
     88$(DX_LATEX_OUTPUT)/refman.tex: Makefile doxygen.config stamp-doxygen
    8989  @(cat doxygen.config; $(ECHO) GENERATE_LATEX = YES) | doxygen -;
    9090
Note: See TracChangeset for help on using the changeset viewer.