OSDN Git Service

disable make documents when make all
[ccunit/ccunit.git] / doc / Makefile.am
index 9d702e0..9d6d561 100644 (file)
@@ -1,8 +1,9 @@
-EXTRA_DIST = $(doxygen_input) $(static_pages)
+EXTRA_DIST = $(doxygen_input) $(static_pages) $(DOXYSRCS)
 
+DOXYGEN=@DOXYGEN@
 doxygen_input = header.html footer.html
 static_pages = FAQ
-#static_pages =
+DOXYSRCS=mainpage.dox cookbook.dox
 
 CCUNITSRCS=$(top_srcdir)/src/ccunit/*.[ch] $(top_srcdir)/src/tools/*.c
 
@@ -12,49 +13,47 @@ htmldir = $(pkgdatadir)/html
 html_DATA = $(static_pages) html/index.html
 
 install-data-hook:
+       cp -p $(static_pages) html
        cp -dpR html/* $(DESTDIR)$(htmldir)
 
-# Automake's "distcheck" is sensitive to having files left over
-# after "make uninstall", so we have to clean up the install hook.
 uninstall-local:
-       rm -rf $(DESTDIR)$(htmldir)
+       $(RM) -rf $(DESTDIR)$(htmldir)
 
-dox: html/index.html
+docs: html/index.html
 
-EXTRA_DIST += html
-
-dist-hook:
-       cp $(static_pages) $(distdir)/doc/html
+doc-dist-hook:
+       cp -p $(static_pages) $(distdir)/html
 
 else
 
-# We repeat the three targets in both the "if" and "else" clauses
-# of the conditional, because the generated makefile will contain
-# references to the targets (target "install" depends on target
-# "install-datahook", for example), and some make programs get upset
-# if no target exists.
-
 install-data-hook:
 uninstall-local:
-dox:
+docs:
 
 endif
 
 
-all-local: dox
+all:
+
+CMNTST=<span class="comment">/
+CMNTED=/</span>
 
-html/index.html: Doxyfile $(doxygen_input) $(CCUNITSRCS)
-       @DOXYGEN@
+html/index.html: Doxyfile $(doxygen_input) $(CCUNITSRCS) $(DOXYSRCS)
+       $(DOXYGEN)
+       cd html; \
+           mv -f cookbook.html cookbook.html~; \
+           sed -e 's!\($(CMNTST)\)/\(\*.*\*\)\\\($(CMNTED)\)!\1\2\3!g' \
+               cookbook.html~ > cookbook.html
 
 pdf: @PACKAGE@.pdf
 @PACKAGE@.pdf:
        $(MAKE) -C ./latex pdf
-       ln -s ./latex/refman.ps  @PACKAGE@.ps
-       ln -s ./latex/refman.pdf @PACKAGE@.pdf
+       $(LN_S) ./latex/refman.ps @PACKAGE@.ps
+       $(LN_S) ./latex/refman.pdf @PACKAGE@.pdf
 
 
 clean-local:
        $(RM) -r latex
-       $(RM) -r html man @PACKAGE@.ps @PACKAGE@.pdf
+       $(RM) -r html/* man @PACKAGE@.ps @PACKAGE@.pdf
 
 CLEANFILES=*~ .*~ ./\#*\# *.log