X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile.am;h=f3c934a72ba1ff769af9a776730e2c51a8354bb5;hb=422458b66380e4103c4937f0e2e8bb93e31f273a;hp=4b0ec900757714346a1dcfe0517c59d982439a5c;hpb=82762555a1af0b170d01e2042eefe34086e6c132;p=free-sw%2Fxcb%2Flibxcb diff --git a/doc/Makefile.am b/doc/Makefile.am index 4b0ec90..f3c934a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,40 +1,48 @@ EXTRA_DIST = \ tutorial/index.html \ -tutorial/xcb.css +tutorial/xcb.css \ +xcb.doxygen.in \ +xkb_internals \ +xkb_issues -if BUILD_DOCS +docdirs = $(srcdir)/tutorial -# install documentation +if ENABLE_DEVEL_DOCS +if HAVE_DOXYGEN +if HAVE_DOT -all-local: doc-build.stamp - -# rule to remove all old created files -doc-prepare.stamp: - @if test -d manual/ ; then \ - rm -rf manual/; \ - fi +docdirs += manual # rule to build documentation and copy necessary files -doc-build.stamp: doc-prepare.stamp - @cd .. && doxygen xcb.doxygen +manual: + doxygen xcb.doxygen # rules to clean clean-local: - @rm -rf manual/ + rm -rf manual/ + +endif +endif +endif -install-data-local: install-html-local +all-local: $(docdirs) # rule to install the html documentation and tutorial in $(htmldir) -install-html-local: +install-data-local: @if ! test -d "$(DESTDIR)$(htmldir)"; then \ - $(mkinstalldirs) "$(DESTDIR)$(htmldir)"; \ + echo "$(mkinstalldirs) '$(DESTDIR)$(htmldir)'"; \ + $(mkinstalldirs) '$(DESTDIR)$(htmldir)'; \ fi - @cp -pr manual/ "$(DESTDIR)$(htmldir)" - @cp -pr tutorial/ "$(DESTDIR)$(htmldir)" + @for d in $(docdirs); do \ + echo "cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \ + cp -pR $$d '$(DESTDIR)$(htmldir)/'; \ + done -# rule to uninstall the documentation uninstall-local: - @rm -rf $(DESTDIR)$(htmldir) - -endif + @for d in $(docdirs); do \ + d=`basename $$d`; \ + echo "test ! -d '$(DESTDIR)$(htmldir)/'$$d || { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && rm -rf '$(DESTDIR)$(htmldir)/'$$d; }"; \ + test ! -d '$(DESTDIR)$(htmldir)/'$$d || { find '$(DESTDIR)$(htmldir)/'$$d -type d ! -perm -200 -exec chmod u+w '{}' ';' && rm -rf '$(DESTDIR)$(htmldir)/'$$d; }; \ + done + rmdir "$(DESTDIR)$(htmldir)/" || true