diff options
Diffstat (limited to 'meta/classes/cml1.bbclass')
-rw-r--r-- | meta/classes/cml1.bbclass | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass new file mode 100644 index 0000000000..bb9563948c --- /dev/null +++ b/meta/classes/cml1.bbclass | |||
@@ -0,0 +1,40 @@ | |||
1 | cml1_do_configure() { | ||
2 | set -e | ||
3 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
4 | oe_runmake oldconfig | ||
5 | } | ||
6 | |||
7 | EXPORT_FUNCTIONS do_configure | ||
8 | addtask configure after do_unpack do_patch before do_compile | ||
9 | |||
10 | inherit terminal | ||
11 | |||
12 | OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES TERMINFO" | ||
13 | HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}" | ||
14 | HOSTLDFLAGS = "${BUILD_LDFLAGS}" | ||
15 | HOST_LOADLIBES = "-lncurses" | ||
16 | TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo" | ||
17 | |||
18 | python do_menuconfig() { | ||
19 | try: | ||
20 | mtime = os.path.getmtime(".config") | ||
21 | except OSError: | ||
22 | mtime = 0 | ||
23 | |||
24 | oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d) | ||
25 | |||
26 | # FIXME this check can be removed when the minimum bitbake version has been bumped | ||
27 | if hasattr(bb.build, 'write_taint'): | ||
28 | try: | ||
29 | newmtime = os.path.getmtime(".config") | ||
30 | except OSError: | ||
31 | newmtime = 0 | ||
32 | |||
33 | if newmtime > mtime: | ||
34 | bb.note("Configuration changed, recompile will be forced") | ||
35 | bb.build.write_taint('do_compile', d) | ||
36 | } | ||
37 | do_menuconfig[depends] += "ncurses-native:do_populate_sysroot" | ||
38 | do_menuconfig[nostamp] = "1" | ||
39 | addtask menuconfig after do_configure | ||
40 | |||