Skip to content

Commit 40ecad5

Browse files
committed
accomodated for external packages and pkg-conf powered linking
1 parent d329c0f commit 40ecad5

File tree

2 files changed

+34
-38
lines changed

2 files changed

+34
-38
lines changed

bin/esrocos_build_project

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -48,54 +48,51 @@ build_partition = "x86_partition:"
4848
link_libraries = ""
4949
link_info_file = "linkings.yml"
5050

51-
# walk through each directory in the installed packages
52-
dirs = []
5351

54-
dirs.append("..")
5552
first = True
5653

57-
for dirname in dirs:
58-
5954
# open link_library yml file
6055

61-
link_data = []
62-
63-
try:
64-
with open(INSTALLED_PKGS_DIR+dirname+"/"+link_info_file, 'r') as infile:
65-
66-
data = yaml.load(infile)
67-
try:
68-
link_data = data['libs']
69-
try:
70-
71-
for lib in link_data:
72-
if not first:
73-
link_libraries += ","
74-
else:
75-
first = False
76-
77-
link_libraries += lib
78-
79-
except TypeError:
80-
print "empty linking list, proceed..."
81-
except KeyError:
82-
print "no link data, proceed..."
83-
except IOError:
84-
print "could not read linkings.yml in "+INSTALLED_PKGS_DIR+dirname+"/"+link_info_file+", aborting..."
85-
sys.exit()
86-
except KeyError:
87-
print "could not read linkings.yml in "+INSTALLED_PKGS_DIR+dirname+"/"+link_info_file+", aborting..."
88-
sys.exit()
89-
90-
#print link_libraries
56+
link_data = []
57+
58+
try:
59+
with open(link_info_file, 'r') as infile:
60+
61+
data = yaml.load(infile)
62+
try:
63+
link_data = data['libs']
64+
try:
65+
66+
for lib in link_data:
67+
if not first:
68+
link_libraries += ","
69+
else:
70+
first = False
71+
72+
link_libraries += lib
73+
except TypeError:
74+
print "empty linking list, proceed..."
75+
except KeyError:
76+
print "no link data, proceed..."
77+
except IOError:
78+
print "could not read linkings.yml in "+link_info_file+", aborting..."
79+
sys.exit()
80+
except KeyError:
81+
print "could not read linkings.yml in "+link_info_file+", aborting..."
82+
sys.exit()
9183

9284
print "DONE"
9385

9486
# write infos to user_init_pre.sh
9587

88+
orchestrator_options = ""
89+
90+
if link_libraries != "":
91+
orchestrator_options = 'export ORCHESTRATOR_OPTIONS="--with-extra-lib '+build_partition+link_libraries+'"'
92+
9693
try:
9794
with open("./user_init_pre.sh", 'w') as outfile:
98-
outfile.write('export DEPLOYMENTVIEW="'+project_name+'_dp.aadl"\n\nexport ORCHESTRATOR_OPTIONS="--with-extra-lib '+build_partition+link_libraries+'"')
95+
outfile.write('export DEPLOYMENTVIEW="'+project_name+'_dp.aadl"\n\n'+orchestrator_options)
9996

10097
except IOError as err:
10198
print "could not write to file, exit..."

bin/esrocos_fetch_dependencies

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,9 @@ for dirname in dirs:
256256

257257
if len(deps_map) > 0:
258258
print "FAILED"
259-
print "not all component dependencies could be resolved:"
259+
print "WARNING: not all component dependencies could be resolved:"
260260
for dep in deps_map:
261261
print dep
262-
sys.exit()
263262

264263
print "DONE"
265264

0 commit comments

Comments
 (0)