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: "Robert J. Lang" <email@hidden>
- Date: Tue, 16 May 2006 12:56:57 -0700
- Thread-topic: Info.plist preprocessor macro expansion, space between tokens
Title: Re: Info.plist preprocessor macro expansion, space between tokens
on 4/28/06 4:49 PM, Alex Sheh at email@hidden wrote:
Hi all,
Is there anyway to get the Info.plist preprocessor NOT to add whitespace between tokens during macro expansion?
This works. The two-stage construction does the trick.
Robert
#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_BUGFIX 0
/* Symbols needed for Info.plist; ugly multistage construction because
they need to be symbols, not strings, no quotes, no whitespace */
#define MACRO_PASTE_5(a, b, c, d, e) a##b##c##d##e
#define MACRO_PASTE_5A(a, b, c, d, e) MACRO_PASTE_5(a, b, c, d, e)
#define MAC_CFBUNDLE_SHORT_VERSION_STRING \
MACRO_PASTE_5A(VERSION_MAJOR, ., VERSION_MINOR, ., VERSION_BUGFIX)
The symbol MAC_CFBUNDLE_SHORT_VERSION_STRING now gives the desired result and can be used in your Info.plist.
_______________________________________________
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