Skip to content

Commit 474b514

Browse files
olafklingtsletz
authored andcommitted
faust2sc broaden test for supercollider headers
gcc searches for multiple positions of headers given a path this pr broadens the test for supercollider headers so that the script does not cause a false negative
1 parent f0f3a0f commit 474b514

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tools/faust2appls/faust2sc.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,14 @@ def faustoptflags():
124124

125125
# Return the header paths if they exists.
126126
def get_header_paths(headerpath):
127-
folders = [
128-
path.join(headerpath, "include", "plugin_interface"),
129-
path.join(headerpath, "include", "server"),
130-
path.join(headerpath, "include", "common")
131-
]
127+
subfolders = [[], ["include"],["include", "SuperCollider"]]
128+
headerfolders = ["plugin_interface", "server", "common"]
129+
for sf in subfolders:
130+
folders = [path.join(headerpath, *sf, hf) for hf in headerfolders];
131+
if all(path.exists(f) for f in folders):
132+
print("Found SuperCollider headers: %s" % path.join(headerpath, *sf))
133+
return folders
132134

133-
if all(path.exists(folder) for folder in folders):
134-
print("Found SuperCollider headers: %s" % headerpath)
135-
return folders
136135

137136
# Try and find SuperCollider headers on system
138137
def find_headers(headerpath):

0 commit comments

Comments
 (0)