ios – Why does dependency evaluation work for script that outputs folder that’s copied as bundle useful resource however not if that script is in an mixture goal?

0
5
ios – Why does dependency evaluation work for script that outputs folder that’s copied as bundle useful resource however not if that script is in an mixture goal?


Principally in my app I’ve a script that outputs a folder with a couple of information inside it. This folder is output to $(BUILT_PRODUCTS_DIR)/construct/ and is referenced through a PBXBuildFile. As a result of I put a wait within the script (to simulate an extended construct I’ve in my actual venture) it is vitally apparent when the script is or is not run. The purpose can be for it to run solely when its dependencies have modified.

The trick is that if I put this script as a “run script” part inside my closing goal dependency evaluation works nice. The script solely runs when the dependencies are up to date. Nonetheless if I put the “run script” part into an mixture goal then add it as a Goal Dependency in the principle goal Xcode needs to run the script each time. No matter if the dependencies have modified. Nonetheless for those who construct simply the mixture goal alone every little thing goes simply superb. It solely builds when it has to.

To me this doesn’t fairly make sense. I assumed that dependency evaluation of the script inside my mixture goal can be the identical no matter whether or not that script was throughout the mixture goal or the principle goal.

In my app I ideally want the mixture goal to be shared by a number of different targets. Whereas I may put the script in every it might be extra foolproof to have them share an mixture goal.

Why would dependency evaluation come to a special conclusion when the script is inside an mixture goal that could be a goal dependency of the principle goal?

If it helps right here is the script and your entire venture could be discovered right here on GitHub if you need to play with it.

mkdir -p "${SCRIPT_OUTPUT_FILE_0}/construct/"

echo "Pausing for 10 seconds earlier than creating information..."
sleep 10

cat "${SCRIPT_INPUT_FILE_0}"

cat > "${SCRIPT_OUTPUT_FILE_0}/construct/index.html" << EOF



    Easy Web page


    
    

Generated at: $(date)

EOF cat > "${SCRIPT_OUTPUT_FILE_0}/construct/web page.html" << 'EOF' Easy Web page EOF

LEAVE A REPLY

Please enter your comment!
Please enter your name here