# HG changeset patch # User Oleksandr Gavenko # Date 1625347740 -10800 # Node ID 5f52c9e8b9b0ba6277bdf67fd773a3a1dcef80c8 # Parent c3c51450c705bfebe9d82445282e4fa55cb1d844 Added build target to upload Anki files to Android phone. diff -r c3c51450c705 -r 5f52c9e8b9b0 Makefile --- a/Makefile Sat Jul 03 23:55:02 2021 +0300 +++ b/Makefile Sun Jul 04 00:29:00 2021 +0300 @@ -92,6 +92,10 @@ endif endif +ifneq '' '$(wildcard /etc/wsl.conf)' + is_wsl := yes +endif + ################################################################ # Build tools definition/switches. @@ -116,6 +120,11 @@ ANKI_PY_DIR := /usr/share/anki endif +ADB := adb +ifeq 'yes' '$(is_wsl)' + ADB := adb.exe +endif + ################################################################ # Install paths. @@ -211,6 +220,13 @@ done rm -f $(patsubst %,$(elispdir)/%,$(notdir $(EL_FILES))) $(patsubst %.el,$(elispdir)/%.elc,$(notdir $(EL_FILES))) +.PHONY: upload-anki-android +upload-anki-android: $(SRS_ANKI_FILES) + \ +for f in $(SRS_ANKI_FILES); do \ + $(ADB) push $$f /sdcard/AnkiDroid/; \ +done + ################################################################ # Deploy/release targets.