hello,

I'm trying to compile an opensource code. When I execute the main Makefile I encounter different errors, I've discovered that their source is is a script named buildFS which is called by the Makefile like this

Code:
sudo --command="cd $(TARGETS_DIR); ./buildFS"
the problem is that the variables which were defined and exported in the makefile are not seen in the scritp. By the other hand if I take away the sudo command it does see the variables but I can't do that because then I would need to calle the makefile from root.

does anybody know why this happens?