Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » makefile-working with envirnoment variables(how to prevent visual replacement of path)
makefile-working with envirnoment variables [message #980899] Sun, 11 November 2012 21:43 Go to next message
Celine Chia is currently offline Celine Chia
Messages: 1
Registered: November 2012
Junior Member
Hi,

I have written a makefile. This makefile is to be checked into svn. I used environment variables for my project directory path so that different computers can run the makefile without having to make changes to it.

for example:
PRJ_ROOT_DIR := $(REF_DIR)/projectName/trunk/Temp
where environment variable REF_DIR is C:/Users/myName/Desktop.

However, by just building the project, makefile automatically changed to:
PRJ_ROOT_DIR := C:/Users/myName/Desktop/projectName/trunk/Temp

This shows up in SVN that makefile has been modified.

How do i do it such that makefile remains as
PRJ_ROOT_DIR := $(REF_DIR)/projectName/trunk/Temp? Where changes is done in the background and not showed up on the built makefile so that SVN will not detect the change?

Thank you.
Re: makefile-working with envirnoment variables [message #986528 is a reply to message #980899] Tue, 20 November 2012 13:12 Go to previous message
Robert Beers is currently offline Robert Beers
Messages: 1
Registered: November 2012
Junior Member
Did you try quoting the environment variable part,
maybe that will preserve it as a literal string
until the make command dereferences it?

PRJ_ROOT_DIR := "$(REF_DIR)"/projectName/trunk/Temp

-Bob
Previous Topic:Debugging Existing Opensource Project
Next Topic:gloabal variable
Goto Forum:
  


Current Time: Fri Aug 29 16:31:28 EDT 2014

Powered by FUDForum. Page generated in 0.01850 seconds