Topological sort/Extracted top item: Difference between revisions
Topological sort/Extracted top item (view source)
Revision as of 16:06, 13 October 2010
, 13 years agoJ: bug fix -- include files we depend on which themselves depend on nothing
m (fix wikilink name in j) |
(J: bug fix -- include files we depend on which themselves depend on nothing) |
||
Line 45:
targets=. ;: x
parsed=. <@;:;._2 y
names=. ~.({.&>parsed),targets,;parsed
depends=. (> =@i.@#) names e.S:1 (#names){.parsed
depends=. (+. +./ .*.~)^:_ depends
keep=. +./depends (] , #~) names e. targets
Line 56:
# Added an argument for the target(s) we wish to find dependencies for
# Make sure that these targets are included in our dependency structures
# Make sure that things we can depend on are included in our dependency structures
# Select these targets, and the things they depend on, once we know what depends on what
# When ordering names by dependencies, only consider names and dependencies we want to keep
Line 72 ⟶ 73:
>'top1' compileOrder dependencies
ipcommon
des1a▼
ip2a
des1c▼
ip2b
des1 ▼
ip2c
top1 </lang>▼
des1b
des1a1
des1a2
des1c1
▲des1a
▲des1c
ip1
ip2
▲des1
▲top1 </lang>
=={{header|Python}}==
|