diff --git a/Lake/CLI/Build.lean b/Lake/CLI/Build.lean index 1211f35502..7af8d33441 100644 --- a/Lake/CLI/Build.lean +++ b/Lake/CLI/Build.lean @@ -155,7 +155,9 @@ def resolveTargetBaseSpec (ws : Workspace) (spec : String) (facet : Name) : Exce | [pkgSpec, targetSpec] => let pkgSpec := if pkgSpec.startsWith "@" then pkgSpec.drop 1 else pkgSpec let pkg ← parsePackageSpec ws pkgSpec - if targetSpec.startsWith "+" then + if targetSpec.isEmpty then + resolvePackageTarget ws pkg facet + else if targetSpec.startsWith "+" then let mod := targetSpec.drop 1 |>.toName if let some mod := pkg.findModule? mod then resolveModuleTarget ws mod facet diff --git a/examples/targets/test.sh b/examples/targets/test.sh index c7b341c74e..9b26b85b1a 100755 --- a/examples/targets/test.sh +++ b/examples/targets/test.sh @@ -27,7 +27,7 @@ $LAKE build Bar:o test -f ./build/ir/Bar.o -$LAKE build +$LAKE build targets/ ./build/bin/c test -f ./build/lib/Foo.olean