[gtk-doc] pdf: add pdf targets to makefiles



commit f0c00d31ffd58fbf3fbce86f3688672fdf102d6c
Author: Stefan Kost <ensonic users sf net>
Date:   Wed Jul 15 15:18:49 2009 +0300

    pdf: add pdf targets to makefiles

 gtk-doc.make              |   24 ++++++++++++++++++++++--
 gtk-doc.notmpl.make       |    2 +-
 tests/gtk-doc.make        |   14 ++++++++++++--
 tests/gtk-doc.notmpl.make |    2 +-
 4 files changed, 36 insertions(+), 6 deletions(-)
---
diff --git a/gtk-doc.make b/gtk-doc.make
index fc885d8..577a06c 100644
--- a/gtk-doc.make
+++ b/gtk-doc.make
@@ -50,12 +50,23 @@ REPORT_FILES = \
 CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
 
 if ENABLE_GTK_DOC
-all-local: html-build.stamp
+if GTK_DOC_BUILD_HTML
+HTML_BUILD_STAMP=html-build.stamp
+else
+HTML_BUILD_STAMP=
+endif
+if GTK_DOC_BUILD_PDF
+PDF_BUILD_STAMP=pdf-build.stamp
+else
+PDF_BUILD_STAMP=
+endif
+
+all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
 else
 all-local:
 endif
 
-docs: html-build.stamp
+docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
 
 $(REPORT_FILES): sgml-build.stamp
 
@@ -123,6 +134,15 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
 	@cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
 	@touch html-build.stamp
 
+#### pdf ####
+
+pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+	@echo 'gtk-doc: Building PDF'
+	@-chmod -R u+w $(srcdir)
+	@rm -rf $(srcdir)/$(DOC_MODULE).pdf
+	@cd $(srcdir) && gtkdoc-mkpdf --uninstalled --path="$(abs_srcdir)" $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)  $(MKPDF_OPTIONS)
+	@touch pdf-build.stamp
+
 ##############
 
 clean-local:
diff --git a/gtk-doc.notmpl.make b/gtk-doc.notmpl.make
index d7ce661..9975bb1 100644
--- a/gtk-doc.notmpl.make
+++ b/gtk-doc.notmpl.make
@@ -65,7 +65,7 @@ else
 all-local:
 endif
 
-docs: html-build.stamp
+docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
 
 $(REPORT_FILES): sgml-build.stamp
 
diff --git a/tests/gtk-doc.make b/tests/gtk-doc.make
index ad09826..b0c31ca 100644
--- a/tests/gtk-doc.make
+++ b/tests/gtk-doc.make
@@ -50,9 +50,9 @@ REPORT_FILES = \
 
 CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
 
-check-local: html-build.stamp
+check-local: html-build.stamp pdf-build.stamp
 
-docs: html-build.stamp
+docs: html-build.stamp pdf-build.stamp
 
 $(REPORT_FILES): sgml-build.stamp
 
@@ -118,6 +118,16 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
 	gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
 	@touch html-build.stamp
 
+#### pdf ####
+
+pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+	@echo 'gtk-doc: Building PDF'
+	@-chmod -R u+w $(srcdir)
+	@rm -rf $(srcdir)/$(DOC_MODULE).pdf
+	@cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
+	gtkdoc-mkpdf --uninstalled --path="$(abs_srcdir)" $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)  $(MKPDF_OPTIONS)
+	@touch pdf-build.stamp
+
 ##############
 
 # we need to enforce a rebuild for the tests
diff --git a/tests/gtk-doc.notmpl.make b/tests/gtk-doc.notmpl.make
index 6079c39..eaa2c1a 100644
--- a/tests/gtk-doc.notmpl.make
+++ b/tests/gtk-doc.notmpl.make
@@ -51,7 +51,7 @@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
 
 check-local: html-build.stamp pdf-build.stamp
 
-docs: html-build.stamp
+docs: html-build.stamp pdf-build.stamp
 
 $(REPORT_FILES): sgml-build.stamp
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]