Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How do I avoid references to absolute paths in the generated makefile? (for linked source files)
icon5.gif  How do I avoid references to absolute paths in the generated makefile? (for linked source files) [message #1148255] Mon, 21 October 2013 11:28 Go to next message
Harald Reingruber is currently offline Harald ReingruberFriend
Messages: 1
Registered: October 2013
Junior Member
Does the "Expand Env. Variable Refs in Makefiles" actually work? or do I misunderstand it's purpose?

Basically what I want to do is using the generated Makefile for building my source on a build server, and avoiding having to manually keeping the makefile and the eclipse project settings in sync.

I've added source files to my project as links to paths outside of my project/workspace root.

In the .project file it stores the links using eclipse environment variables like "PARENT-1-WORKSPACE_LOC", which was the default behavior. I think I have also tried referencing it relative to the project root, and finally I created a custom env variable.

The result is always the same, in the generated subdir.mk it always expands the environment variable to it's absolute location:

CPP_SRCS += \
/media/sf_sharedFolder/ProjectA/Source/Test.cpp \
/media/sf_sharedFolder/ProjectB/Source/Test.cpp \
...
(I changed the path names for this example)

I thought that maybe I could use the "Expand Env. Variable Refs in Makefiles" option to prevent Eclipse from expanding this environment variables, in order to define it differently on my build server.

Is this approach valid? Or can you recommend a different one?
Re: How do I avoid references to absolute paths in the generated makefile? (for linked source files) [message #1809658 is a reply to message #1148255] Fri, 19 July 2019 13:37 Go to previous message
Sebastian Fett is currently offline Sebastian FettFriend
Messages: 1
Registered: July 2019
Junior Member
Hi!

I have the exact same question and application and no answer, yet.

Is there anything new to say here?
Previous Topic:For community benefits
Next Topic:CDT Indexer is refusing to Index some files
Goto Forum:
  


Current Time: Sat Apr 27 05:19:18 GMT 2024

Powered by FUDForum. Page generated in 0.02913 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top