Andrew Overholt 05b43d
--- plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java.orig	2006-02-07 13:50:13.000000000 -0500
Andrew Overholt 05b43d
+++ plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java	2006-02-07 13:55:29.000000000 -0500
Andrew Overholt 05b43d
@@ -2405,6 +2405,28 @@
Andrew Overholt 05b43d
 			this.times = new long[this.repetitions];
Andrew Overholt 05b43d
 			this.timesCounter = 0;
Andrew Overholt 05b43d
 		}
Andrew Overholt 05b43d
+                {
Andrew Overholt 05b43d
+                       // If we're building an RPM, force full debugging info to
Andrew Overholt 05b43d
+                       // be generated, no matter what options have been passed
Andrew Overholt 05b43d
+                       // by Ant.  This is something of a kludge, but it is far
Andrew Overholt 05b43d
+                       // better than the alternative, which is having class
Andrew Overholt 05b43d
+                       // files with debug info mysteriously missing.
Andrew Overholt 05b43d
+
Andrew Overholt 05b43d
+                       String RpmPackageName = System.getenv("RPM_PACKAGE_NAME");
Andrew Overholt 05b43d
+                       String RpmArch = System.getenv("RPM_ARCH");
Andrew Overholt 05b43d
+                       String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT");
Andrew Overholt 05b43d
+                       if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) {
Andrew Overholt 05b43d
+                               this.options.put(
Andrew Overholt 05b43d
+                                   CompilerOptions.OPTION_LocalVariableAttribute,
Andrew Overholt 05b43d
+                                   CompilerOptions.GENERATE);
Andrew Overholt 05b43d
+                               this.options.put(
Andrew Overholt 05b43d
+                                   CompilerOptions.OPTION_LineNumberAttribute,
Andrew Overholt 05b43d
+                                   CompilerOptions.GENERATE);
Andrew Overholt 05b43d
+                               this.options.put(
Andrew Overholt 05b43d
+                                   CompilerOptions.OPTION_SourceFileAttribute,
Andrew Overholt 05b43d
+                                   CompilerOptions.GENERATE);
Andrew Overholt 05b43d
+                       }
Andrew Overholt 05b43d
+                }
Andrew Overholt 05b43d
 	}
Andrew Overholt 05b43d
 
Andrew Overholt 05b43d
 	private void addNewEntry(final int InsideClasspath, final int InsideSourcepath, ArrayList bootclasspaths, ArrayList classpaths,ArrayList sourcepathClasspaths, String currentClasspathName, ArrayList currentRuleSpecs, int mode, String customEncoding) {