Re: Copy Headers Build Phase is Flattening my directories
Re: Copy Headers Build Phase is Flattening my directories
- Subject: Re: Copy Headers Build Phase is Flattening my directories
- From: Chris Espinosa <email@hidden>
- Date: Fri, 1 Jul 2005 15:21:59 -0700
On Jul 1, 2005, at 2:36 PM, Mike Jackson wrote: Is there a Shell script that might accomplish this same type of thing because it looks like there are enough bugs left in Xcode 2.1 that I need to resort to a shell script instead.
Something like this?
cd ${SRCROOT} for H in `find ./generic -name "*.h"`; do ditto ${H} ${BUILT_PRODUCTS_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/${H} done
Close... How about
# We need to make sure the symlink is there cd ${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME} ln -s ${BUILT_PRODUCTS_DIR}/${PUBLIC_HEADERS_FOLDER_PATH} ./Headers
cd ${SRCROOT} # I have to move up a directory due to my layout. cd ../ for H in `find ./ -name "*.h"`; do ditto ${H} ${BUILT_PRODUCTS_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/${H} done
In my test project I had the <framework/framework.h> top-level file in the Copy Headers build phase before the shell script phase, so that created the folder and symlink for me.
To move up a level you could cd ${SRCROOT}/.. in one step.
And your script will copy all headers from the parent directory of your project directory; if you want to be more discriminating you may want to have separate for loops, each one based on a different directory in ${SRCROOT}/.. But it looks like you have the right idea.
Chris
Chris |
_______________________________________________
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