# -----------------------------------------------------------------------------
# Binary distributions
-# This is split in 2 because of the shell argument limit
-$(eval $(call bindist,root1,\
+$(eval $(call bindist,.,\
LICENSE \
configure config.sub config.guess install-sh \
extra-gcc-opts.in \
$(INSTALL_BINS) \
$(INSTALL_DOCS) \
$(INSTALL_LIBRARY_DOCS) \
- ))
-$(eval $(call bindist,root2,\
$(addsuffix /*,$(INSTALL_HTML_DOC_DIRS)) \
docs/index.html \
$(wildcard libraries/*/dist-install/doc/) \
bindist: bindist_$1
bindist_$1:
- for f in $2; do echo $(BIN_DIST_NAME)/$$$$f >> $(BIN_DIST_LIST); done
+$(foreach i,$2,$(call bindist_item,$i))
+endef
+
+define bindist_item
+
+# $1 = the line
+# The formatting of this definition (e.g. the blank line above) is
+# important, in order to get make to generate the right makefile code.
+ for f in $(BIN_DIST_NAME)/$1; do echo $$$$f >> $(BIN_DIST_LIST); done
endef