| 1 | # hello.mk: For the demo hello app.
|
| 2 |
|
| 3 | # C module dependencies
|
| 4 | -include _build/hello/ovm.d
|
| 5 |
|
| 6 | # What Python module to run.
|
| 7 | _build/hello/main_name.c:
|
| 8 | $(ACTIONS_SH) main-name hello hello.ovm > $@
|
| 9 |
|
| 10 | # for typing module
|
| 11 | HELLO_PYPATH := $(REPO_ROOT)/build/testdata:$(REPO_ROOT)/vendor
|
| 12 |
|
| 13 | # Dependencies calculated by importing main. The guard is because ovm.d
|
| 14 | # depends on it. Is that correct? We'll skip it before 'make dirs'.
|
| 15 | _build/hello/app-deps-%.txt: $(HELLO_SRCS) \
|
| 16 | _build/detected-config.sh build/dynamic_deps.py
|
| 17 | test -d _build/hello && \
|
| 18 | $(ACTIONS_SH) app-deps hello $(HELLO_PYPATH) hello
|
| 19 |
|
| 20 | _build/hello/py-to-compile.txt: \
|
| 21 | _build/detected-config.sh build/dynamic_deps.py
|
| 22 | test -d _build/hello && \
|
| 23 | $(ACTIONS_SH) py-to-compile $(HELLO_PYPATH) hello > $@
|
| 24 |
|
| 25 | # NOTE: We could use src/dest paths pattern instead of _build/app?
|
| 26 | #
|
| 27 | # TODO:
|
| 28 | # - Deps need to be better. Depend on .pyc and .py. I guess
|
| 29 | # app-deps hello will compile the .pyc files. Don't need a separate action.
|
| 30 | # %.pyc : %py
|
| 31 |
|
| 32 | HELLO_BYTECODE_DEPS := \
|
| 33 | build/testdata/hello-version.txt \
|
| 34 | _build/release-date.txt \
|
| 35 | build/testdata/hello-manifest.txt
|
| 36 |
|
| 37 | _build/hello/bytecode-cpython.zip: $(HELLO_SRCS) $(HELLO_BYTECODE_DEPS) \
|
| 38 | _build/hello/app-deps-cpython.txt
|
| 39 | { echo 'build/testdata/hello-version.txt hello-version.txt'; \
|
| 40 | echo '_build/release-date.txt release-date.txt'; \
|
| 41 | cat build/testdata/hello-manifest.txt \
|
| 42 | _build/hello/app-deps-cpython.txt \
|
| 43 | } | build/make_zip.py $@
|
| 44 |
|
| 45 | _build/hello/bytecode-opy.zip: $(HELLO_SRCS) $(HELLO_BYTECODE_DEPS) \
|
| 46 | _build/hello/opy-app-deps.txt
|
| 47 | { echo 'build/testdata/hello-version.txt hello-version.txt'; \
|
| 48 | echo '_build/release-date.txt release-date.txt'; \
|
| 49 | cat build/testdata/hello-manifest.txt \
|
| 50 | _build/hello/opy-app-deps.txt; \
|
| 51 | } | build/make_zip.py $@
|