mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
dirs.mk, projects.py: Take prerequisites dir check from project.conf
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
1d22dfa49f
commit
86afe4fc10
2 changed files with 17 additions and 3 deletions
|
|
@ -29,7 +29,9 @@ SUBDIR_TARGETS = $(filter $(ALLOWED_SUBDIR_TARGETS),$(MAKECMDGOALS))
|
|||
endif
|
||||
|
||||
ifneq ($(DONT_CHECK_PREREQ_DONE),true)
|
||||
PREREQ_DIRS_DONE = $(addsuffix /dirs-all.done,$(filter-out $(TOPDIR) /opt/%,$(foreach p,$(PREREQ),$($(p)_DIR))))
|
||||
PREREQ += $(call proj_query, prereq build $(PROJECT))
|
||||
PREREQ_DIRS = $(foreach p, $(PREREQ), $(call proj_dir, $(p)))
|
||||
PREREQ_DIRS_DONE = $(addsuffix /dirs-all.done,$(filter-out $(TOPDIR) /opt/%,$(PREREQ_DIRS)))
|
||||
endif
|
||||
|
||||
all: dirs-all.done
|
||||
|
|
@ -88,3 +90,4 @@ dirs.distclean:
|
|||
$(make_dirs)
|
||||
|
||||
endif # SUBDIRS_TO_ITERATE
|
||||
|
||||
|
|
|
|||
|
|
@ -101,8 +101,10 @@ def add_modules_from_project_txt(buf, visited, spec, section, key, add_self, sco
|
|||
spec = name
|
||||
if spec in buf:
|
||||
return
|
||||
#if spec in visited:
|
||||
# return
|
||||
if spec in visited:
|
||||
if add_self:
|
||||
buf.append(spec)
|
||||
return
|
||||
visited.add(spec)
|
||||
deps = get_value(name, section, key)
|
||||
debug("name = ", name, "section = ", section, "key = ", key, "deps = ", deps, "scope = ", scope, "visited = ", visited)
|
||||
|
|
@ -219,6 +221,15 @@ def cmd_path(args_):
|
|||
r = r + ':' + proj_dir(m) + '/bin'
|
||||
print(r[1:])
|
||||
|
||||
def cmd_prereq(args_):
|
||||
parser = argparse.ArgumentParser(description='path')
|
||||
parser.add_argument('flavour', help='Flavour')
|
||||
parser.add_argument('module', nargs='*', help='Modules')
|
||||
args=parser.parse_args(args_)
|
||||
deps = get_modules_from_project_txt(args.module, 'pkg.required',
|
||||
args.flavour, scope = 2, add_self=False, names_only=True)
|
||||
print(' '.join(deps))
|
||||
|
||||
def cmd_pkg_requires(args_):
|
||||
parser = argparse.ArgumentParser(description='pkg-requires')
|
||||
parser.add_argument('flavour', help='Flavour')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue