Closed yomimono closed 6 years ago
if you want to compile only one (or a set of) file per executable, you can use the modules
keyword to say that. See for example: https://github.com/mirage/irmin/blob/master/test/irmin-unix/jbuild#L10
@samoht my problem isn't making different files per executable (there are indeed examples of that all over the place), my problem is with then making jbuilder build @runtest
execute all of them. As far as I can tell you can't define more than one action per alias, and defining the alias more than once in a file just redefines it, so you only get the last action.
Ha I see. In that case I think you can use progn
to do a sequence of actions. It's not very elegant but could work if you need it.
Remove obsolete Makefile; put examples in their own subdirectories (jbuilder seems not to like tagging multiple binaries with runtest if you don't do this, but perhaps someone with better jbuilder skills has a nicer answer). Define jbuild files for each example with the correct dependencies.
jbuilder build @runtest
now builds all of the tests and runs them each in turn.