Skip to main content
summaryrefslogtreecommitdiffstats
blob: 68ba211753a10c1a16ac049d90f464eeddc4a973 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*******************************************************************************
 * Copyright (c) 2000, 2005 QNX Software Systems and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     QNX Software Systems - Initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.make.core.makefile;

import java.io.File;
import java.io.IOException;


/**
 * ICommand
 * Commands are associated with a rule and executed by
 * the make program when building a target.
 */
public interface ICommand extends IDirective {
	
	final public static char HYPHEN = '-';

	final public static String HYPHEN_STRING = "-"; //$NON-NLS-1$

	final public static char AT = '@';

	final public static String AT_STRING = "@"; //$NON-NLS-1$

	final public static char PLUS = '+';

	final public static String PLUS_STRING = "+"; //$NON-NLS-1$

	final public static char TAB = '\t';

	/**
	 *   -    If the command prefix contains a hyphen, or the -i option is
	 * present, or the special target .IGNORE has either the current
	 * target as a prerequisite or has no prerequisites, any error
	 * found while executing the command will be ignored.
	 */
	boolean shouldIgnoreError();

	/**
	 * @    If the command prefix contains an at sign and the
	 * command-line -n option is not specified, or the -s option is
	 * present, or the special target .SILENT has either the current
	 * target as a prerequisite or has no prerequisites, the command
	 * will not be written to standard output before it is executed.
	 */
	boolean shouldBeSilent();

	/**
	 * +    If the command prefix contains a plus sign, this indicates a
	 * command line that will be executed even if -n, -q or -t is
	 * specified.
	 */
	boolean shouldExecute();


	/**
	 * Executes the command in a separate process with the
	 * specified environment and working directory.
	 *
	 */
	Process execute(String shell, String[] envp, File dir) throws IOException;
}

Back to the top