1/* Definitions for specs for the GNU compiler for the Java(TM) language.
2   Copyright (C) 1996-2015 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3.  If not see
18<http://www.gnu.org/licenses/>.
19
20Java and all Java-based marks are trademarks or registered trademarks
21of Sun Microsystems, Inc. in the United States and other countries.
22The Free Software Foundation is independent of Sun Microsystems, Inc.  */
23
24/* This is the contribution to the `default_compilers' array in gcc.c for
25   Java.  */
26
27  {".java",   "@java" , 0, 0, 0},
28  {".class",  "@java" , 0, 0, 0},
29  {".zip",    "@java" , 0, 0, 0},
30  {".jar",    "@java" , 0, 0, 0},
31  {"@java",
32   "%{fjni:%{femit-class-files:%e-fjni and -femit-class-files are incompatible}}\
33    %{fjni:%{femit-class-file:%e-fjni and -femit-class-file are incompatible}}\
34    %{femit-class-file:%{!fsyntax-only:%e-femit-class-file should used along with -fsyntax-only}}\
35    %{femit-class-files:%{!fsyntax-only:%e-femit-class-file should used along with -fsyntax-only}}\
36    %{E:%{e-E is not valid for gcj}}\
37    %{.java|fsaw-java-file:ecj1 %i %{W*} %{w} %{g*}			\
38      %{fbootclasspath*}						\
39      %{fenable-assertions*}						\
40      %{fdisable-assertions*}						\
41      %{fencoding*} %{ffilelist-file}					\
42      %{foutput-class-dir*} %{g*}					\
43      %{fsource*} %{!fsource*:-fsource=1.5}				\
44      %{ftarget*} %{!femit-class-files|!ftarget*:-ftarget=1.5}		\
45      %{!findirect-dispatch:-fzip-dependency %U.zip}			\
46      %{!fsyntax-only:-fzip-target %U.jar}}\n				\
47    %{.class|.zip|.jar|!fsyntax-only:jc1				\
48      %{.java|fsaw-java-file:%U.jar -fsource-filename=%i %<ffilelist-file} \
49      %{.class|.zip|.jar|ffilelist-file|fcompile-resource*:%i}		\
50      %(jc1) %(cc1_options) %{I*} %{!findirect-dispatch:-faux-classpath %U.zip} \
51      %{MD:-MD_} %{MMD:-MMD_} %{M} %{MM} %{MA} %{MT*} %{MF*}\
52      %(invoke_as)}",
53      0, 0, 0},
54
55  /*
56    FIXME: we don't use %|, even though we could, because we need the
57    dependency zip to be ready early enough.  We could work around
58    this by not having a dependency zip and instead teaching jc1 to
59    read a special manifest file included in the sole zip, this
60    manifest would say which files are to be compiled and which are
61    not.
62   */
63