mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-29 00:02:48 +01:00
projects.py: Derive -L options from pkg.required.run not build, as opposed to -l
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
08e60376c7
commit
4457345b0c
1 changed files with 16 additions and 1 deletions
|
|
@ -153,6 +153,17 @@ def get_libname(names):
|
||||||
vals.remove('none')
|
vals.remove('none')
|
||||||
return ' '.join(reversed(vals))
|
return ' '.join(reversed(vals))
|
||||||
|
|
||||||
|
# -L needs to contain more paths than libs linked with -l would require
|
||||||
|
def get_ldpathflags(names):
|
||||||
|
deps = get_modules_from_project_txt(names, 'pkg.required', 'run',
|
||||||
|
scope = 2, add_self=True, names_only=True)
|
||||||
|
r = ''
|
||||||
|
for m in deps:
|
||||||
|
libname = get_libname([m])
|
||||||
|
if len(libname):
|
||||||
|
r = r + ' -L' + proj_dir(m) + '/lib'
|
||||||
|
print(r[1:])
|
||||||
|
|
||||||
def get_ldflags(names):
|
def get_ldflags(names):
|
||||||
#print(names)
|
#print(names)
|
||||||
deps = get_modules_from_project_txt(names, 'pkg.required', 'build',
|
deps = get_modules_from_project_txt(names, 'pkg.required', 'build',
|
||||||
|
|
@ -162,8 +173,12 @@ def get_ldflags(names):
|
||||||
for m in reversed(deps):
|
for m in reversed(deps):
|
||||||
libname = get_libname([m])
|
libname = get_libname([m])
|
||||||
if len(libname):
|
if len(libname):
|
||||||
r = r + ' -L' + proj_dir(m) + '/lib -l' + libname
|
#r = r + ' -L' + proj_dir(m) + '/lib -l' + libname
|
||||||
|
r = r + ' -l' + libname
|
||||||
if len(r):
|
if len(r):
|
||||||
|
ldpathflags = get_ldpathflags(names)
|
||||||
|
if ldpathflags:
|
||||||
|
r = ldpathflags + ' ' + r
|
||||||
return r[1::]
|
return r[1::]
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue