Is it possible to execute ‘make check’ prior to ‘make install’ and abort the install if check failed?
The behavior should be like this:
- User runs ‘make install’
- ‘make check’ is run.
- If check failed install is not executed. Otherwise install is executed.
edit:
I got it working by overriding the install rule in the top level Makefile.am like this:
install: check install-recursive
But I would rather have a solution that does not override the install target.
You can hook into the install process using the
install-exec-localorinstall-data-localtargets: