Makefile: clear GOROOT, add rundebug target

Nowadays basically nobody should set GOROOT. I still do for various
reasons, but that broke this build which then ran our custom toolchain
with a mismatched GOROOT. Clear GOROOT so the default GOROOT is used
(which is the path that matches the Go toolchain in use)

Also, add a "rundebug" target to control adb (phone or emulator)
bradfitz/bugreport
Brad Fitzpatrick 2 years ago
parent df09d74486
commit 3b6b9acf2b

@ -27,6 +27,7 @@ TOOLCHAINDIR=${HOME}/.cache/tailscale-android-go-$(TOOLCHAINREV)
TOOLCHAINSUM=$(shell $(TOOLCHAINDIR)/go/bin/go version >/dev/null && echo "okay" || echo "bad")
TOOLCHAINWANT=okay
export PATH := $(TOOLCHAINDIR)/go/bin:$(PATH)
export GOROOT := # Unset
all: $(APK)
@ -51,6 +52,10 @@ $(DEBUG_APK): toolchain
(cd android && ./gradlew assemblePlayDebug)
mv android/build/outputs/apk/play/debug/android-play-debug.apk $@
rundebug: $(DEBUG_APK)
adb install -r $(DEBUG_APK)
adb shell am start -n com.tailscale.ipn/com.tailscale.ipn.IPNActivity
# tailscale-fdroid.apk builds a non-Google Play SDK, without the Google bits.
# This is effectively what the F-Droid build definition produces.
# This is useful for testing on e.g. Amazon Fire Stick devices.

Loading…
Cancel
Save