X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2FMakefile.am;h=19255197ccade43b807c5a6c53487d15bded2c41;hb=25e59ccc0dc8baf344145d6d739229e8120330db;hp=f46f0b16d2017af672aec275c423613bbfb0723b;hpb=44a2160c95f6c90d461d66c0278348c62d2d77fa;p=free-sw%2Fxcb%2Flibxcb diff --git a/doc/Makefile.am b/doc/Makefile.am index f46f0b1..1925519 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,31 +1,42 @@ EXTRA_DIST = \ tutorial/index.html \ -tutorial/xcb.css +tutorial/xcb.css \ +xcb.doxygen.in -htmlDATA_INSTALL = cp -pR - -html_DATA = tutorial/ - -uninstall-htmlDATA: - @$(NORMAL_UNINSTALL) - @list='$(html_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ - rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ - done - rmdir "$(DESTDIR)$(htmldir)/" || true +docdirs = $(srcdir)/tutorial if BUILD_DOCS +docdirs += manual + # rule to build documentation and copy necessary files -manual: clean-local - cd .. && doxygen xcb.doxygen +manual: + doxygen xcb.doxygen # rules to clean clean-local: rm -rf manual/ -html_DATA += manual/ - endif + +all-local: $(docdirs) + +# rule to install the html documentation and tutorial in $(htmldir) +install-data-local: + @if ! test -d "$(DESTDIR)$(htmldir)"; then \ + echo "$(mkinstalldirs) '$(DESTDIR)$(htmldir)'"; \ + $(mkinstalldirs) '$(DESTDIR)$(htmldir)'; \ + fi + @for d in $(docdirs); do \ + echo "cp -pR $$d '$(DESTDIR)$(htmldir)/'"; \ + cp -pR $$d '$(DESTDIR)$(htmldir)/'; \ + done + +uninstall-local: + @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