[Xcb-commit] doc
Josh Triplett
josh at kemper.freedesktop.org
Thu Nov 23 02:12:21 PST 2006
doc/Makefile.am | 40 +++++++++++++++++++++++++---------------
1 files changed, 25 insertions(+), 15 deletions(-)
New commits:
diff-tree 30c768b322f613d697a61997e081a19aecd0b07f (from af3a15838fc7dc5b4e52197854deb54da6baeaf1)
Author: Josh Triplett <josh at freedesktop.org>
Date: Thu Nov 23 02:11:02 2006 -0800
Rewrite automake's data installation rules, because they suck.
Specifically, they didn't handle installing data from both srcdir and builddir.
We have the tutorial in the srcdir, and build the manual in the builddir.
Also, stop rebuilding the manual for each make target in the doc directory, and
every time any of those targets get called. This change now makes the manual
never rebuild once built; we plan to fix that later, by rewriting the makefiles
to avoid recursive make, and then making the manual depend on the source files.
Commit by Jamey Sharp and Josh Triplett.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 27f492c..1925519 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -4,29 +4,39 @@ tutorial/index.html \
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
+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
More information about the xcb-commit
mailing list