Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [PATCH] Add a waf bitbake class.
@ 2010-06-18 19:58 Sean_Hudson
  2010-06-19  9:40 ` Koen Kooi
  0 siblings, 1 reply; 2+ messages in thread
From: Sean_Hudson @ 2010-06-18 19:58 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

Hi All,

  We are using waf for some of our modules and decided to add a class to make it easier to write recipes.

Regards,
Sean Hudson

[-- Attachment #2: waf.bbclass --]
[-- Type: application/octet-stream, Size: 813 bytes --]

# WAF project class.

DEPENDS += python

STAGE_TEMP="${WORKDIR}/temp-staging"
STAGE_TEMP_PREFIX = ""

# Conditionally set the verbose option.
# WAF_VERBOSE="-v"

waf_do_compile() {
	./waf ${WAF_VERBOSE} build 
}

waf_do_clean() {
	./waf ${WAF_VERBOSE} clean
}

waf_do_configure() {
	if [ -x ${S}/waf ]; then
		${S}/waf ${WAF_VERBOSE} configure --prefix=${prefix} ${EXTRA_OECONF} "$@"
	else
		oefatal "executable waf script not found"
	fi
}

waf_do_install() {
	./waf ${WAF_VERBOSE} install --destdir="${D}" "$@"
}

waf_stage_all() {
	./waf ${WAF_VERBOSE} install --destdir="${STAGE_TEMP}" 
	rm -rf ${STAGE_TEMP}/${mandir} || true
	rm -rf ${STAGE_TEMP}/${infodir} || true
	sysroot_stage_dirs ${STAGE_TEMP} ${STAGE_TEMP_PREFIX}
	rm -rf ${STAGE_TEMP}
}

EXPORT_FUNCTIONS do_compile do_clean do_configure do_install 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-19  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-18 19:58 [PATCH] Add a waf bitbake class Sean_Hudson
2010-06-19  9:40 ` Koen Kooi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox