diff options
author | Tom Tromey <tromey@cygnus.com> | 1998-11-13 14:09:53 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1998-11-13 14:09:53 +0000 |
commit | df66b5660c1dc2f388b54d3d8d14951ead739edb (patch) | |
tree | 68a3d48319d95915e8d7750b2f010afd3c795f67 /gcc/java/jvspec.c | |
parent | bbeeb2b0201c839ffc6c66f0f472b88964387e63 (diff) | |
download | gcc-df66b5660c1dc2f388b54d3d8d14951ead739edb.zip gcc-df66b5660c1dc2f388b54d3d8d14951ead739edb.tar.gz gcc-df66b5660c1dc2f388b54d3d8d14951ead739edb.tar.bz2 |
gjavah.c (main): Handle --output-class-directory argument.
* gjavah.c (main): Handle --output-class-directory argument.
* jvspec.c (lang_specific_driver): Translate `-d' into
-foutput-class-dir.
* jcf.h (jcf_write_base_directory): Declare.
* lang.c (lang_decode_option): Recognize -foutput-class-dir.
* lang-options.h: Mention -foutput-class-dir.
* jcf-write.c (jcf_write_base_directory): New global.
(make_class_file_name): Put generated .class file into `-d'
directory, or into source directory if -d not given. Function now
static.
(write_classfile): Free class file name. Handle case where class
file name is NULL.
(DIR_SEPARATOR): New macro.
Include <sys/stat.h>
From-SVN: r23640
Diffstat (limited to 'gcc/java/jvspec.c')
-rw-r--r-- | gcc/java/jvspec.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c index ba17d09..325254d 100644 --- a/gcc/java/jvspec.c +++ b/gcc/java/jvspec.c @@ -302,6 +302,12 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) /* Remember this so we can confirm -fmain option. */ will_link = 0; } + else if (strcmp (argv[i], "-d") == 0) + { + /* `-d' option is for javac compatibility. */ + quote = argv[i]; + added -= 1; + } else /* Pass other options through. */ continue; @@ -404,6 +410,16 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) continue; } + if (strcmp (argv[i], "-d") == 0) + { + char *patharg = (char *) xmalloc (sizeof ("-foutput-class-dir=") + + strlen (argv[i + 1]) + 1); + sprintf (patharg, "-foutput-class-dir=%s", argv[i + 1]); + arglist[j] = patharg; + ++i; + continue; + } + if (strncmp (argv[i], "-fmain=", 7) == 0) { if (! will_link) |