diff options
author | John Levon <john.levon@nutanix.com> | 2020-12-02 12:20:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 12:20:45 +0000 |
commit | 96d4f11b562159033661ebb9dc7f260274a8ac79 (patch) | |
tree | eb7e9d9e255e32cd79342eb7bd5384fe41c4c624 /Makefile | |
parent | 96716ea7e47aedb769336730f2eee0adb99e5b85 (diff) | |
download | libvfio-user-96d4f11b562159033661ebb9dc7f260274a8ac79.zip libvfio-user-96d4f11b562159033661ebb9dc7f260274a8ac79.tar.gz libvfio-user-96d4f11b562159033661ebb9dc7f260274a8ac79.tar.bz2 |
add pre-push target (#150)
Add a target that builds in debug and release mode and runs the tests in each.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -38,7 +38,7 @@ else endif ifeq ($(VERBOSE),) - MAKEFLAGS += -s + MAKEFLAGS += -s endif BUILD_DIR_BASE = $(CURDIR)/build @@ -46,8 +46,7 @@ BUILD_DIR = $(BUILD_DIR_BASE)/$(BUILD_TYPE) INSTALL_PREFIX ?= /usr/local -PHONY_TARGETS := all realclean buildclean force_cmake export install-export tags - +PHONY_TARGETS := all test pre-push realclean buildclean force_cmake tags .PHONY: $(PHONY_TARGETS) all $(filter-out $(PHONY_TARGETS), $(MAKECMDGOALS)): $(BUILD_DIR)/Makefile @@ -56,6 +55,10 @@ all $(filter-out $(PHONY_TARGETS), $(MAKECMDGOALS)): $(BUILD_DIR)/Makefile test: all cd $(BUILD_DIR)/test; ctest --verbose +pre-push: realclean + make test + make test BUILD_TYPE=rel + realclean: rm -rf $(BUILD_DIR_BASE) |