premake / premake/premake-core

xcode warning with custom build steps

Open
#2,097 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

support-request
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

What are you trying to do?
We have post build steps setup to run custom install scripts (among other things).

What problem are you having?
Generally speaking, these work fine. But XCode outputs the following warning:

warning: Run script build phase 'Postbuild' will be run during every build because it does not specify any outputs.
To address this warning, either add output dependencies to the script phase, or configure it to run in every build
by unchecking "Based on dependency analysis" in the script phase.

Comparing xcode project files with and without that option set shows that the following (highlighted) line is added to the project file when it is set:

/* Begin PBXShellScriptBuildPhase section */
		9607AE3710C85E8F00CD1376 /* Postbuild */ = {
			isa = PBXShellScriptBuildPhase;
			alwaysOutOfDate = 1;                    << This is added/removed accordingly
			buildActionMask = 2147483647;
			files = (
			);
			inputPaths = (
			);
			name = Postbuild;
			outputPaths = (
			);
			runOnlyForDeploymentPostprocessing = 0;
			shellPath = /bin/sh;
			shellScript = "set -e\n blah blah blah \n";
		};
/* End PBXShellScriptBuildPhase section */

Is there anyway to control this from Premake?

What version of Premake are you using?
5.0.0-dev

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Premake's Xcode project generation for PBXShellScriptBuildPhase and how custom post-build scripts are represented. Check whether the alwaysOutOfDate setting can be controlled from Premake; done means the generated Xcode project reflects that choice and removes the warning when appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.