summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBLanguageHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBLanguageHelper.java')
-rw-r--r--plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBLanguageHelper.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBLanguageHelper.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBLanguageHelper.java
new file mode 100644
index 0000000..8ebe134
--- /dev/null
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBLanguageHelper.java
@@ -0,0 +1,62 @@
1/*****************************************************************************
2 * Copyright (c) 2009 Ken Gilmer
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Ken Gilmer - initial API and implementation
10 * Lianhao Lu (Intel) - add more bitbake keywords and functions
11 *******************************************************************************/
12package org.yocto.bc.bitbake;
13
14import java.util.Comparator;
15import java.util.Map;
16import java.util.TreeMap;
17
18/**
19 * Here is where all BitBake-related information is centralized.
20 * @author kgilmer
21 *
22 */
23public class BBLanguageHelper {
24
25 public static final String[] BITBAKE_KEYWORDS = new String[] { "inherit", "require", "export", "addtask", "python", "include", "fakeroot", "addhandler", "def"};
26 public static final String[] SHELL_KEYWORDS = new String[] { "while", "do", "if", "fi", "ln", "export", "install", "oe_libinstall", "for", "in", "done", "echo", "then", "cat", "rm", "rmdir", "mkdir", "printf", "exit", "test", "cd", "cp"};
27 public static final String[] BITBAKE_STANDARD_FUNCTIONS = new String[] { "fetch", "unpack", "patch", "configure", "compile", "install", "populate_sysroot", "package"};
28 public static final String BITBAKE_RECIPE_FILE_EXTENSION = "bb";
29
30 /**
31 * @return A map of names and descriptions of commonly used BitBake variables.
32 */
33 public static Map<String, String> getCommonBitbakeVariables() {
34 Map<String, String> m = new TreeMap<String, String>(new Comparator<Object>() {
35
36 public int compare(Object o1, Object o2) {
37
38 return ((String) o1).compareTo(((String) o2));
39 }
40
41 });
42
43 m.put("SECTION", "Category of package");
44 m.put("PR", "Package Release Number");
45 m.put("SRC_URI", "Location of package sources");
46 m.put("DESCRIPTION", "Description of package");
47 m.put("EXTRA_OEMAKE", "Extra flags to pass to the package makefile");
48 m.put("EXTRA_OECONF", "Extra configuration flags for the package makefile");
49 m.put("DEPENDS", "The set of build-time dependent packages");
50 m.put("RDEPENDS", "The set of run-time dependent packages");
51 m.put("HOMEPAGE", "Homepage of the package");
52 m.put("LICENSE", "License of the package");
53 m.put("FILES_${PN}", "Full file path of files on target.");
54 m.put("S", "Package source directory");
55 m.put("PV", "Package version");
56 m.put("AUTHOR", "Author or maintainer of package");
57 m.put("PRIORITY", "Priority of package");
58
59 return m;
60 }
61
62}