The R Project SVN R

Rev

Rev 7002 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7002 Rev 7133
Line 25... Line 25...
25
# Usage:  build-help [options]  [pkg] [lib]
25
# Usage:  build-help [options]  [pkg] [lib]
26
# Install all help files for package pkg to library lib
26
# Install all help files for package pkg to library lib
27
# (defaults are `${R_HOME}/src/library/base' and the default library,
27
# (defaults are `${R_HOME}/src/library/base' and the default library,
28
#  `${R_HOME}/library', respectively).
28
#  `${R_HOME}/library', respectively).
29
 
29
 
30
# This version: if pkg is not found, it is tried in $R_HOME/src/library.
-
 
31
 
-
 
32
use File::Basename;
30
use File::Basename;
33
use Cwd;
31
use Cwd;
34
use Getopt::Long;
32
use Getopt::Long;
35
 
33
 
36
fileparse_set_fstype; # Unix, in case one gets anything else.
34
fileparse_set_fstype; # Unix, in case one gets anything else.
37
$OSdir ="windows";
35
$OSdir = "windows";
38
 
36
 
39
 
37
 
40
@knownoptions = ("rhome:s", "html", "nroff", "latex", "example", "debug",
38
@knownoptions = ("rhome:s", "html", "nroff", "latex", "example", "debug",
41
		 "dosnames", "htmllists", "chm");
39
		 "dosnames", "htmllists", "chm");
42
GetOptions (@knownoptions) || usage();
40
GetOptions (@knownoptions) || usage();
Line 56... Line 54...
56
    $R_HOME=getcwd();
54
    $R_HOME=getcwd();
57
    print STDERR "R_HOME: `$R_HOME'\n" if $opt_debug;
55
    print STDERR "R_HOME: `$R_HOME'\n" if $opt_debug;
58
}
56
}
59
$R_HOME =~ s+\\+/+g; # Unix-style path
57
$R_HOME =~ s+\\+/+g; # Unix-style path
60
 
58
 
61
require "$R_HOME/src/gnuwin32/help/Rdconvlib.pl";
59
require "$R_HOME/etc/Rdconvlib.pl";
62
require "$R_HOME/src/gnuwin32/help/buildlib.pl";
60
require "$R_HOME/etc/buildlib.pl";
63
 
61
 
64
chdir($cwd);
62
chdir($cwd);
65
print STDERR "Current directory (cwd): '$cwd'\n" if $opt_debug;
63
print STDERR "Current directory (cwd): '$cwd'\n" if $opt_debug;
66
 
64
 
67
$tmpdir=$ENV{"TEMP"};
65
$tmpdir=$ENV{"TEMP"};
Line 251... Line 249...
251
    "Full-text search=Yes\n",
249
    "Full-text search=Yes\n",
252
    "Full text search stop list file=..\\..\\..\\gnuwin32\\help\\R.stp\n",
250
    "Full text search stop list file=..\\..\\..\\gnuwin32\\help\\R.stp\n",
253
    "\n\n[FILES]\n00Index.html\n";
251
    "\n\n[FILES]\n00Index.html\n";
254
}
252
}
255
 
253
 
-
 
254
 
-
 
255
sub build_chm_toc {
-
 
256
    open tocfile, ">../chm/$pkg.toc"
-
 
257
	|| die "Couldn't open the chm toc file";
-
 
258
    print tocfile
-
 
259
	"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n",
-
 
260
	"<HEAD></HEAD><HTML><BODY>\n<UL>\n";
-
 
261
    print tocfile
-
 
262
	"<LI> <OBJECT type=\"text/sitemap\">\n",
-
 
263
	"<param name=\"Name\" value=\"Package $pkg:  Contents\">\n",
-
 
264
	"<param name=\"Local\" value=\"00Index.html\">\n",
-
 
265
	"</OBJECT>\n";
-
 
266
    print tocfile
-
 
267
	"<LI> <OBJECT type=\"text/sitemap\">\n",
-
 
268
	"<param name=\"Name\" value=\"Package $pkg:  R objects\">\n",
-
 
269
	"</OBJECT>\n";
-
 
270
    print tocfile "<UL>\n";   # contents of a book
-
 
271
    foreach $alias (sort foldorder keys %aliasnm) {
-
 
272
	print tocfile
-
 
273
	    "<LI> <OBJECT type=\"text/sitemap\">\n",
-
 
274
	    "<param name=\"Name\" value=\"$alias\">\n",
-
 
275
	    "<param name=\"Local\" value=\"$aliasnm{$alias}.html\">\n",
-
 
276
	    "</OBJECT>\n";
-
 
277
    }
-
 
278
    print tocfile "</UL>\n";  # end of a book
-
 
279
    print tocfile
-
 
280
	"<LI> <OBJECT type=\"text/sitemap\">\n",
-
 
281
	"<param name=\"Name\" value=\"Package $pkg:  Titles\">\n",
-
 
282
	"</OBJECT>\n";
-
 
283
    print tocfile "<UL>\n";   # contents of a book
-
 
284
    foreach $title (sort foldorder keys %title2file) {
-
 
285
	print tocfile
-
 
286
	    "<LI> <OBJECT type=\"text/sitemap\">\n",
-
 
287
	    "<param name=\"Name\" value=\"$title\">\n",
-
 
288
	    "<param name=\"Local\" value=\"$title2file{$title}.html\">\n",
-
 
289
	    "</OBJECT>\n";
-
 
290
    }
-
 
291
    print tocfile "</UL>\n";  # end of a book
-
 
292
    print tocfile "</UL>\n</BODY></HTML>\n";
-
 
293
    close tocfile;
-
 
294
}
-
 
295