diff Makefile @ 31:0bc0b4798d9e

fix saystring(12) command for proper unicode and document it
author Carl Byington <carl@five-ten-sg.com>
date Sun, 28 Apr 2019 14:45:56 -0700
parents e6784ab8964c
children
line wrap: on
line diff
--- a/Makefile	Thu Nov 08 11:59:30 2018 -0800
+++ b/Makefile	Sun Apr 28 14:45:56 2019 -0700
@@ -1,12 +1,13 @@
 #mc40 is "On Device Storage"
 #tc55 is "Internal Storage"
 
+na=$(shell find . -iname '*.c' -o -iname '*.h' -o -iname '*.cpp')
 style:=release
 dest:=/run/user/1000/gvfs/mtp*/*torage/Download
 ver:=$(shell grep versionName app/src/main/AndroidManifest.xml | cut -d'"' -f2)
-apk:='app/build/outputs/apk/510ConnectbotMonitor-$(ver).apk'
+apk:='app/build/outputs/apk/510ConnectbotMonitor-$(ver).$(style).apk'
 id:=$(shell hg id --id || echo 1)
-da:=$(shell date +%Y-%m-%d)
+da:=$(shell date '+%Y-%m-%dT%H:%M:%S')
 version:=\
 <?xml version=\"1.0\" encoding=\"utf-8\"?>\n\
 <resources>\n\
@@ -15,8 +16,10 @@
 
 ifeq ($(style),release)
     task:=assembleArmRelease
+	debug:=0
 else
 	task:=assembleArmDebug
+	debug:=1
 endif
 
 all:
@@ -54,6 +57,8 @@
 	convert res/drawable-ldpi/icon.png    -resize 50% -colorspace Gray res/drawable-ldpi/notification_icon.png
 
 indentc:
+	dos2unix $(na)
+	for i in $(na); do sed -i -e 's/\r//g' $$i; done
 	indent --line-length100 \
 		   --brace-indent4 \
 		   --braces-on-if-line \
@@ -62,15 +67,17 @@
 		   --case-indentation4 \
 		   --comment-indentation60 \
 		   --cuddle-else \
+		   --cuddle-do-while \
 		   --declaration-comment-column60 \
 		   --no-tabs \
 		   -nbbo \
 		   -npcs \
 		   -nprs \
 		   -npsl \
+		   -bad -bap -bbb -sob \
 		   -saf -sai -saw \
 		   -i4 \
-		   $(shell find . -iname *.c -o -iname *.h -o -iname *.cpp)
+		   $(na)
 
 indentjava:
 	astyle --style=java \
@@ -93,5 +100,4 @@
 		--convert-tabs \
 		--break-after-logical \
 		--mode=java \
-		   $(shell find . -iname *.java | grep -v /gen/)
-
+		   $(shell find . -iname '*.java' | grep -v /gen/)