- @for way in $(BINDIST_DOCS_WAYS); do \
- $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \
- for dir in $(BINDIST_DOCS); do \
- echo Making $$way documentation in $$dir && \
- $(MAKE) -C $$dir --no-print-directory $(MFLAGS) $$way >.doclog 2>&1 && \
- if [ "$$way" = "html" ]; then \
- for subdir in `perl -n -e '/output will be in ([_\-A-Za-z0-9]*)/ && do { print "$$1 "; };' <.doclog`; do \
- echo Copying HTML docs from $$subdir...; \
- cp -Rf $$dir/$$subdir $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \
- done \
- else \
- cp -f $$dir/*.$$way $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \
- fi && \
- echo "Done."; \
- done; \
+ @for i in $(BIN_DIST_DIRS); do \
+ if test -d "$$i"; then \
+ $(MAKE) -C $$i $(MFLAGS) $(BINDIST_DOC_WAYS); \
+ echo $(MAKE) -C $$i $(MFLAGS) install-docs SGMLDocWays="$(BINDIST_DOC_WAYS)" \
+ prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
+ exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
+ bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
+ libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
+ libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
+ datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
+ $(MAKE) -C $$i $(MFLAGS) install-docs SGMLDocWays="$(BINDIST_DOC_WAYS)" \
+ prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
+ exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
+ bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
+ libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
+ libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
+ datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
+ fi \