piper-audio/piper-vamp-cpp

Unclear what is (re)built by which Makefile

Opened this issue · 2 comments

There are various things one might want to build in this repo:

  1. The unit test suite
  2. The simple-server program
  3. The client code, either in the form of a library or to the test client program

The top-level Makefile builds 1 and 2 but not 3, and it doesn't have any proper dependency listing so things don't get rebuilt properly when something changes.

To build 3 (building into the test program) you need to go to vamp-client/qt and use qmake. The reason for this is to avoid the top-level build depending on Qt, but it does mean that that part of the client code is not exercised if you just run "make" in the main repo.

It feels like we might be better off, at least for the moment, moving the server-build Makefile into the vamp-server directory, adding a test suite Makefile to the test directory, and removing the top-level Makefile entirely.

(Though a problem with that as it stands is that both the client and server code depend on the vamp-capnp/piper-capnp.cpp file, which is generated by the server Makefile. A fourth Makefile just for that? Not very nice. We do actually keep piper-capnp.* in version control as well so they don't normally need to be regenerated in a routine build, so maybe it's not that bad)

Then of course these Makefiles all need proper dependencies, which hopefully should be a bit more routine.

Thinking about it, it may be that the answer is just to continue to extend test coverage in the top-level build.

And sort out the dependencies. I might not have been struck by this as a problem at all if the existing unit tests had been rebuilt when I re-ran make. I should look into that now.

Dependencies added in #7