|Subject:||Exported path variable not working|
|Date:||Tue, 1 Apr 2003 20:47:29 -0800|
I’m using GNU make 3.80. I’m having a problem changing the path inside a makefile so that executed commands have the new path.
Microsoft’s cl compiler requires that mspdb70.dll be in the path. This DLL is located in %VCINSTALLDIR%/common7/ide. I’m trying to keep my PATH environment variable as small as possible in my normal shell so that directory is not in my path (and neither is the directory where cl is located).
Under cygwin, I was able to do this:
export PATH := $(PATH):$(shell cygpath $(VCINSTALLDIR)/common7/ide)
This updated path is exported to each shell that make invoked and cl works quite happily.
I’m attempting to remove the cygwin dependency and tools from our build system and use cmd as my shell instead. I want to keep using GNU make though. I find that the similar command to append %VCINSTALLDIR%/common7/ide to my path doesn’t seem to work. Now when make calls cl, I get a dialog box saying that the mspdb70 DLL could not be found.
Here’s my path line in the Win32 version:
export PATH := $(PATH);$(subst /,\,$(VCINSTALLDIR)/Common7/IDE)
If I echo the path as one of the commands make invokes when rebuilding the target, the common7/ide path is shown at the end, as expected. It’s as if the export command didn’t have any effect.
If I append %VCINSTALLDIR%/common7/ide to my path prior to starting make, it works fine.
Anyone have ideas on how I can make this work?
|[Prev in Thread]||Current Thread||[Next in Thread]|