Commit db444fbe by Nic Ferrier

gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option `--CLASSPATH' becomes...

	* gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
 	`--CLASSPATH' becomes `--classpath.'
        * gjavah.c: Likewise.
        * jcf-dump.c: Likewise.
        * lang-options.h: Likewise.
        * lang.c: Likewise.
        * jcf-path.c: Updated comment.
        (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
        (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
        * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
        (jcf_path_CLASSPATH_arg): Ditto.
        (classpath_u): Updated leading comment.

From-SVN: r49918
parent 3704ef74
......@@ -141,7 +141,7 @@ files and object files, and it can read both Java source code and
@ignore
@c man begin SYNOPSIS gcj
gcj [@option{-I}@var{dir}@dots{}] [@option{-d} @var{dir}@dots{}]
[@option{--classpath}=@var{path}] [@option{--CLASSPATH}=@var{path}]
[@option{--CLASSPATH}=@var{path}] [@option{--classpath}=@var{path}]
[@option{-f}@var{option}@dots{}] [@option{--encoding}=@var{name}]
[@option{--main}=@var{classname}] [@option{-D}@var{name}[=@var{value}]@dots{}]
[@option{-C}] [@option{-R} @var{resource-name}] [@option{-d} @var{directory}]
......@@ -240,11 +240,12 @@ compatibility with tools like @code{javac} is imported, we recommend
always using @code{-I} instead of the other options for manipulating the
class path.
@item --classpath=@var{path}
@item --CLASSPATH=@var{path}
This sets the class path to @var{path}, a colon-separated list of paths
(on Windows-based systems, a semicolon-separate list of paths).
(on Windows-based systems, a semicolon-separate list of paths). Using
this option causes the built in path to be suppressed.
@item --CLASSPATH=@var{path}
@item --classpath=@var{path}
This sets the class path to @var{path}, a colon-separated list of paths
(on Windows-based systems, a semicolon-separate list of paths). This
differs from the @code{--classpath} option in that it does not suppress
......@@ -261,17 +262,18 @@ The final class path is constructed like so:
First come all directories specified via @code{-I}.
@item
If @code{--classpath} is specified, its value is appended and processing
stops. That is, @code{--classpath} suppresses all the options mentioned
If @option{--CLASSPATH} is specified, its value is appended and processing
stops. That is, @option{--CLASSPATH} suppresses all the options mentioned
later in this list.
@item
If @code{--CLASSPATH} is specified, its value is appended and the
If @option{--classpath} is specified, its value is appended and the
@code{CLASSPATH} environment variable is suppressed.
@item
If the @code{CLASSPATH} environment variable is specified (and was not
suppressed by @code{--CLASSPATH}), then its value is appended.
suppressed by @option{--classpath} or @option{--CLASSPATH}), then its
value is appended.
@item
Finally, the built-in system directory, @file{libgcj.jar}, is appended.
......
......@@ -2158,8 +2158,9 @@ help ()
printf (" -friend TEXT Insert TEXT as `friend' declaration\n");
printf (" -prepend TEXT Insert TEXT before start of class\n");
printf ("\n");
printf (" --CLASSPATH PATH Set path to find .class files, overriding\n\
built-in class path\n");
printf (" --classpath PATH Set path to find .class files\n");
printf (" --CLASSPATH PATH Set path to find .class files\n");
printf (" -IDIR Append directory to class path\n");
printf (" -d DIRECTORY Set output directory name\n");
printf (" -o FILE Set output file name\n");
......
......@@ -806,8 +806,9 @@ help ()
printf (" -c Disassemble method bodies\n");
printf (" --javap Generate output in `javap' format\n");
printf ("\n");
printf (" --CLASSPATH PATH Set path to find .class files, overriding\n\
built-in class path\n");
printf (" --classpath PATH Set path to find .class files\n");
printf (" --CLASSPATH PATH Set path to find .class files\n");
printf (" -IDIR Append directory to class path\n");
printf (" -o FILE Set output file name\n");
printf ("\n");
......
......@@ -71,8 +71,8 @@ static void add_path PARAMS ((struct entry **, const char *, int));
built-in system directory (only libgcj.jar)
CLASSPATH environment variable
-CLASSPATH overrides CLASSPATH
-classpath option - overrides CLASSPATH, -CLASSPATH, and built-in
-classpath option overrides $CLASSPATH
-CLASSPATH option overrides $CLASSPATH, -classpath, and built-in
-I prepends path to list
We implement this by keeping several path lists, and then simply
......@@ -84,10 +84,10 @@ static struct entry *include_dirs;
/* This holds the CLASSPATH environment variable. */
static struct entry *classpath_env;
/* This holds the -CLASSPATH command-line option. */
/* This holds the -classpath command-line option. */
static struct entry *classpath_u;
/* This holds the -classpath command-line option. */
/* This holds the -CLASSPATH command-line option. */
static struct entry *classpath_l;
/* This holds the default directories. Some of these will have the
......@@ -284,18 +284,23 @@ jcf_path_init ()
add_path (&classpath_env, cp, 0);
}
/* Call this when -classpath is seen on the command line. */
/* Call this when -CLASSPATH is seen on the command line.
This is the override-all switch, even the built in classes
are overridden.
*/
void
jcf_path_classpath_arg (path)
jcf_path_CLASSPATH_arg (path)
const char *path;
{
free_entry (&classpath_l);
add_path (&classpath_l, path, 0);
}
/* Call this when -CLASSPATH is seen on the command line. */
/* Call this when -classpath is seen on the command line.
This overrides only the $CLASSPATH environment variable.
*/
void
jcf_path_CLASSPATH_arg (path)
jcf_path_classpath_arg (path)
const char *path;
{
free_entry (&classpath_u);
......
......@@ -271,8 +271,8 @@ extern void jcf_dependency_print_dummies PARAMS ((void));
/* Declarations for path handling code. */
extern void jcf_path_init PARAMS ((void));
extern void jcf_path_classpath_arg PARAMS ((const char *));
extern void jcf_path_CLASSPATH_arg PARAMS ((const char *));
extern void jcf_path_classpath_arg PARAMS ((const char *));
extern void jcf_path_include_arg PARAMS ((const char *));
extern void jcf_path_seal PARAMS ((int));
extern void *jcf_path_start PARAMS ((void));
......
......@@ -32,9 +32,9 @@ DEFINE_LANG_NAME ("Java")
N_("Disable automatic array bounds checking") },
{ "-fjni",
N_("Assume native functions are implemented using JNI") },
{ "--classpath",
N_("Set class path and suppress system path") },
{ "--CLASSPATH",
N_("Set class path and suppress system path") },
{ "--classpath",
N_("Set class path") },
{ "--main",
N_("Choose class whose main method should be used") },
......
......@@ -299,17 +299,17 @@ java_decode_option (argc, argv)
return 1;
}
#undef CLARG
#define CLARG "-fclasspath="
#define CLARG "-fCLASSPATH="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
jcf_path_CLASSPATH_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
#define CLARG "-fCLASSPATH="
#define CLARG "-fclasspath="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_CLASSPATH_arg (p + sizeof (CLARG) - 1);
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment