build: Fixes to pass distcheck

Try to make the cookbook pass the distcheck phase, so that we can run
distcheck with --enable-docs, and make sure that a tarballed clutter
release can actually build the cookbook.
This commit is contained in:
Emmanuele Bassi 2011-02-01 14:33:29 +00:00
parent 6f1e5010d9
commit 428f64212c
2 changed files with 93 additions and 89 deletions

View File

@ -8,14 +8,14 @@ HTML_DIR = $(datadir)/gtk-doc/html
TARGET_DIR = $(HTML_DIR)/clutter-cookbook TARGET_DIR = $(HTML_DIR)/clutter-cookbook
XML_FILES = \ XML_FILES = \
actors.xml \ $(srcdir)/actors.xml \
animations.xml \ $(srcdir)/animations.xml \
events.xml \ $(srcdir)/events.xml \
introduction.xml \ $(srcdir)/introduction.xml \
text.xml \ $(srcdir)/text.xml \
textures.xml \ $(srcdir)/textures.xml \
layouts.xml \ $(srcdir)/layouts.xml \
script.xml \ $(srcdir)/script.xml \
$(NULL) $(NULL)
XSLTOPTS = \ XSLTOPTS = \
@ -32,39 +32,40 @@ XSLTOPTS = \
XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/current XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/current
XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl
HTML_FILES = html/*.html HTML_FILES = $(top_builddir)/doc/cookbook/html/*.html
CSS_FILES = html/*.css CSS_FILES = $(top_builddir)/doc/cookbook/html/*.css
IMAGE_FILES = \ IMAGE_FILES = \
images/clutter-logo.png \ $(srcdir)/images/clutter-logo.png \
images/textures-reflection.png \ $(srcdir)/images/textures-reflection.png \
images/actors-opacity.png \ $(srcdir)/images/actors-opacity.png \
images/actors-opacity-container-affects-opacity.png \ $(srcdir)/images/actors-opacity-container-affects-opacity.png \
images/text-shadow.png \ $(srcdir)/images/text-shadow.png \
images/textures-sub-texture.png \ $(srcdir)/images/textures-sub-texture.png \
images/layouts-stacking-diff-actor-sizes.png \ $(srcdir)/images/layouts-stacking-diff-actor-sizes.png \
images/events-pointer-motion-stacking.png \ $(srcdir)/images/events-pointer-motion-stacking.png \
images/layouts-bind-constraint-stage.png \ $(srcdir)/images/layouts-bind-constraint-stage.png \
$(NULL) $(NULL)
VIDEO_FILES = \ VIDEO_FILES = \
videos/animations-fading-out.ogv \ $(srcdir)/videos/animations-fading-out.ogv \
videos/animations-fading-in-then-out.ogv \ $(srcdir)/videos/animations-fading-in-then-out.ogv \
videos/animations-rotating-x-minus-45.ogv \ $(srcdir)/videos/animations-rotating-x-minus-45.ogv \
videos/animations-rotating-y-45.ogv \ $(srcdir)/videos/animations-rotating-y-45.ogv \
videos/animations-rotating-z-90.ogv \ $(srcdir)/videos/animations-rotating-z-90.ogv \
videos/animations-rotating-x-minus-180-with-y-minus-96.ogv \ $(srcdir)/videos/animations-rotating-x-minus-180-with-y-minus-96.ogv \
videos/animations-rotating-x-minus-180-with-z-minus-96.ogv \ $(srcdir)/videos/animations-rotating-x-minus-180-with-z-minus-96.ogv \
videos/animations-rotating-x-centered.ogv \ $(srcdir)/videos/animations-rotating-x-centered.ogv \
videos/animations-rotating-y-centered.ogv \ $(srcdir)/videos/animations-rotating-y-centered.ogv \
videos/animations-rotating-z-centered.ogv \ $(srcdir)/videos/animations-rotating-z-centered.ogv \
videos/animations-rotating-container-reverses-direction.ogv \ $(srcdir)/videos/animations-rotating-container-reverses-direction.ogv \
videos/textures-split-go.ogv \ $(srcdir)/videos/textures-split-go.ogv \
videos/events-mouse-scroll.ogv \ $(srcdir)/videos/events-mouse-scroll.ogv \
videos/textures-crossfade-two-textures.ogv \ $(srcdir)/videos/textures-crossfade-two-textures.ogv \
videos/animations-complex.ogv \ $(srcdir)/videos/animations-complex.ogv \
videos/animations-reuse.ogv \ $(srcdir)/videos/animations-reuse.ogv \
videos/animations-moving-anchors.ogv \ $(srcdir)/videos/animations-moving-anchors.ogv \
videos/animations-moving-depth.ogv \ $(srcdir)/videos/animations-moving-depth.ogv \
videos/animations-looping.ogv \ $(srcdir)/videos/animations-looping.ogv \
$(NULL) $(NULL)
EXTRA_DIST = \ EXTRA_DIST = \
@ -76,7 +77,8 @@ EXTRA_DIST = \
CLEANFILES = \ CLEANFILES = \
pdf-build.stamp \ pdf-build.stamp \
html-build.stamp html-build.stamp \
clutter-cookbook.html
pdf-build.stamp: clutter-cookbook.xml $(XML_FILES) pdf-build.stamp: clutter-cookbook.xml $(XML_FILES)
SP_ENCODING=XML SP_CHARSET_FIXED=YES \ SP_ENCODING=XML SP_CHARSET_FIXED=YES \
@ -97,8 +99,8 @@ html-build.stamp: clutter-cookbook.xml $(XML_FILES)
cp $$file html/videos/ ; \ cp $$file html/videos/ ; \
done \ done \
fi && \ fi && \
cp images/* html/images/ && \ cp $(top_srcdir)/doc/cookbook/images/* html/images/ && \
cp examples/*.c html/examples/ && \ cp $(top_srcdir)/doc/cookbook/examples/*.c html/examples/ && \
echo timestamp > $(@F) echo timestamp > $(@F)
if ENABLE_PDFS if ENABLE_PDFS
@ -120,10 +122,12 @@ clean-local:
rm -f *.stamp rm -f *.stamp
uninstall-local: uninstall-local:
@rm -rf $(DESTDIR)$(TARGET_DIR)
@rm -f $(DESTDIR)$(TARGET_DIR)/clutter-cookbook.devhelp
install-data-local: install-data-local:
installfiles=`echo ./html/*`; \ installfiles=`echo $(top_builddir)/doc/cookbook/html/*`; \
if test "$$installfiles" = './html/*'; \ if test "$$installfiles" = '$(top_builddir)/doc/cookbook/html/*'; \
then echo '-- Nothing to install' ; \ then echo '-- Nothing to install' ; \
else \ else \
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) ; \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) ; \
@ -134,7 +138,7 @@ install-data-local:
fi \ fi \
done; \ done; \
fi; \ fi; \
if [ -d ./images ]; \ if [ -d $(top_srcdir)/doc/cookbook/images ]; \
then \ then \
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/images ; \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/images ; \
for file in `ls $(IMAGE_FILES)`; do \ for file in `ls $(IMAGE_FILES)`; do \
@ -145,7 +149,7 @@ install-data-local:
fi \ fi \
done; \ done; \
fi; \ fi; \
if [ -d ./videos ] && [[ "$(VIDEO_FILES)" != "" ]] ; \ if [ -d $(top_srcdir)/doc/cookbook/videos ]; \
then \ then \
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/videos ; \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/videos ; \
for file in `ls $(VIDEO_FILES)`; do \ for file in `ls $(VIDEO_FILES)`; do \
@ -156,7 +160,7 @@ install-data-local:
fi \ fi \
done; \ done; \
fi; \ fi; \
$(INSTALL_DATA) html/clutter-cookbook.devhelp $(DESTDIR)$(TARGET_DIR)/clutter-cookbook.devhelp $(INSTALL_DATA) $(top_builddir)/doc/cookbook/html/clutter-cookbook.devhelp $(DESTDIR)$(TARGET_DIR)/clutter-cookbook.devhelp
.PHONY : doc .PHONY : doc