summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2012-01-23 11:35:30 -0500
committerShaun McCance <shaunm@gnome.org>2012-01-23 11:35:30 -0500
commit7d31deea37e5a2d0afa01bb061bccd32a7c789e8 (patch)
tree214d54e9c6fa179f5ade8e4841b3ac7bb62909cf
parent2a1437e38f684ff1488b7c8798caa933e9ef9563 (diff)
downloadyelp-tools-7d31deea37e5a2d0afa01bb061bccd32a7c789e8.tar.gz
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.
-rw-r--r--tools/yelp.m412
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: