1

I have a shell script that runs as part of a Run Script phase in my targets that conditionally copies some files into the product. If I modify the shell script then rebuild, the script is not run because the target does not know that there is a dependency there.

How can I add a dependency so that modifications to the shell script cause the product to be rebuilt, either partly or completely? I can't do it directly through the Add Dependency dialog.

1
  • You can use 'touch' to mark a file on disk 'dirty'- if you did so to a source file (or xcode project?) it will be recompiled the next time arount. Not sure how to do it in the same build step, as the dependencies are calculated before anything is run... I'd be interested in a solution here, too. Commented Dec 17, 2009 at 18:58

1 Answer 1

2

Make a new target just for your script, have it copy its files into a temporary staging folder or something, make your main target depend upon it and do a second copy of its results.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.