[nautilus-actions] HTML and PDF installations honor --htmldir= and --pdfdir= options



commit 5a7b21e952c425ddd8d51a8a4b4fdedf2c15ce44
Author: Pierre Wieser <pwieser trychlos org>
Date:   Fri Sep 3 19:38:05 2010 +0200

    HTML and PDF installations honor --htmldir= and --pdfdir= options

 ChangeLog            |    3 +++
 doc/nact/Makefile.am |   16 ++++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8903c63..472b784 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 2010-09-03 Pierre Wieser <pwieser trychlos org>
 
 	* doc/nact/Makefile.am:
+	HTML and PDF installations honor --htmldir= and --pdfdir= options.
+
+	* doc/nact/Makefile.am:
 	Fix make distcheck when distributing tranlations of NACT user's manual.
 
 	* configure.ac:
diff --git a/doc/nact/Makefile.am b/doc/nact/Makefile.am
index d1c9523..6f2e5f0 100644
--- a/doc/nact/Makefile.am
+++ b/doc/nact/Makefile.am
@@ -151,10 +151,16 @@ html.stamp: $(_DOC_C_DOCS) $(_DOC_C_FIGURES) $(_DOC_LC_DOCS) ChangeLog
 	done
 	touch html.stamp
 
+# if --htmldir has not been specified, then we default to PKGDOCDIR/html
+# in all case, we append the locale as a subdirectory level
 install-html-manuals:
 	@-for _lc in C $(_DOC_REAL_LINGUAS); do \
 		_srcdir=$(top_builddir)/doc/nact/$$_lc/$(DOC_MODULE); \
-		_destdir=$(DESTDIR)$(pkgdocdir)/html/$$_lc; \
+		if test "$(htmldir)" = "$(pkgdocdir)"; then \
+			_destdir=$(DESTDIR)$(pkgdocdir)/html/$$_lc; \
+		else \
+			_destdir=$(DESTDIR)$(htmldir)/$$_lc; \
+		fi \
 		if ! test -d $$_destdir; then $(MKDIR_P) $$_destdir; fi; \
 		find $$_srcdir -type f | while read _f; do \
 			_dname=`dirname $$_f`; \
@@ -199,10 +205,16 @@ pdf.stamp: $(_DOC_C_DOCS) $(_DOC_C_FIGURES) $(_DOC_LC_DOCS) ChangeLog
 	done
 	touch pdf.stamp
 
+# if --pdfdir has not been specified, then we default to PKGDOCDIR/pdf
+# in all case, we append the locale as a subdirectory level
 install-pdf-manuals:
 	@-for _lc in C $(_DOC_REAL_LINGUAS); do \
 		_srcdir=$(top_builddir)/doc/nact/$$_lc; \
-		_destdir=$(DESTDIR)$(pkgdocdir)/pdf/$$_lc; \
+		if test "$(pdfdir)" = "$(pkgdocdir)"; then \
+			_destdir=$(DESTDIR)$(pkgdocdir)/pdf/$$_lc; \
+		else \
+			_destdir=$(DESTDIR)$(pdfdir)/$$_lc; \
+		fi \
 		if ! test -d $$_destdir; then $(MKDIR_P) $$_destdir; fi; \
 		echo $(INSTALL_DATA) "$$_srcdir/$(DOC_MODULE).pdf" "$$_destdir/$(DOC_MODULE).pdf"; \
 		$(INSTALL_DATA) "$$_srcdir/$(DOC_MODULE).pdf" "$$_destdir/$(DOC_MODULE).pdf"; \



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