From 40ba9488141a136d39e050e6723eb56b2a7a28a8 Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Thu, 20 Jan 2000 15:42:56 +0000
Subject: [PATCH] [project @ 2000-01-20 15:42:56 by simonmar] Fairly grotesque
 hacks to get the HTML docs, which are now generated into a subdirectory by
 db2html, into a binary dist.

---
 Makefile | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 9240a112a343..efa863360e27 100644
--- a/Makefile
+++ b/Makefile
@@ -129,12 +129,19 @@ binary-dist ::
 	   $(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 && \
-	     echo cp -f $$dir/*.$$way $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way && \
-	     cp -f $$dir/*.$$way $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way && \
+	     $(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; \
 	done
+	@rm -f .doclog
 
 # Rename scripts to $i.prl and $i.sh where necessary.
 # ToDo: do this in a cleaner way...
-- 
GitLab