Re: Info.plist preprocessor macro expansion, space between tokens
Re: Info.plist preprocessor macro expansion, space between tokens
- Subject: Re: Info.plist preprocessor macro expansion, space between tokens
- From: Greg Guerin <email@hidden>
- Date: Mon, 1 May 2006 18:46:03 -0700
Alex Sheh wrote:
>I looked at the detailed build output, and after running cpp on
>Info.plist, Xcode runs gcc -E on Info.plist. I tried a simple header
>file test and gcc -E is inserting the spaces around tokens.
>
>I don't quite understand what the first cpp command is doing, as it
>takes the installed Info.plist as the input header (which already has
>version numbers substituted) and puts the output into a build folder
>(which seems wholly unaffected, as it still contains the unexpanded
>tokens). But the cpp man page does mention that "you cannot rely on it
>preserving characteristics of the input which are not significant to
>C-family languages", so this would explain why gcc -E is used later.
You might want to look through 'man gcc' for possible options.
I ran this command in one Terminal window:
cpp
so it reads stdin and blocks. Then I did 'ps -ww' in another Terminal
window so I could see exactly what the child processes and their args were.
Then I did this command in a Terminal window:
gcc -E -
so it blocks on stdin, and likewise did 'ps -ww' in another window. The
results were informative, but I didn't have an opportunity to scour 'man
gcc' or 'man cpp' yet to see what options are available and how they pass
through.
If nothing else, you might try changing the rules for how plists are
pre-processed, so the preprocessing step uses only 'cpp', rather than 'gcc
-E', since invoking as 'cpp' does not put white-space in the expansion of:
MAJOR.MINOR.MICRO
In short, if you can't get 'gcc -E' to do what you want, substitute
something that WILL do what you want, and ONLY what you want. Sometimes,
less is more.
-- GG
_______________________________________________
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