Need echo string output to variable in .mk file

ngmns86

New Member
Joined
Apr 11, 2020
Messages
3
Reaction score
2
Credits
0
I'm beginner in .mk files.
xyz.mk file is there in one of bundled package ,need some small changes in our requirement.
that why we trying to do string operation.

Want to redirect echo output to variable and its not at all working and following string comparison have to do.
this is giving proper output.
echo "$$($$(VEN)_NAME) $$($$(VEN)_VERSION)" >>>>>HELLOWORLD_x-y-z
TEMP_VAR="HELLOWORLD_x-y-z"
echo "********$$TEMP_VAR***" ---->giving ********HELLOWORLD_x-y-z*** on console.

but i tried below things not at all working.

$$temp=`(echo "$$($$(VEN)_NAME) $$($$(VEN)_VERSION)")`\
temp=`(echo "$$($$(VEN)_NAME) $$($$(VEN)_VERSION)")`\
$$temp=`(echo "$$($$(VEN)_NAME) $$($$(VEN)_VERSION)");\


Kindly let me know,i am not able to store content (echo string output ) in temp and help me to do string compare operation for TEMP_VAR & temp.
 


Do you need to use echo at all?
Can't you simply do this?:
Code:
temp="$$($$(VEN)_NAME) $$($$(VEN)_VERSION)"
And if you need to see the result echoed - echo it after it's been stored in temp.....
 
Thank you for your help.
i did the same.
temp="$$($$(VEN)_NAME) $$($$(VEN)_VERSION)";\
then
echo "$$$$temp";\ --> Got printed.
echo "Checking:$$(PKG_FILE)";\ --> Got printed.
Now i want to compare two strings using ifeq.
got error when i use .mk file.
>>>/bin/sh: -c: line 0: syntax error near unexpected token `"$temp",""pkg.tar.gz""'

in .mk file
**********
ifeq ("$$$$temp","$$(PKG_FILE)") --> Something doing wrong here. ?


Thanks,
Saravanan.
 
Wouldn't this be more appropriate?
Code:
ifeq("$$(temp)","$$(PKG_FILE)")
 

Members online


Latest posts

Top