NO

Author Topic: Relative paths in .ppj  (Read 3352 times)

Romashka

  • Guest
Relative paths in .ppj
« 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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Relative paths in .ppj
« Reply #1 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...
/Pelle