Debian Codegraph @

XCode/PBXBuildPhase.m

raw
1 /*
2 Copyright (C) 2018, 2019, 2020, 2021 Free Software Foundation, Inc.
3
4 Written by: Gregory John Casamento <[email protected]>
5 Date: 2022
6
7 This file is part of the GNUstep XCode Library
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free
21 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110 USA.
23 */
24
25 #import "PBXCommon.h"
26 #import "PBXBuildPhase.h"
27
28 @implementation PBXBuildPhase
29
30 - (instancetype) initWithFiles: (NSMutableArray *)files
31 buildActionMask: (NSString *)buildActionMask
32 runOnlyForDeployment: (NSString *)runOnlyForDeployment
33 target: (PBXNativeTarget *)target
34 name: (NSString *)name
35 {
36 self = [super init];
37 if (self != nil)
38 {
39 [self setFiles: files];
40 [self setBuildActionMask: buildActionMask];
41 [self setRunOnlyForDeploymentPostprocessing: runOnlyForDeployment];
42 [self setTarget: target];
43 [self setName: name];
44 }
45 return self;
46 }
47
48 - (void) dealloc
49 {
50 RELEASE(_files);
51 RELEASE(_buildActionMask);
52 RELEASE(_runOnlyForDeploymentPostprocessing);
53 RELEASE(_target);
54 RELEASE(_name);
55 [super dealloc];
56 }
57
58 // Methods....
59 - (NSMutableArray *) files // getter
60 {
61 return _files;
62 }
63
64 - (void) setFiles: (NSMutableArray *)object; // setter
65 {
66 ASSIGN(_files,object);
67 }
68
69 - (NSString *) buildActionMask // getter
70 {
71 return _buildActionMask;
72 }
73
74 - (void) setBuildActionMask: (NSString *)object; // setter
75 {
76 ASSIGN(_buildActionMask,object);
77 }
78
79 - (NSString *) runOnlyForDeploymentPostprocessing // getter
80 {
81 return _runOnlyForDeploymentPostprocessing;
82 }
83
84 - (void) setRunOnlyForDeploymentPostprocessing: (NSString *)object; // setter
85 {
86 ASSIGN(_runOnlyForDeploymentPostprocessing,object);
87 }
88
89 - (BOOL) showEnvVarsInLog; // setter
90 {
91 return _showEnvVarsInLog;
92 }
93
94 - (void) setShowEnvVarsInLog: (BOOL)flag
95 {
96 _showEnvVarsInLog = flag;
97 }
98
99 - (void) setTarget: (PBXNativeTarget *)t
100 {
101 _target = t;
102 }
103
104 - (PBXNativeTarget *) target
105 {
106 return _target;
107 }
108
109 - (void) setName: (NSString *)n
110 {
111 ASSIGN(_name, n);
112 }
113
114 - (NSString *) name
115 {
116 return _name;
117 }
118
119 - (BOOL) build
120 {
121 NSDebugLog(@"Abstract build... %@, %@", self, _files);
122 return YES;
123 }
124
125 - (BOOL) generate
126 {
127 NSLog(@"Abstract generate... %@, %@", self, _files);
128 return YES;
129 }
130
131 - (BOOL) link
132 {
133 NSLog(@"Abstract link... %@, %@", self, _files);
134 return YES;
135 }
136
137 @end