annotate doc/interpreter/images.awk @ 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 0d4613a736e9
children 955035efb929
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 BEGIN {
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 exts[1] = "eps";
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 exts[2] = "pdf";
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 exts[3] = "png";
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 exts[4] = "txt";
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 printf ("IMAGES_SRC =\n");
9910
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
7 printf ("HTMLDIR_IMAGES =\n");
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 for (i = 1; i <= 4; i++) {
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 printf ("IMAGES_%s =\n", toupper (exts[i]));
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 }
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 } {
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 script = $1;
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 basename = script;
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 sub (/\.m$/, "", basename);
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 ubasename = toupper (basename);
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 printf ("IMAGES_SRC += %s\n", script);
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 for (i = 1; i <= 4; i++) {
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18 ext = exts[i];
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 uext = toupper (ext);
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 printf ("%s_%s =", ubasename, uext);
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 for (j = 2; j <= NF; j++)
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 printf (" %s.%s", $j, ext);
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 printf ("\n");
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 printf ("IMAGES_%s += $(%s_%s)\n", uext, ubasename, uext);
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27
9910
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
28 if (ext == "png") {
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
29 printf ("HTMLDIR_IMAGES += ");
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
30 for (j = 2; j <= NF; j++)
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
31 printf (" octave.html/%s.png", $j);
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
32 printf ("\n");
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
33 }
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
34
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
35 for (j = 2; j <= NF; j++) {
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
36 if (ext == "png") {
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
37 printf ("octave.html/%s.png: %s.png octave.html\n", $j, $j);
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
38 printf ("\tcp $< $@\n");
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
39 }
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
40 printf ("%s.%s: %s\n", $j, ext, script);
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
41 printf ("\t$(TOPDIR)/run-octave -f -q -H -p $(srcdir) --eval \"%s ('%s', '%s');\"\n",
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
42 basename, $j, ext);
49b9cab70b63 make rules to copy png files to html directory
John W. Eaton <jwe@octave.org>
parents: 9794
diff changeset
43 }
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 }
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 }