Skip to content

Commit

Permalink
Fix makefile typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Showalter committed Sep 19, 2024
1 parent 71fdf49 commit c0df3a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ ifneq ($(ANDROID_DEVICE),)
ADB_DEVICE_ARG=-s $(ANDROID_DEVICE)
else
# You can think of NR as the line number (sort of) here (it's actually "number of records seen so far").
# We have to do $$1 is the make-escaped version of $1, which is the first column.
# We have to use $$1 as the make-escaped version of $1, which is the first column.
# So, this is just taking row 2, column 1 from 'adb devices'; we do row 2 to skip the header line.
ADB_DEVICE_ARG=-s $(shell adb devices | awk 'NR==2{print $$1}')
endif

all: install

# The help target here reads the makefile (MAKEFILE_LIST is the name of the file `make` ate), looks for
# lines matching commands, and pulls out the command name and anything following it containing a comment
# starting with #@.
.phony: help
help: #@ Makefile help.
@grep -E '^[a-zA-Z_-]+:.*?#@ .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS=":.*?#@ "};{printf "%-16s %s\n", $$1, $$2}'
Expand All @@ -37,7 +40,7 @@ install: #@ Install the build to all devices.
@$(GRADLE) installDebug

.phony: run
run: stop #@# Run the build, engage the logger. Must have been installed first.
run: stop #@ Run the build, engage the logger. Must have been installed first.
@adb $(ADB_DEVICE_ARG) shell monkey -p $(BINNAME) 1
@sleep 1 # TODO: loop until pidof gives us a valid number
@adb $(ADB_DEVICE_ARG) logcat --pid=`adb $(ADB_DEVICE_ARG) shell pidof $(BINNAME)`
Expand Down

0 comments on commit c0df3a6

Please sign in to comment.