- deps = get_deps(NULL, argv[1]);
- for (i = 0; deps[i]; i++)
- if (strstarts(deps[i], "ccan/"))
- printf("%s\n", deps[i]);
+ /* We find depends without compiling by looking for ccan/ */
+ if (!ccan && !compile)
+ errx(1, "--non-ccan needs --compile");
+
+ if (compile)
+ deps = get_deps(NULL, argv[1], style, recurse, compile_info);
+ else
+ deps = get_safe_ccan_deps(NULL, argv[1], style, recurse);
+
+ if (deps)
+ for (i = 0; deps[i]; i++)
+ if (strstarts(deps[i], "ccan/") == ccan)
+ printf("%s\n", deps[i]);