Showing
1 changed file
with
7 additions
and
3 deletions
| @@ -16,8 +16,9 @@ | @@ -16,8 +16,9 @@ | ||
| 16 | 16 | ||
| 17 | DART_SRC=$(shell find . -name '*.dart') | 17 | DART_SRC=$(shell find . -name '*.dart') |
| 18 | CLNG_SRC=$(shell find printing/ios -name '*.java' -o -name '*.m' -o -name '*.h') $(shell find printing/android -name '*.java' -o -name '*.m' -o -name '*.h') | 18 | CLNG_SRC=$(shell find printing/ios -name '*.java' -o -name '*.m' -o -name '*.h') $(shell find printing/android -name '*.java' -o -name '*.m' -o -name '*.h') |
| 19 | + FONTS=pdf/open-sans.ttf pdf/roboto.ttf | ||
| 19 | 20 | ||
| 20 | -all: pdf/open-sans.ttf pdf/roboto.ttf format | 21 | +all: $(FONTS) format |
| 21 | 22 | ||
| 22 | pdf/open-sans.ttf: | 23 | pdf/open-sans.ttf: |
| 23 | curl -L "https://github.com/google/fonts/raw/master/apache/opensans/OpenSans-Regular.ttf" > $@ | 24 | curl -L "https://github.com/google/fonts/raw/master/apache/opensans/OpenSans-Regular.ttf" > $@ |
| @@ -33,7 +34,10 @@ format-dart: $(DART_SRC) | @@ -33,7 +34,10 @@ format-dart: $(DART_SRC) | ||
| 33 | format-clang: $(CLNG_SRC) | 34 | format-clang: $(CLNG_SRC) |
| 34 | clang-format -style=Chromium -i $^ | 35 | clang-format -style=Chromium -i $^ |
| 35 | 36 | ||
| 36 | -test: pdf/open-sans.ttf | 37 | +pdf/.dart_tool: |
| 38 | + cd pdf ; pub get | ||
| 39 | + | ||
| 40 | +test: pdf/.dart_tool $(FONTS) | ||
| 37 | cd pdf; for EXAMPLE in $(shell cd pdf; find example -name '*.dart'); do dart $$EXAMPLE; done | 41 | cd pdf; for EXAMPLE in $(shell cd pdf; find example -name '*.dart'); do dart $$EXAMPLE; done |
| 38 | cd pdf; for TEST in $(shell cd pdf; find test -name '*.dart'); do dart $$TEST; done | 42 | cd pdf; for TEST in $(shell cd pdf; find test -name '*.dart'); do dart $$TEST; done |
| 39 | # cd printing; flutter test | 43 | # cd printing; flutter test |
| @@ -41,7 +45,7 @@ test: pdf/open-sans.ttf | @@ -41,7 +45,7 @@ test: pdf/open-sans.ttf | ||
| 41 | clean: | 45 | clean: |
| 42 | git clean -fdx | 46 | git clean -fdx |
| 43 | 47 | ||
| 44 | -publish-pdf: format clean pdf/open-sans.ttf | 48 | +publish-pdf: format clean |
| 45 | cd pdf; pub publish -f | 49 | cd pdf; pub publish -f |
| 46 | 50 | ||
| 47 | publish-printing: format clean | 51 | publish-printing: format clean |
-
Please register or login to post a comment