PageRenderTime 18ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/Console/console/commands/make.xml

#
XML | 65 lines | 51 code | 9 blank | 5 comment | 0 complexity | a2e1a147a3a53edc1982bafdec090463 MD5 | raw file
 1<?xml version="1.0" ?>
 2
 3<!-- Attempt at invoking make from the current buffer's directory -->
 4<!--  Jeff Jackowski (http://ro.com/~jeffj), Jan 22, 2004 -->
 5
 6<!DOCTYPE COMMANDO SYSTEM "commando.dtd">
 7
 8<COMMANDO>
 9	<UI>
10    		<ENTRY LABEL="Rule name" VARNAME="ruleName"
11			DEFAULT="" />
12       
13        <CHOICE LABEL="Make in" VARNAME="makeIn" DEFAULT="projectroot">
14            <OPTION LABEL="Project Root" VALUE="projectroot" />
15            <OPTION LABEL="Source Dir" VALUE="sourcedir" />
16            <OPTION LABEL="Custom Location" VALUE="customloc" />
17        </CHOICE>
18
19        <DIR_ENTRY LABEL="Source Dir" 
20         VARNAME = "sourcedir"
21         EVAL = 'new File(buffer.getPath()).getParent()' />    
22		<!-- <CAPTION LABEL="Config"> -->
23        <DIR_ENTRY LABEL="Project Root" 
24         VARNAME = "projectroot"
25         EVAL = 'getProjectRoot(view, buffer)' />
26         <DIR_ENTRY LABEL="Custom Location" VARNAME = "customlocation" />         
27
28		<ENTRY LABEL="Makefile if not default" VARNAME="makefile"
29			DEFAULT="" />
30		<ENTRY LABEL="Path to make" VARNAME="makePath"
31			DEFAULT="make" />
32			
33		<!-- </CAPTION> -->
34
35		<!-- <TOGGLE LABEL="Generate debug info" VARNAME="debug" /> -->
36	</UI>
37
38	<COMMANDS>
39		<COMMAND CONFIRM="FALSE" SHELL="System">
40        if (makeIn.equals("projectroot")) {
41            location = projectroot;
42        }
43        else if (makeIn.equals("customloc")) {
44            location = customlocation;
45        }
46        else location=sourcedir;
47		return "cd \"" + location +"\"";
48		</COMMAND>
49		<COMMAND SHELL="System" CONFIRM="FALSE">
50			buf = new StringBuffer();
51			buf.append(makePath);
52			buf.append(" ");
53			if (makefile.length() > 0) {
54				buf.append("-f ");
55				buf.append(makefile);
56				buf.append(" ");
57			}
58			if (ruleName.length() > 0) {
59				buf.append(ruleName);
60			}
61			// return value
62			buf.toString();
63		</COMMAND>
64	</COMMANDS>
65</COMMANDO>