TreebuildConfig.java: implemented own caching
[treebuild.git] / main / PIBuild.java
blob46455242ec62715c207001a9d6fe556ab937ff15
2 package org.de.metux.treebuild.main;
4 import org.de.metux.util.Environment;
5 import org.de.metux.util.StrUtil;
6 import org.de.metux.unitool.base.*;
7 import org.de.metux.treebuild.base.*;
8 import org.de.metux.treebuild.parser.*;
9 import org.de.metux.treebuild.nodes.*;
10 import org.de.metux.propertylist.IPropertylist;
11 import org.de.metux.propertylist.EIllegalValue;
12 import org.de.metux.unitool.db.UnitoolConf;
13 import java.util.Properties;
14 import java.util.Enumeration;
15 import java.io.File;
17 public class PIBuild extends Command
19 public TreeBuilder builder;
21 public PIBuild(String[] args)
22 throws EParameterInvalid, EPIException
24 super(args);
25 String cf = get_str("config");
26 if (StrUtil.isEmpty(cf))
27 builder = new TreeBuilder();
28 else
29 builder = new TreeBuilder(new File(cf));
32 public boolean run()
33 throws EParameterMissing, EParameterInvalid, EInstallFailed,
34 EIllegalValue,
35 EDependencyMissing
37 PackageNode pkg = builder.loadPackage(
38 new File(get_str_mandatory("recipe")));
40 pkg.run_Configure();
41 pkg.run_Autodep();
42 pkg.run_Build();
43 pkg.run_Install();
45 return true;