Skip to content

Commit

Permalink
Make the build verb build for only one target (#31)
Browse files Browse the repository at this point in the history
I rarely find myself wanting to build for targets other than the device
that I am currently testing with, and having to wait twice as long as
necessary is annoying.

I expect that CI workflows will still want to build for multiple
targets, but that it should be a relatively small effort to call make
twice since the developer only has to write that code once.

A side effect of this change is that CI now only builds apps other than
`hello_world` for one target. This could easily be fixed by adding a
couple of lines in `CI.yml` but I think this is probably desirable
since I expect the compilation success to be highly correlated.

I considered keeping the old behavior but with a new target named `all`
because I received the feedback that it was surprising that:
- the `all` target does not exist.
- the `all` target is not the default.

I'm choosing to not do that for now because what "all" means in the
context of this project is a little bit unclear. Questions include:
- should it build for all architectures
- should it build the docs, which also is an artifact that the project
  provides.
  • Loading branch information
apljungquist authored Jul 2, 2024
1 parent 5085fb7 commit 077296e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ axisecp/acap-native-sdk:1.12-$(ARCH)-ubuntu22.04
help:
@mkhelp print_docs $(firstword $(MAKEFILE_LIST)) help

## Build <PACKAGE> for all architectures
build: target/aarch64/$(PACKAGE)/_envoy target/armv7hf/$(PACKAGE)/_envoy
## Build <PACKAGE> for <ARCH>
build: target/$(ARCH)/$(PACKAGE)/_envoy
mkdir -p target/acap
cp $(patsubst %/_envoy,%/*.eap,$^) target/acap

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Once it completes there should be two `.eap` files in `target/acap`:
```console
$ ls -1 target/acap
hello_world_1_0_0_aarch64.eap
hello_world_1_0_0_armv7hf.eap
```

If you prefer to not use dev containers, or the implementation in your favorite IDE is buggy, the app can be built using only `docker`:
Expand Down

0 comments on commit 077296e

Please sign in to comment.