File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ DART_CODE=lib \
8080 $(if $(wildcard test/) ,test) \
8181 $(if $(wildcard integration_test/) ,integration_test)
8282
83+ # Cater for the case where the support folder is one directory up.
84+
85+ LOC := $(shell if [ -f support/loc.sh ]; then echo support/loc.sh; \
86+ elif [ -f ../support/loc.sh ]; then echo ../support/loc.sh; fi)
87+
8388.PHONY : chrome
8489chrome :
8590 flutter run -d chrome --release
@@ -214,7 +219,7 @@ locmax:
214219 | numfmt --grouping); \
215220 numf=$$(find lib -name "*.dart" -type f | wc -l ) ; \
216221 output=$$(find lib -name "*.dart" -exec sh -c ' \
217- lines=$$(bash support/loc.sh "$$1" ) ; \
222+ lines=$$(bash $( LOC ) "$$1" ) ; \
218223 if [ $$ lines -gt $( LINES) ]; then \
219224 printf " %4d %s\n" $$ lines " $$ 1" ; \
220225 fi \
@@ -243,7 +248,7 @@ locmax-enforce:
243248 | numfmt --grouping); \
244249 numf=$$(find lib -name "*.dart" -type f | wc -l ) ; \
245250 output=$$(find lib -name "*.dart" -exec sh -c ' \
246- lines=$$(bash support/loc.sh "$$1" ) ; \
251+ lines=$$(bash $( LOC ) "$$1" ) ; \
247252 if [ $$ lines -gt $( LINES) ]; then \
248253 printf " %4d %s\n" $$ lines " $$ 1" ; \
249254 fi \
You can’t perform that action at this time.
0 commit comments