[gps-users] Advice Wanted on Project File & Variables
Robert Love
rblove at airmail.net
Sat Jun 17 20:06:49 CEST 2006
I have no choice in the layout of the files in my project. On my
Linux system they look like this:
/home/me/dir_a/int_01J0_069/dir_1/
/home/me/dir_a/int_01J0_069/dir_2/
/home/me/dir_a/int_01J0_069/dir_3/
/home/me/dir_a/int_01J0_069/dir_4/
There are many different versions of the product being built,
depending on the customer's needs. The only thing that changes is
the "int_01J0_069" piece of the name. So I wanted to parameterize my
project file. I tried this:
project XXX is
Top := "/home/me/dir_a/";
Version := "int_01J0_069";
Path := Top & Version;
for Source_Dirs use (".",
Path & "/dir_1/",
Path & "/dir_2/",
Path & "/dir_3/"
);
[rest omitted]
And that works well enough. But what about the case where I import
other projects? How do I parameterize that? Consider this improved
project:
with "/home/me/dir_a/int_01J0_069/dir_22/someproj";
with "/home/me/dir_a/int_01J0_069/dir_24/otherproj";
project XXX is
Top := "/home/me/dir_a/";
Version := "int_01J0_069";
Path := Top & Version;
for Source_Dirs use (".",
Path & "/dir_1/",
Path & "/dir_2/",
Path & "/dir_3/"
);
I can't use variables in the path for the withed projects. Variables
have to be defined in the body of the project. Ideally, I would like
for everything, even subprojects, to be parametized so I only have to
change one variable. Using a variable also controls the length of
the entries in the project file. In reality, the path names are
horribly long and I can't change that either.
All suggestions are welcome. I am still using a very old version of
GPS at my employers. Any solution can't rely on new features.
Thanks for any pointers or advice.
--
Bob Love <mailto: rblove at airmail.net>
<aim:goim?screenname=rlove at mac.com>
More information about the gps-users
mailing list