Advice Wanted on Project File & Variables

View: New views
1 Messages — Rating Filter:   Alert me  

Advice Wanted on Project File & Variables

by Robert Love-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...>
                                    <aim:goim?screenname=rlove@...>


_______________________________________________
gps-users mailing list
gps-users@...
http://lists.adacore.com/mailman/listinfo/gps-users
LightInTheBox - Buy quality products at wholesale price!