aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/soong_ui/main.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2019-07-25 14:07:36 -0700
committerLuca Stefani <luca.stefani.ge1@gmail.com>2019-09-04 15:36:45 +0200
commit6e203f3e3a7fdeb1ad7b1599652e411fe4e35ec4 (patch)
tree87fb3cac59ed1891220bd7058c426fad40861e4e /cmd/soong_ui/main.go
parent5165ee989afa9752510e5d1eb8af4e9a44032827 (diff)
downloadbuild_soong-6e203f3e3a7fdeb1ad7b1599652e411fe4e35ec4.tar.gz
build_soong-6e203f3e3a7fdeb1ad7b1599652e411fe4e35ec4.tar.bz2
build_soong-6e203f3e3a7fdeb1ad7b1599652e411fe4e35ec4.zip
Deprecate ONE_SHOT_MAKEFILE
mm is now doing the same thing as mma. Now print a deprecation message for other tools that may be setting ONE_SHOT_MAKEFILE directly (or users that are still using a very old envsetup.sh). Test: mm # does not print Test: ONE_SHOT_MAKEFILE=bionic m Change-Id: I98221657024d824a61c0d721d5c7dd1a2ea2fb1e
Diffstat (limited to 'cmd/soong_ui/main.go')
-rw-r--r--cmd/soong_ui/main.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index f5c007da..6bd08dd4 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -434,7 +434,26 @@ func make(ctx build.Context, config build.Config, _ []string, logsDir string) {
fmt.Fprintln(writer, "!")
fmt.Fprintln(writer, "! Older versions are saved in verbose.log.#.gz files")
fmt.Fprintln(writer, "")
- time.Sleep(5 * time.Second)
+ select {
+ case <-time.After(5 * time.Second):
+ case <-ctx.Done():
+ return
+ }
+ }
+
+ if _, ok := config.Environment().Get("ONE_SHOT_MAKEFILE"); ok {
+ writer := ctx.Writer
+ fmt.Fprintln(writer, "! The variable `ONE_SHOT_MAKEFILE` is deprecated, and will be removed shortly.")
+ fmt.Fprintln(writer, "!")
+ fmt.Fprintln(writer, "! If you're using `mm`, you'll need to run `source build/envsetup.sh` to update.")
+ fmt.Fprintln(writer, "!")
+ fmt.Fprintln(writer, "! Otherwise, either specify a module name with m, or use mma / MODULES-IN-...")
+ fmt.Fprintln(writer, "")
+ select {
+ case <-time.After(30 * time.Second):
+ case <-ctx.Done():
+ return
+ }
}
toBuild := build.BuildAll