Home | History | Annotate | Download | only in core

Lines Matching defs:mod

22 # All internal functions in this file begin with '-ndk-mod-'
29 # Use $(call -ndk-mod-debug,<message>) to print a debug message only
34 -ndk-mod-debug = $(info $1)
36 -ndk-mod-debug := $(empty)
52 -ndk-mod-filter = $(strip \
57 -test-ndk-mod-filter = \
59 $(call test-expect,,$(call -ndk-mod-filter,,-local-func))\
60 $(call test-expect,foo,$(call -ndk-mod-filter,foo,-local-func))\
61 $(call test-expect,foo,$(call -ndk-mod-filter,foo bar,-local-func))\
62 $(call test-expect,foo foo,$(call -ndk-mod-filter,aaa foo bar foo,-local-func))\
64 $(call test-expect,,$(call -ndk-mod-filter,,-local-func))\
65 $(call test-expect,,$(call -ndk-mod-filter,foo,-local-func))\
66 $(call test-expect,bar,$(call -ndk-mod-filter,foo bar,-local-func))\
67 $(call test-expect,aaa bar,$(call -ndk-mod-filter,aaa foo bar,-local-func))
77 -ndk-mod-filter-out = $(strip \
82 -test-ndk-mod-filter-out = \
84 $(call test-expect,,$(call -ndk-mod-filter-out,,-local-func))\
85 $(call test-expect,,$(call -ndk-mod-filter-out,foo,-local-func))\
86 $(call test-expect,bar,$(call -ndk-mod-filter-out,foo bar,-local-func))\
87 $(call test-expect,aaa bar,$(call -ndk-mod-filter-out,aaa foo bar foo,-local-func))\
89 $(call test-expect,,$(call -ndk-mod-filter-out,,-local-func))\
90 $(call test-expect,foo,$(call -ndk-mod-filter-out,foo,-local-func))\
91 $(call test-expect,foo,$(call -ndk-mod-filter-out,foo bar,-local-func))\
92 $(call test-expect,foo foo,$(call -ndk-mod-filter-out,aaa foo bar foo,-local-func))
102 -ndk-mod-find-first = $(firstword $(call -ndk-mod-filter,$1,$2))
104 -test-ndk-mod-find-first.empty = \
106 $(call test-expect,,$(call -ndk-mod-find-first,,-local-pred))\
107 $(call test-expect,,$(call -ndk-mod-find-first,bar,-local-pred))
109 -test-ndk-mod-find-first.simple = \
111 $(call test-expect,foo,$(call -ndk-mod-find-first,foo,-local-pred))\
112 $(call test-expect,foo,$(call -ndk-mod-find-first,aaa foo bar,-local-pred))\
113 $(call test-expect,foo,$(call -ndk-mod-find-first,aaa foo foo bar,-local-pred))
125 # _ndk_mod_tree_visited.<name> variables in -ndk-mod-tree-setup-visit.
130 -ndk-mod-tree-setup-visit = \
136 -ndk-mod-tree-is-visited = \
140 -ndk-mod-tree-set-visited = \
154 # you must call -ndk-mod-get-depends to set this.
159 -ndk-mod-pop-first = \
163 -test-ndk-mod-pop-first = \
165 $(call -ndk-mod-pop-first)\
171 -ndk-mod-push-back = \
174 -test-ndk-mod-push-back = \
176 $(call -ndk-mod-push-back, D E)\
180 -ndk-mod-get-depends = \
185 -ndk-mod-get-new-depends = \
186 $(call -ndk-mod-get-depends)\
198 # we use the -ndk-mod-tree-xxx functions to flag 'visited' nodes
203 -ndk-mod-get-closure = $(strip \
207 $(call -ndk-mod-tree-setup-visit)\
209 $(call -ndk-mod-closure-visit,$(_ndk_mod_module))\
211 $(call -ndk-mod-closure-recursive)\
216 # Used internally to visit a new node during -ndk-mod-get-closure.
218 -ndk-mod-closure-visit = \
219 $(call -ndk-mod-push-back,$1)\
220 $(call -ndk-mod-tree-set-visited,$1)
222 -ndk-mod-closure-recursive = \
223 $(call -ndk-mod-pop-first)\
225 $(call -ndk-mod-get-depends)\
227 $(if $(call -ndk-mod-tree-is-visited,$(_ndk_mod_dep)),,\
228 $(call -ndk-mod-closure-visit,$(_ndk_mod_dep))\
231 $(if $(_ndk_mod_wq),$(call -ndk-mod-closure-recursive))
233 -test-ndk-mod-get-closure.empty = \
235 $(call test-expect,,$(call -ndk-mod-get-closure,,-local-deps))
237 -test-ndk-mod-get-closure.single = \
240 $(call test-expect,A,$(call -ndk-mod-get-closure,A,-local-deps))
242 -test-ndk-mod-get-closure.double = \
246 $(call test-expect,A B,$(call -ndk-mod-get-closure,A,-local-deps))
248 -test-ndk-mod-get-closure.circular-deps = \
253 $(call test-expect,A B C,$(call -ndk-mod-get-closure,A,-local-deps))
255 -test-ndk-mod-get-closure.ABCDE = \
262 $(call test-expect,A B C D E,$(call -ndk-mod-get-closure,A,-local-deps))
280 -ndk-mod-topo-zero-incoming = \
284 -ndk-mod-topo-increment-incoming = \
288 -ndk-mod-topo-decrement-incoming = \
292 -ndk-mod-topo-has-incoming = $(_ndk_mod_topo_incoming.$1)
297 -ndk-mod-topo-find-first-zero-incoming = $(firstword $(call -ndk-mod-filter-out,$1,-ndk-mod-topo-has-incoming))
300 -ndk-mod-topo-dump-count = \
318 -ndk-mod-get-topo-list = $(strip \
321 $(eval _ndk_mod_nodes := $(call -ndk-mod-get-closure,$1,$2))\
322 $(call -ndk-mod-topo-count,$(_ndk_mod_nodes))\
324 $(eval _ndk_mod_wq := $(call -ndk-mod-topo-find-first-zero-incoming,$(_ndk_mod_nodes)))\
325 $(call -ndk-mod-topo-sort)\
331 -ndk-mod-topo-count = \
333 $(call -ndk-mod-topo-zero-incoming,$(_ndk_mod_module)))\
335 $(call -ndk-mod-get-depends)\
337 $(call -ndk-mod-topo-increment-incoming,$(_ndk_mod_dep))\
341 -ndk-mod-topo-sort = \
342 $(call -ndk-topo-debug,-ndk-mod-topo-sort: wq='$(_ndk_mod_wq)' list='$(_ndk_mod_list)')\
343 $(call -ndk-mod-pop-first)\
347 $(call -ndk-mod-topo-decrement-incoming,$(_ndk_mod_module))\
348 $(call -ndk-mod-get-depends)\
349 $(call -ndk-topo-debug,-ndk-mod-topo-sort: deps='$(_ndk_mod_depends)')\
351 $(call -ndk-mod-topo-decrement-incoming,$(_ndk_mod_dep))\
352 $(if $(call -ndk-mod-topo-has-incoming,$(_ndk_mod_dep)),,\
353 $(call -ndk-mod-push-back,$(_ndk_mod_dep))\
356 $(call -ndk-mod-topo-sort)\
360 -test-ndk-mod-get-topo-list.empty = \
362 $(call test-expect,,$(call -ndk-mod-get-topo-list,,-local-deps))
364 -test-ndk-mod-get-topo-list.single = \
367 $(call test-expect,A,$(call -ndk-mod-get-topo-list,A,-local-deps))
369 -test-ndk-mod-get-topo-list.no-infinite-loop = \
374 $(call test-expect,A B C,$(call -ndk-mod-get-topo-list,A,-local-deps))
376 -test-ndk-mod-get-topo-list.ABC = \
381 $(call test-expect,A C B,$(call -ndk-mod-get-topo-list,A,-local-deps))
383 -test-ndk-mod-get-topo-list.ABCD = \
389 $(call test-expect,A C B D,$(call -ndk-mod-get-topo-list,A,-local-deps))
391 -test-ndk-mod-get-topo-list.ABC.circular = \
396 $(call test-expect,A B C,$(call -ndk-mod-get-topo-list,A,-local-deps))
407 -ndk-mod-get-topological-depends = $(call rest,$(call -ndk-mod-get-topo-list,$1,$2))
409 mod-get-topological-depends.simple = \
413 $(eval topo_deps := $$(call -ndk-mod-get-topological-depends,A,-local-get-deps))\
416 -test-ndk-mod-get-topological-depends.ABC = \
421 $(eval bfs_deps := $$(call -ndk-mod-get-bfs-depends,A,-local-get-deps))\
422 $(eval topo_deps := $$(call -ndk-mod-get-topological-depends,A,-local-get-deps))\
426 -test-ndk-mod-get-topological-depends.circular = \
431 $(eval bfs_deps := $$(call -ndk-mod-get-bfs-depends,A,-local-get-deps))\
432 $(eval topo_deps := $$(call -ndk-mod-get-topological-depends,A,-local-get-deps))\
448 -ndk-mod-get-bfs-list = $(strip \
452 $(call -ndk-mod-tree-setup-visit)\
453 $(call -ndk-mod-tree-set-visited,$(_ndk_mod_wq))\
454 $(call -ndk-mod-bfs-recursive) \
460 -ndk-mod-bfs-recursive = \
461 $(call -ndk-mod-debug,-ndk-mod-bfs-recursive wq='$(_ndk_mod_wq)' list='$(_ndk_mod_list)' visited='$(_ndk_mod_tree_visitors)')\
462 $(call -ndk-mod-pop-first)\
464 $(call -ndk-mod-get-depends)\
465 $(call -ndk-mod-debug,. node='$(_ndk_mod_module)' deps='$(_ndk_mod_depends)')\
467 $(if $(call -ndk-mod-tree-is-visited,$(_ndk_mod_child)),,\
468 $(call -ndk-mod-tree-set-visited,$(_ndk_mod_child))\
469 $(call -ndk-mod-push-back,$(_ndk_mod_child))\
472 $(if $(_ndk_mod_wq),$(call -ndk-mod-bfs-recursive))
474 -test-ndk-mod-get-bfs-list.empty = \
476 $(call test-expect,,$(call -ndk-mod-get-bfs-list,,-local-deps))
478 -test-ndk-mod-get-bfs-list.A = \
481 $(call test-expect,A,$(call -ndk-mod-get-bfs-list,A,-local-deps))
483 -test-ndk-mod-get-bfs-list.ABCDEF = \
491 $(call test-expect,A B C D E F,$(call -ndk-mod-get-bfs-list,A,-local-deps))
505 -ndk-mod-get-bfs-depends = $(call rest,$(call -ndk-mod-get-bfs-list,$1,$2))
507 -test-ndk-mod-get-bfs-depends.simple = \
511 $(eval deps := $$(call -ndk-mod-get-bfs-depends,A,-local-deps-func))\
514 -test-ndk-mod-get-bfs-depends.ABC = \
519 $(eval deps := $$(call -ndk-mod-get-bfs-depends,A,-local-deps-func))\
522 -test-ndk-mod-get-bfs-depends.ABCDE = \
530 $(eval deps := $$(call -ndk-mod-get-bfs-depends,A,-local-deps-func))\
533 -test-ndk-mod-get-bfs-depends.loop = \
537 $(eval deps := $$(call -ndk-mod-get-bfs-depends,A,-local-deps-func))\