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:
Jan Lindemann 2017-06-29 19:46:07 +00:00
commit 79278ea8bd
2 changed files with 12 additions and 9 deletions

View file

@ -979,11 +979,11 @@ endif
INCLUDE += $(call proj_query, cflags $(PREREQ_BUILD) $(PROJECT))
#ifneq ($(USE_PROJECT_LIB),false)
LIBFLAGS += $(call proj_query, ldflags $(addprefix --exclude ,$(LDFLAGS_EXCLUDE)) $(PROJECT))
#else
#LIBFLAGS += $(call proj_query, ldflags $(PREREQ_BUILD))
#endif
LDFLAGS_QUERY_ARGS = $(addprefix --exclude ,$(LDFLAGS_EXCLUDE)) $(PREREQ_BUILD) $(PROJECT)
ifeq ($(USE_PROJECT_LIB),true)
LDFLAGS_QUERY_ARGS += --add-self
endif
LIBFLAGS += $(call proj_query, ldflags $(LDFLAGS_QUERY_ARGS))
#include $(MODDIR)/make/lib-deps.mk

View file

@ -273,10 +273,11 @@ def get_ldpathflags(names, exclude = []):
r = r + ' -L' + proj_dir(m) + '/lib'
print(r[1:])
def get_ldflags(names, exclude = []):
def get_ldflags(names, exclude = [], add_self_ = False):
#print(names)
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)
r = ''
for m in reversed(deps):
@ -371,11 +372,13 @@ def cmd_libname(args_):
print(get_libname(args.module))
def cmd_ldflags(args_):
parser = argparse.ArgumentParser(description='ldlibpath')
parser = argparse.ArgumentParser(description='ldflags')
parser.add_argument('module', nargs='*', help='Modules')
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_)
print(get_ldflags(args.module, args.exclude))
print(get_ldflags(args.module, args.exclude, args.add_self))
def cmd_cflags(args_):
parser = argparse.ArgumentParser(description='cflags')