nitls: look at files of a directories when they are not groups (eg lib/ or contrib/)
authorJean Privat <jean@pryen.org>
Fri, 5 Dec 2014 03:38:53 +0000 (22:38 -0500)
committerJean Privat <jean@pryen.org>
Sat, 6 Dec 2014 04:25:20 +0000 (23:25 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/nitls.nit

index 366c4fc..f29fdfd 100644 (file)
@@ -179,6 +179,18 @@ for a in files do
        if g != null and not opt_project.value then
                mb.visit_group(g)
        end
+       if g == null and mp == null then
+               # not a group not a module, then look at files in the directory
+               var fs = a.files
+               for f in fs do
+                       g = mb.get_mgroup(a/f)
+                       if g != null and not opt_project.value then
+                               mb.visit_group(g)
+                       end
+                       mp = mb.identify_file(a/f)
+                       #print "{a/f}: {mp or else "?"}"
+               end
+       end
 end
 
 # Load modules to get more informations