]> Pileus Git - ~andy/gtk/blobdiff - docs/tutorial/Makefile.am
call g_test_init() from gtk_test_init().
[~andy/gtk] / docs / tutorial / Makefile.am
index 3954b4b4d3585b23ad5276780d984ba29eb43c85..43e6c244134b887c3824c29f305c5d6b8ac438d7 100644 (file)
@@ -1,6 +1,8 @@
+include $(top_srcdir)/Makefile.decl
+
 .PHONY: html pdf
 
-EXTRA_DIST = \
+EXTRA_DIST += \
        gtk-tut.sgml                    \
        images/arrow.png                \
        images/aspectframe.png          \
@@ -35,19 +37,23 @@ EXTRA_DIST = \
        images/tictactoe.png
 
 if HAVE_DOCBOOK
-html: 
-       (cd $(srcdir); \
-        db2html gtk-tut.sgml; \
-        mv gtk-tut html; \
-        mkdir html/images; \
-        cp images/*.png html/images)
+html:
+       if test -w $(srcdir); then \
+         (cd $(srcdir); \
+          db2html gtk-tut.sgml; \
+          test -d html && rm -r html; \
+          mv gtk-tut html; \
+          mkdir html/images; \
+          cp images/*.png html/images); \
+       fi
 
 pdf:
-       (cd $(srcdir); db2pdf gtk-tut.sgml)
+       if test -w $(srcdir); then \
+         (cd $(srcdir); db2pdf gtk-tut.sgml); \
+       fi
 
-dist-hook: html pdf
+dist-hook: html
        cp -Rp $(srcdir)/html $(distdir)
-       cp -p $(srcdir)/gtk-tut.pdf $(distdir)
 else
 html:
        echo "***"