any point in defining classname_functionname() if not exporting it?
still in BB manual, section 3.5.6, "Flexible Inheritance for Class
Functions", that section makes perfect sense but it's not clear if there is any value to defining a function of the form classname_functionmame() if you're not going to export it with EXPORT_FUNCTIONS.
case in point -- cmake.bbclass. at bottom of file, we see some
perfectly reasonable exporting:
EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file
but if you grep, there is an additional function being defined of that form:
cmake_do_generate_toolchain_file() {cmake_do_configure() {cmake_runcmake_build() { <-- this onecmake_do_compile() {cmake_do_install() {
sure, that function is invoked internally in that class file, but without being exported, is there any reason that function has a "cmake_" prefix?
rday
p.s. the same thing occurs in go.bbclass, if that's of any interest.
Quoted 22 lines · Robert P. J. Day
still in BB manual, section 3.5.6, "Flexible Inheritance for Class
Functions", that section makes perfect sense but it's not clear if there is any value to defining a function of the formclassname_functionmame()if you're not going to export it withEXPORT_FUNCTIONS.case in point -- cmake.bbclass. at bottom of file, we see some
perfectly reasonable exporting:
EXPORT_FUNCTIONSdo_configuredo_compiledo_installdo_generate_toolchain_filebut if you grep, there is an additional function being defined of that
form:
cmake_do_generate_toolchain_file(){cmake_do_configure(){cmake_runcmake_build(){ <-- this onecmake_do_compile(){cmake_do_install(){
Quoted 3 lines
sure, that function is invoked internally in that class file, but without being exported, is there any reason that function has a "
cmake_" prefix?
It makes it clear it comes from the cmake class? Namespacing is useful even if EXPORT_FUNCTIONS isn't involved.
Cheers,
Richard