changeset 9910:49b9cab70b63

make rules to copy png files to html directory
author John W. Eaton <jwe@octave.org>
date Fri, 04 Dec 2009 05:04:59 -0500
parents f8a5863ae243
children ac7606d51a3d
files doc/ChangeLog doc/interpreter/Makefile.am doc/interpreter/images.awk
diffstat 3 files changed, 31 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog	Fri Dec 04 03:22:26 2009 -0500
+++ b/doc/ChangeLog	Fri Dec 04 05:04:59 2009 -0500
@@ -1,3 +1,10 @@
+2009-12-04  John W. Eaton  <jwe@octave.org>
+
+	* interpreter/images.awk: Emit rules to copy PNG files to
+	octave.html directory once it is created.
+	* interpreter/Makefile.am (all-local): Depend on $(HTMLDIR_IMAGES).
+	(IMAGES): Include $(HTMLDIR_IMAGES) in the list.
+
 2009-12-04  John W. Eaton  <jwe@octave.org>
 
 	* interpreter/octave.texi: Include version.texi instead of conf.texi.
--- a/doc/interpreter/Makefile.am	Fri Dec 04 03:22:26 2009 -0500
+++ b/doc/interpreter/Makefile.am	Fri Dec 04 05:04:59 2009 -0500
@@ -82,7 +82,12 @@
 .eps.pdf:
 	if [ -f $< ] ; then $(GHOSTSCRIPT) -dBATCH -dEPSCrop -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ $< ; fi
 
-IMAGES = $(IMAGES_EPS) $(IMAGES_PDF) $(IMAGES_PNG) $(IMAGES_TXT)
+IMAGES = \
+  $(IMAGES_EPS) \
+  $(IMAGES_PDF) \
+  $(IMAGES_PNG) \
+  $(IMAGES_TXT) \
+  $(HTMLDIR_IMAGES)
 
 MUNGED_TEXI_SRC = \
   arith.texi \
@@ -152,7 +157,7 @@
 
 octave.pdf: $(IMAGES_PDF)
 
-all-local: dvi html pdf ps doc-cache
+all-local: dvi html pdf ps doc-cache $(HTMLDIR_IMAGES)
 
 # Install doc-cache of help files
 install-data-local:
--- a/doc/interpreter/images.awk	Fri Dec 04 03:22:26 2009 -0500
+++ b/doc/interpreter/images.awk	Fri Dec 04 05:04:59 2009 -0500
@@ -4,6 +4,7 @@
   exts[3] = "png";
   exts[4] = "txt";
   printf ("IMAGES_SRC =\n");
+  printf ("HTMLDIR_IMAGES =\n");
   for (i = 1; i <= 4; i++) {
     printf ("IMAGES_%s =\n", toupper (exts[i]));
   }
@@ -24,7 +25,21 @@
 
     printf ("IMAGES_%s += $(%s_%s)\n", uext, ubasename, uext);
 
-    for (j = 2; j <= NF; j++)
-      printf ("%s.%s: %s\n\t$(TOPDIR)/run-octave -f -q -H -p $(srcdir) --eval \"%s ('%s', '%s');\"\n", $j, ext, script, basename, $j, ext);
+    if (ext == "png") {
+      printf ("HTMLDIR_IMAGES += ");
+      for (j = 2; j <= NF; j++)
+        printf (" octave.html/%s.png", $j);
+      printf ("\n");
+    }
+
+    for (j = 2; j <= NF; j++) {
+      if (ext == "png") {
+	printf ("octave.html/%s.png: %s.png octave.html\n", $j, $j);
+	printf ("\tcp $< $@\n");
+      }
+      printf ("%s.%s: %s\n", $j, ext, script);
+      printf ("\t$(TOPDIR)/run-octave -f -q -H -p $(srcdir) --eval \"%s ('%s', '%s');\"\n",
+	      basename, $j, ext);
+    }
   }
 }