Re: How to unconditionally copy headers?
Re: How to unconditionally copy headers?
- Subject: Re: How to unconditionally copy headers?
- From: Bruce Sharpe <email@hidden>
- Date: Sat, 1 Aug 2009 12:22:25 -0700
The pbxcp line is indeed enlightening, but now I'm really confused.
What I want to happen is to have MyFile.h copied to ~/include every
time I build. So I do this:
1. In the build settings for the target I set "Private Headers Folder
Path" to $HOME/include. (Or to /Users/me/include. The results are
the same.)
2. Set the role of MyFile.h to private.
This leads to the following actions:
CpHeader build/Debug/Users/me/include/MyFile.h MyFile.h
cd /Users/me/src/MyProject
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp
-exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks
/Users/me/src/MyProject/MyFile.h
/Users/me/src/MyProject/build/Debug/Users/me/include
I.e., the file gets copied to a subfolder of the build directory
instead of to the absolute path I specified.
Bruce
On Sat, Aug 1, 2009 at 10:55 AM, Chris Espinosa<email@hidden> wrote:
> On Aug 1, 2009, at 9:55 AM, Bruce Sharpe wrote:
>
> I have set a header file's role in Xcode to private so that it will
> get copied to the desired location by the Copy Headers build phase. It
> works as expected if there is not already a header file of that name
> in the target location. But if there is an existing file, it does not
> overwrite it. Even if the header file has changed in the project it
> doesn't update the copy in the target location. The Build Results
> windows shows a line "Copying MyFile.h" but the file remains as the
> old one.
>
> This doesn't seem right and is definitely not what I want. How can I
> force Xcode to unconditionally copy (and overwrite if necessary)
> header files in the Copy Headers build phase?
>
> Are you sure that you have actually changed the header file in the project?
> If Xcode says "Copying MyFile.h", then it's copying it. But if you
> accidentally changed the copy, instead of the original, then Xcode is simply
> doing what it thinks is right: copying the authentic version from the
> project over the altered version in the build product.
>
> It would help if you'd paste the entire "pbxcp" line for that header, then
> it would be easy to see exactly what's going on.
>
> 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