From aa2b7cc21d4996c369870c9d69c1d9c49faf133a Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 15 Mar 2023 19:51:39 -0400 Subject: [PATCH] Rename mk2rbc/cmd to make `go install` work properly The standard go tooling assumes that a package's binary name should be the name of the containing folder. Before this change, `go install` or `go build` (without `-o`) names this binary `cmd`. Test: treehugger Change-Id: I45a4e97f4a0d59744d644e30636250ceefe3bd1c --- mk2rbc/Android.bp | 2 +- mk2rbc/{cmd => mk2rbc}/mk2rbc.go | 0 soong_ui.bash | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename mk2rbc/{cmd => mk2rbc}/mk2rbc.go (100%) diff --git a/mk2rbc/Android.bp b/mk2rbc/Android.bp index 4fa3eb678..cd80a4d48 100644 --- a/mk2rbc/Android.bp +++ b/mk2rbc/Android.bp @@ -19,7 +19,7 @@ package { blueprint_go_binary { name: "mk2rbc", - srcs: ["cmd/mk2rbc.go"], + srcs: ["mk2rbc/mk2rbc.go"], deps: [ "mk2rbc-lib", "androidmk-parser", diff --git a/mk2rbc/cmd/mk2rbc.go b/mk2rbc/mk2rbc/mk2rbc.go similarity index 100% rename from mk2rbc/cmd/mk2rbc.go rename to mk2rbc/mk2rbc/mk2rbc.go diff --git a/soong_ui.bash b/soong_ui.bash index 1d027c4c7..8e7cd195d 100755 --- a/soong_ui.bash +++ b/soong_ui.bash @@ -33,8 +33,8 @@ export TOP=$(gettop) source ${TOP}/build/soong/scripts/microfactory.bash soong_build_go soong_ui android/soong/cmd/soong_ui -soong_build_go mk2rbc android/soong/mk2rbc/cmd -soong_build_go rbcrun rbcrun/cmd +soong_build_go mk2rbc android/soong/mk2rbc/mk2rbc +soong_build_go rbcrun rbcrun/rbcrun cd ${TOP} exec "$(getoutdir)/soong_ui" "$@"