questions about writing a recipe
Dear all, I'm writing a recipe and come up with a question.I want to invoke the the workdir of package A in my recipe of package B. I tried to use the variable WORKDIR,but it represent for the workdir of B in the recipe of package B. So is there any good ideas about this ? Best wishes! ---------------------Liu
Hello Liu,
Quoted 4 lines · Liu
I'm writing a recipe and come up with a question.I want to invoke
the the workdir of package A in my recipe of package B. I tried to use the variable WORKDIR,but it represent for the workdir of B in the recipe of package B. So is there any good ideas about this ?
Basically, you are trying to use a variable from one recipe in another recipe. I guess, there is no direct way of doing this. However, you can echo the ${WORKDIR} of recipe A to a file inside the ${STAGING_DIR} and then read the contents in recipe B. But, you should make sure that the recipe B gets executed after recipe A.
Also remember, if you have specified INHERIT = "rm_work" in your local.conf then the work dir will be removed after the tasks of a package are completed.
IMHO, depending on files from another package's workdir is a bad idea.
Signature · 3 lines
Joshua Immanuel HiPro IT Solutions Private Limited http://hipro.co.in
Quoted 11 lines · Joshua Immanuel
Hello Liu,
Quoted 4 lines · Liu
I'm writing a recipe and come up with a question.I want to invoke
the the workdir of package A in my recipe of package B. I tried to use the variable WORKDIR,but it represent for the workdir of B in the recipe of package B. So is there any good ideas about this ?IMHO, depending on files from another package's workdir is a bad idea.
I agree with this -- it's not a good idea to depend on files from another package's workdir. If you're needing headers or libraries, you should be installing those headers or objects to the sysroot and then getting them from there.
Kind regards,
Jerrod