Pathnames in Makefiles [message #891887] |
Tue, 26 June 2012 12:41 |
|
I'm trying to figure out how to convince Eclipse/CDT to create "location independent" makefiles. No matter what I've tried it insists on fully resolving pathnames and storing that in the makefiles it generates. These are updated somewhere at the beginning of the Build process so building from withing Eclipse isn't a problem. Problems occur when I try to build using make in a shell script in a copy of the workspace in a different directory. Since all the variables in the path definitions have been expanded the make files only work in one place.
Sorry if this has been covered before but I spent all afternoon yesterday scanning the forum for clues. I'm probably not using the right terminology. I can't imagine I'm the first to ask this question.
|
|
|
|
Re: Pathnames in Makefiles [message #892246 is a reply to message #892021] |
Wed, 27 June 2012 13:39 |
|
Thanks! But ...
The first 3 bugs are all concerned with relative/absolute pathname issues and don't really help much.
The last was so close that I was drooling! But the solution was to go back to relative paths. Rats.
What I think I want to do (I can be re-educated) is to set things up so CDT uses variable names in it's makefiles instead of substituting the expanded values. That way the Makefiles generated are parameterized. So instead of generating
... -I"/home/dave/workspace/CoolApp/source/MagicInterface" ...
it would generate something like
PROJECT = CoolApp
WORKSPACE_LOC = /home/dave/workspace
PROJECT_LOC = $(WORKSPACE_LOC)/$(PROJECT)
.
.
... -I"$(PROJECT_LOC)/source/MagicInterface"
or something. I tried unchecking the "Expand Env. Variables in Makefiles" check box but it didn't seem to help
|
|
|
Powered by
FUDForum. Page generated in 0.03539 seconds