Pelles C forum

Pelles C => Feature requests => Topic started by: Romashka on May 31, 2009, 06:30:29 PM

Title: Relative paths in .ppj
Post by: Romashka on May 31, 2009, 06:30:29 PM
When adding custom include/lib dirs to a project the path written to .ppj file by Pelles C IDE is not relative,
while every other path is either relative or uses $(...) macro.
Code: [Select]
INCLUDE = $(PellesCDir)\Include\Win;$(PellesCDir)\Include;E:\work\projects\foobar\sources#
LIB = $(PellesCDir)\Lib\Win;$(PellesCDir)\Lib;E:\work\projects\foobar\output-dll#

#
# Build test_events.exe.
#
output-tests\test_events.exe: \
    output-tests\test_events.obj
    $(LINK) $(LINKFLAGS) -out:"$@" $**

#
# Build test_events.obj.
#
output-tests\test_events.obj: \
    sources\tests\test_events.c \
    sources\foobar.h \
    . . .
    $(CC) $(CCFLAGS) "$!" -Fo"$@"

This is not good when you want to distribute .ppj files as part of your open source project
(because user's local build path most probably will not be E:\work\projects\foobar\).
Of course paths can be modified from Macros tab in Project options dialog, but that's annoying to do every time,
and I don't see a problem with changing the default behaviour to write relative paths (relative to project directory),
e.g.:
Code: [Select]
INCLUDE = $(PellesCDir)\Include\Win;$(PellesCDir)\Include;$(ProjectDir)\sources#
LIB = $(PellesCDir)\Lib\Win;$(PellesCDir)\Lib;$(ProjectDir)\output-dll#
where $(ProjectDir) is the root tree of a project, same dir from which exe/dll/obj build instructions start.
Title: Re: Relative paths in .ppj
Post by: Pelle on June 16, 2009, 10:50:09 PM
I agree this is not good, but it's also common (IMO) to see a different drive being used - a drive for which I don't have a macro symbol to use...