On Sat, Oct 3, 2009 at 4:31 PM, Francis Galiegue <[email protected]> wrote:
[...]
>
> Here it is. Tested, compiled and run with. It takes 10 minutes to
> compile everything with this patch and MAKEOPTS set to -j4, as opposed
> to nearly 40 before. Patch is on top of my 4.5.2 branch, will make a
> merge request for it as well on a "make-j" branch.
>
> ----
> diff --git a/com/trolltech/tools/ant/MakeTask.java
> b/com/trolltech/tools/ant/MakeTask.java
> index fe8af55..0539068 100755
> --- a/com/trolltech/tools/ant/MakeTask.java
> +++ b/com/trolltech/tools/ant/MakeTask.java
> @@ -78,6 +78,14 @@ public class MakeTask extends Task {
>         if (silent && OSInfo.os() != OSInfo.OS.Windows)
>             arguments += " -s";
>
> +        try {
> +            arguments += " " + System.getenv("MAKEOPTS");
> +        } catch (SecurityException e) {
> +            System.err.println("Cannot read system properties! Hope
> it's OK...");
> +        } catch (NullPointerException e) {
> +            // Cannot happen
> +        }
> +
>         String command = compilerName() + arguments + " " + target;
>         Util.exec(command, new File(dir));
>     }
> ----
>

Argh, forget this one, it's flawed.

This one is better:

----
diff --git a/com/trolltech/tools/ant/MakeTask.java
b/com/trolltech/tools/ant/MakeTask.java
index fe8af55..1b0df50 100755
--- a/com/trolltech/tools/ant/MakeTask.java
+++ b/com/trolltech/tools/ant/MakeTask.java
@@ -78,6 +78,16 @@ public class MakeTask extends Task {
         if (silent && OSInfo.os() != OSInfo.OS.Windows)
             arguments += " -s";

+        try {
+            final String makeOptions = System.getenv("MAKEOPTS");
+            if (makeOptions != null)
+                arguments += " " + System.getenv("MAKEOPTS");
+        } catch (SecurityException e) {
+            System.err.println("Cannot read system properties! Hope
it's OK...");
+        } catch (NullPointerException e) {
+            // Cannot happen
+        }
+
         String command = compilerName() + arguments + " " + target;
         Util.exec(command, new File(dir));
     }
----


-- 
Francis Galiegue, [email protected]
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to