Commit 642ac8a0 authored by Ian Lynagh's avatar Ian Lynagh

Avoid duplication in the binary-dist rules for docs

Rather than building complex sh stuff and echoing what we're doing
ourselves, use make rules to do the looping and let make print things
out.
parent 410db5b5
......@@ -314,27 +314,23 @@ endif # XSLTPROC
endif # BINDIST_DOC_WAYS
binary-dist ::
ifneq "$(DIR_DOCBOOK_XSL)" ""
@for i in $(BinDistDirs); do \
if test -d "$$i"; then \
$(MAKE) -C $$i $(MFLAGS) $(BINDIST_DOC_WAYS); \
echo $(MAKE) -C $$i $(MFLAGS) install-docs XMLDocWays="$(BINDIST_DOC_WAYS)" \
prefix=$(BIN_DIST_DIR) \
exec_prefix=$(BIN_DIST_DIR) \
bindir=$(BIN_DIST_DIR)/bin/$(TARGETPLATFORM) \
libdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \
libexecdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \
datadir=$(BIN_DIST_DIR)/share; \
$(MAKE) -C $$i $(MFLAGS) install-docs XMLDocWays="$(BINDIST_DOC_WAYS)" \
prefix=$(BIN_DIST_DIR) \
exec_prefix=$(BIN_DIST_DIR) \
bindir=$(BIN_DIST_DIR)/bin/$(TARGETPLATFORM) \
libdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \
libexecdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \
datadir=$(BIN_DIST_DIR)/share; \
fi \
done
.PHONY: binary-dist-doc-%
BINARY_DIST_DOC_RULES=$(foreach d,$(BinDistDirs),binary-dist-doc-$d)
binary-dist :: $(BINARY_DIST_DOC_RULES)
$(BINARY_DIST_DOC_RULES): binary-dist-doc-%:
$(MAKE) -C $* $(MFLAGS) $(BINDIST_DOC_WAYS)
$(MAKE) -C $* $(MFLAGS) install-docs \
XMLDocWays="$(BINDIST_DOC_WAYS)" \
prefix=$(BIN_DIST_DIR) \
exec_prefix=$(BIN_DIST_DIR) \
bindir=$(BIN_DIST_DIR)/bin/$(TARGETPLATFORM) \
libdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \
libexecdir=$(BIN_DIST_DIR)/lib/$(TARGETPLATFORM) \
datadir=$(BIN_DIST_DIR)/share
endif
# Rename scripts to $i.prl and $i.sh where necessary.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment