Debian Codegraph @

XCode/PBXLegacyTarget.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 "PBXLegacyTarget.h"
26
27 #import <Foundation/NSString.h>
28 #import <Foundation/NSArray.h>
29
30 #import "xcsystem.h"
31
32 @implementation PBXLegacyTarget
33
34 - (void) dealloc
35 {
36 RELEASE(_buildArgumentsString);
37 RELEASE(_buildToolPath);
38 // RELEASE(_dependencies);
39 [super dealloc];
40 }
41
42 - (NSString *) buildArgumentsString
43 {
44 return _buildArgumentsString;
45 }
46
47 - (void) setBuildArgumentsString: (NSString *)string
48 {
49 ASSIGN(_buildArgumentsString, string);
50 }
51
52 - (NSString *) buildToolPath
53 {
54 return _buildToolPath;
55 }
56
57 - (void) setBuildToolPath: (NSString *)path
58 {
59 ASSIGN(_buildToolPath, path);
60 }
61
62 /*
63 - (NSArray *) dependencies
64 {
65 return _dependencies;
66 }
67
68 - (void) setDependencies: (NSArray *)deps
69 {
70 ASSIGN(_dependencies, deps);
71 }
72 */
73
74 - (BOOL) passBuildSettingsInEnvironment
75 {
76 return _passBuildSettingsInEnvironment;
77 }
78
79 - (void) setPassBuildSettingsInEnvironment: (BOOL)f
80 {
81 _passBuildSettingsInEnvironment = f;
82 }
83
84 - (BOOL) build
85 {
86 return xcsystem(_buildToolPath);
87 }
88
89 - (BOOL) clean
90 {
91 NSString *build_cmd = [_buildToolPath stringByAppendingString: @" clean"];
92 return xcsystem(build_cmd);
93 }
94
95 - (BOOL) install
96 {
97 NSString *build_cmd = [_buildToolPath stringByAppendingString: @" install"];
98 return xcsystem(build_cmd);
99 }
100
101 @end