appendSourcesBuildPhase( SourcesBuildPhase phase) { lock (this.SourcesBuildPhases) { this.SourcesBuildPhases.Add(phase); } }
public Target( Bam.Core.Module module, Project project) : base(project, module.GetType().Name, "PBXNativeTarget", project.GUID) { this.Module = module; this.Type = EProductType.NA; var configList = new ConfigurationList(this); this.ConfigurationList = configList; project.appendConfigurationList(configList); this.TargetDependencies = new Bam.Core.Array <TargetDependency>(); this.ProposedTargetDependencies = new Bam.Core.Array <Target>(); this.BuildPhases = new System.Lazy <Bam.Core.Array <BuildPhase> >(() => new Bam.Core.Array <BuildPhase>()); this.SourcesBuildPhase = new System.Lazy <SourcesBuildPhase>(() => { var phase = new SourcesBuildPhase(this); this.appendBuildPhase(phase); this.Project.appendSourcesBuildPhase(phase); return(phase); }); this.FrameworksBuildPhase = new System.Lazy <XcodeBuilder.FrameworksBuildPhase>(() => { var phase = new FrameworksBuildPhase(this); this.Project.appendFrameworksBuildPhase(phase); this.appendBuildPhase(phase); return(phase); }); this.PreBuildBuildPhase = new System.Lazy <ShellScriptBuildPhase>(() => { return(new ShellScriptBuildPhase(this, "Pre Build", (target) => { var content = new System.Text.StringBuilder(); foreach (var config in target.ConfigurationList) { content.AppendFormat("if [ \\\"$CONFIGURATION\\\" = \\\"{0}\\\" ]; then\\n\\n", config.Name); config.SerializePreBuildCommands(content, 1); content.AppendFormat("fi\\n\\n"); } return content.ToString(); })); }); this.PostBuildBuildPhase = new System.Lazy <ShellScriptBuildPhase>(() => { return(new ShellScriptBuildPhase(this, "Post Build", (target) => { var content = new System.Text.StringBuilder(); foreach (var config in target.ConfigurationList) { content.AppendFormat("if [ \\\"$CONFIGURATION\\\" = \\\"{0}\\\" ]; then\\n\\n", config.Name); config.SerializePostBuildCommands(content, 1); content.AppendFormat("fi\\n\\n"); } return content.ToString(); })); }); }