Re: [Config Files] Debugging config files
Re: [Config Files] Debugging config files
- Subject: Re: [Config Files] Debugging config files
- From: Rush Manbert <email@hidden>
- Date: Thu, 02 Mar 2006 15:10:46 -0800
Chris Espinosa wrote:
On Mar 1, 2006, at 11:05 AM, Rush Manbert wrote:
<snip>>
One other question. Does anyone else think that it would be useful to
be able to do this?:
#include $(myConfigFileName)
I don't see why you need to have a second level of indirection for
config files, when you can just set the Based On on a per-configuration
basis.
Chris,
I have come up with another, more compelling reason to either do this,
or to support search paths for config files.
Assume that my dir structure looks like this:
Top
|
|- Xcconfig
| debug.xcconfig <-- Wants to include common.xcconfig
| common.xcconfig
|
|- MyProject
MyProject.xcconfig
debugTarget.xcconfig
I add MyProject.xcconfig to my project and make it the base for the
project build configuration.
I add debugTarget.xcconfig to MyProject and make it the base for my
Debug target build configuration.
Contents of MyProject.xcconfig:
------------------------------
PathToTop = ..
Contents of debugTarget.xcconfig:
--------------------------------
#include "../Xcconfig/debug.xcconfig"
Contents of debug.xcconfig:
--------------------------
// Define debug-specific stuff here
// Now include common stuff for debug or release
#include "?????/common.xcconfig"
i.e. We have a common set of config files, and they reference each
other, but they can't include each other because they don't know the
relative path from the project directory. (I can't enforce a restriction
that all project directories will be a fixed distance from Top.)
If you supported expansion in the #includes, then debug.xcconfig could
do this:
#include $(PathToTop)/Xcconfig/common.xcconfig
because he knows the relative path down from Top, and which assumes that
ALL projects would define PathToTop before including the common config
files.
Alternatively, if you supported config file search paths, we could do
something like this:
Contents of MyProject.xcconfig:
------------------------------
CONFIG_SEARCH_PATHS = ../Xcconfig [others]
and then debug.xcconfig would only need to have:
#include "common.xcconfig"
I have written a group of config files that work this way, but now I
will need to copy the contents of the "common.xcconfig" equivalent into
each of the other files. It's the duplication and attendant maintenance
problems that I'm trying to avoid.
So if you're not planning to support expansion in the #include
directives, are you planning to support config file search paths?
- Rush
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden