[yelp-tools] yelp.m4: Fix dist for large documents



commit 7d31deea37e5a2d0afa01bb061bccd32a7c789e8
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Jan 23 11:35:30 2012 -0500

    yelp.m4: Fix dist for large documents
    
    If you have enough pages translated into enough languages,
    you'll run into 'Argument list too long'. Implemented a
    custom distdir target for HELP_FILES to work around.

 tools/yelp.m4 |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/tools/yelp.m4 b/tools/yelp.m4
index bf84a37..93bec96 100644
--- a/tools/yelp.m4
+++ b/tools/yelp.m4
@@ -96,9 +96,19 @@ clean-help:
 	rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
 
 EXTRA_DIST ?=
-EXTRA_DIST += $(_HELP_C_FILES) $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_POFILES)
+EXTRA_DIST += $(_HELP_LC_STAMPS) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_POFILES)
 EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(_HELP_LINGUAS),$(wildcard $(lc)/$(f))))
 
+distdir: distdir-help-files
+distdir-help-files:
+	@for lc in C $(_HELP_LINGUAS); do \
+	  for file in $(HELP_FILES); do \
+	    $(MKDIR_P) "$(distdir)/$$lc"; \
+	    if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
+	    cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
+	  done; \
+	done; \
+
 .PHONY: check-help
 check: check-help
 check-help:



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