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
This commit is contained in:
Nic Ferrier 2002-02-20 23:12:25 +00:00
parent 3704ef744f
commit db444fbe8e
7 changed files with 83 additions and 74 deletions

View File

@ -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,12 +240,13 @@ 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}
This sets the class path to @var{path}, a colon-separated list of paths
(on Windows-based systems, a semicolon-separate list of paths).
@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). Using
this option causes the built in path to be suppressed.
@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
the built-in system path.
@ -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.

View File

@ -2101,41 +2101,41 @@ DEFUN(process_file, (jcf, out),
/* This is used to mark options with no short value. */
#define LONG_OPT(Num) ((Num) + 128)
#define OPT_classpath LONG_OPT (0)
#define OPT_CLASSPATH LONG_OPT (1)
#define OPT_HELP LONG_OPT (2)
#define OPT_TEMP LONG_OPT (3)
#define OPT_VERSION LONG_OPT (4)
#define OPT_PREPEND LONG_OPT (5)
#define OPT_FRIEND LONG_OPT (6)
#define OPT_ADD LONG_OPT (7)
#define OPT_APPEND LONG_OPT (8)
#define OPT_M LONG_OPT (9)
#define OPT_MM LONG_OPT (10)
#define OPT_MG LONG_OPT (11)
#define OPT_MD LONG_OPT (12)
#define OPT_MMD LONG_OPT (13)
#define OPT_classpath LONG_OPT (0)
#define OPT_CLASSPATH LONG_OPT (1)
#define OPT_HELP LONG_OPT (2)
#define OPT_TEMP LONG_OPT (3)
#define OPT_VERSION LONG_OPT (4)
#define OPT_PREPEND LONG_OPT (5)
#define OPT_FRIEND LONG_OPT (6)
#define OPT_ADD LONG_OPT (7)
#define OPT_APPEND LONG_OPT (8)
#define OPT_M LONG_OPT (9)
#define OPT_MM LONG_OPT (10)
#define OPT_MG LONG_OPT (11)
#define OPT_MD LONG_OPT (12)
#define OPT_MMD LONG_OPT (13)
static const struct option options[] =
{
{ "classpath", required_argument, NULL, OPT_classpath },
{ "CLASSPATH", required_argument, NULL, OPT_CLASSPATH },
{ "help", no_argument, NULL, OPT_HELP },
{ "stubs", no_argument, &stubs, 1 },
{ "td", required_argument, NULL, OPT_TEMP },
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, OPT_VERSION },
{ "prepend", required_argument, NULL, OPT_PREPEND },
{ "friend", required_argument, NULL, OPT_FRIEND },
{ "add", required_argument, NULL, OPT_ADD },
{ "append", required_argument, NULL, OPT_APPEND },
{ "M", no_argument, NULL, OPT_M },
{ "MM", no_argument, NULL, OPT_MM },
{ "MG", no_argument, NULL, OPT_MG },
{ "MD", no_argument, NULL, OPT_MD },
{ "MMD", no_argument, NULL, OPT_MMD },
{ "jni", no_argument, &flag_jni, 1 },
{ NULL, no_argument, NULL, 0 }
{ "classpath", required_argument, NULL, OPT_classpath },
{ "CLASSPATH", required_argument, NULL, OPT_CLASSPATH },
{ "help", no_argument, NULL, OPT_HELP },
{ "stubs", no_argument, &stubs, 1 },
{ "td", required_argument, NULL, OPT_TEMP },
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, OPT_VERSION },
{ "prepend", required_argument, NULL, OPT_PREPEND },
{ "friend", required_argument, NULL, OPT_FRIEND },
{ "add", required_argument, NULL, OPT_ADD },
{ "append", required_argument, NULL, OPT_APPEND },
{ "M", no_argument, NULL, OPT_M },
{ "MM", no_argument, NULL, OPT_MM },
{ "MG", no_argument, NULL, OPT_MG },
{ "MD", no_argument, NULL, OPT_MD },
{ "MMD", no_argument, NULL, OPT_MMD },
{ "jni", no_argument, &flag_jni, 1 },
{ NULL, no_argument, NULL, 0 }
};
static void
@ -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");

View File

@ -773,22 +773,22 @@ DEFUN(process_class, (jcf),
/* This is used to mark options with no short value. */
#define LONG_OPT(Num) ((Num) + 128)
#define OPT_classpath LONG_OPT (0)
#define OPT_CLASSPATH LONG_OPT (1)
#define OPT_HELP LONG_OPT (2)
#define OPT_VERSION LONG_OPT (3)
#define OPT_JAVAP LONG_OPT (4)
#define OPT_classpath LONG_OPT (0)
#define OPT_CLASSPATH LONG_OPT (1)
#define OPT_HELP LONG_OPT (2)
#define OPT_VERSION LONG_OPT (3)
#define OPT_JAVAP LONG_OPT (4)
static const struct option options[] =
{
{ "classpath", required_argument, NULL, OPT_classpath },
{ "CLASSPATH", required_argument, NULL, OPT_CLASSPATH },
{ "help", no_argument, NULL, OPT_HELP },
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, OPT_VERSION },
{ "javap", no_argument, NULL, OPT_JAVAP },
{ "print-main", no_argument, &flag_print_main, 1 },
{ NULL, no_argument, NULL, 0 }
{ "classpath", required_argument, NULL, OPT_classpath },
{ "CLASSPATH", required_argument, NULL, OPT_CLASSPATH },
{ "help", no_argument, NULL, OPT_HELP },
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, OPT_VERSION },
{ "javap", no_argument, NULL, OPT_JAVAP },
{ "print-main", no_argument, &flag_print_main, 1 },
{ NULL, no_argument, NULL, 0 }
};
static void
@ -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");

View File

@ -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);

View File

@ -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));

View File

@ -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") },

View File

@ -299,19 +299,19 @@ java_decode_option (argc, argv)
return 1;
}
#undef CLARG
#define CLARG "-fclasspath="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
#define CLARG "-fCLASSPATH="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_CLASSPATH_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
#define CLARG "-fclasspath="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
else if (strncmp (p, "-I", 2) == 0)
{