mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
defs.mk, projects.py: Fix PREREQ_BUILD ignored in LIBFLAGS
PREREQ_BUILD doesn\'t make it into linker flags. This patch hopefully fixes that. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
488ffa1e3c
commit
79278ea8bd
2 changed files with 12 additions and 9 deletions
10
make/defs.mk
10
make/defs.mk
|
|
@ -979,11 +979,11 @@ endif
|
||||||
|
|
||||||
INCLUDE += $(call proj_query, cflags $(PREREQ_BUILD) $(PROJECT))
|
INCLUDE += $(call proj_query, cflags $(PREREQ_BUILD) $(PROJECT))
|
||||||
|
|
||||||
#ifneq ($(USE_PROJECT_LIB),false)
|
LDFLAGS_QUERY_ARGS = $(addprefix --exclude ,$(LDFLAGS_EXCLUDE)) $(PREREQ_BUILD) $(PROJECT)
|
||||||
LIBFLAGS += $(call proj_query, ldflags $(addprefix --exclude ,$(LDFLAGS_EXCLUDE)) $(PROJECT))
|
ifeq ($(USE_PROJECT_LIB),true)
|
||||||
#else
|
LDFLAGS_QUERY_ARGS += --add-self
|
||||||
#LIBFLAGS += $(call proj_query, ldflags $(PREREQ_BUILD))
|
endif
|
||||||
#endif
|
LIBFLAGS += $(call proj_query, ldflags $(LDFLAGS_QUERY_ARGS))
|
||||||
|
|
||||||
#include $(MODDIR)/make/lib-deps.mk
|
#include $(MODDIR)/make/lib-deps.mk
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -273,10 +273,11 @@ def get_ldpathflags(names, exclude = []):
|
||||||
r = r + ' -L' + proj_dir(m) + '/lib'
|
r = r + ' -L' + proj_dir(m) + '/lib'
|
||||||
print(r[1:])
|
print(r[1:])
|
||||||
|
|
||||||
def get_ldflags(names, exclude = []):
|
def get_ldflags(names, exclude = [], add_self_ = False):
|
||||||
#print(names)
|
#print(names)
|
||||||
deps = get_modules_from_project_txt(names, 'pkg.requires.jw', 'build',
|
deps = get_modules_from_project_txt(names, 'pkg.requires.jw', 'build',
|
||||||
scope = 1, add_self=False, names_only=True)
|
scope = 1, add_self=add_self_, names_only=True)
|
||||||
|
debug("deps = " + ' '.join(deps))
|
||||||
#print(deps)
|
#print(deps)
|
||||||
r = ''
|
r = ''
|
||||||
for m in reversed(deps):
|
for m in reversed(deps):
|
||||||
|
|
@ -371,11 +372,13 @@ def cmd_libname(args_):
|
||||||
print(get_libname(args.module))
|
print(get_libname(args.module))
|
||||||
|
|
||||||
def cmd_ldflags(args_):
|
def cmd_ldflags(args_):
|
||||||
parser = argparse.ArgumentParser(description='ldlibpath')
|
parser = argparse.ArgumentParser(description='ldflags')
|
||||||
parser.add_argument('module', nargs='*', help='Modules')
|
parser.add_argument('module', nargs='*', help='Modules')
|
||||||
parser.add_argument('--exclude', action='append', help='Exclude Modules', default=[])
|
parser.add_argument('--exclude', action='append', help='Exclude Modules', default=[])
|
||||||
|
parser.add_argument('--add-self', '-s', action='store_true',
|
||||||
|
default=False, help='Include libflags of specified modules, too, not only their dependencies')
|
||||||
args=parser.parse_args(args_)
|
args=parser.parse_args(args_)
|
||||||
print(get_ldflags(args.module, args.exclude))
|
print(get_ldflags(args.module, args.exclude, args.add_self))
|
||||||
|
|
||||||
def cmd_cflags(args_):
|
def cmd_cflags(args_):
|
||||||
parser = argparse.ArgumentParser(description='cflags')
|
parser = argparse.ArgumentParser(description='cflags')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue