2014-02-13 16:04:35 +00:00
|
|
|
include Makefile.inc
|
|
|
|
|
2014-04-01 20:14:40 +00:00
|
|
|
SUBDIRS = kpatch-build kpatch kmod man contrib
|
2014-02-13 16:04:35 +00:00
|
|
|
BUILD_DIRS = $(SUBDIRS:%=build-%)
|
|
|
|
INSTALL_DIRS = $(SUBDIRS:%=install-%)
|
2014-03-20 14:29:06 +00:00
|
|
|
UNINSTALL_DIRS = $(SUBDIRS:%=uninstall-%)
|
2014-02-13 16:04:35 +00:00
|
|
|
CLEAN_DIRS = $(SUBDIRS:%=clean-%)
|
|
|
|
|
2018-04-13 09:10:42 +00:00
|
|
|
UNITTEST_DIR = test/unit
|
2018-10-18 11:06:24 +00:00
|
|
|
INTEGRATION_DIR = test/integration
|
2018-04-13 09:10:42 +00:00
|
|
|
CLEAN_DIRS += clean-$(UNITTEST_DIR)
|
|
|
|
|
|
|
|
.PHONY: all install uninstall clean check unit
|
2014-02-13 16:04:35 +00:00
|
|
|
.PHONY: $(SUBDIRS) $(BUILD_DIRS) $(INSTALL_DIRS) $(CLEAN_DIRS)
|
2018-10-18 11:06:24 +00:00
|
|
|
.PHONY: integration integration-slow integration-quick
|
2018-10-30 09:49:59 +00:00
|
|
|
.PHONY: vagrant-integration-slow vagrant-integration-quick vagrant-integration
|
2014-02-13 16:04:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: $(BUILD_DIRS)
|
|
|
|
$(BUILD_DIRS):
|
|
|
|
$(MAKE) -C $(@:build-%=%)
|
|
|
|
|
|
|
|
install: $(INSTALL_DIRS)
|
|
|
|
$(INSTALL_DIRS):
|
|
|
|
$(MAKE) -C $(@:install-%=%) install
|
|
|
|
|
2014-03-20 14:29:06 +00:00
|
|
|
uninstall: $(UNINSTALL_DIRS)
|
|
|
|
$(UNINSTALL_DIRS):
|
|
|
|
$(MAKE) -C $(@:uninstall-%=%) uninstall
|
|
|
|
|
2014-02-13 16:04:35 +00:00
|
|
|
clean: $(CLEAN_DIRS)
|
|
|
|
$(CLEAN_DIRS):
|
|
|
|
$(MAKE) -C $(@:clean-%=%) clean
|
2017-10-13 06:52:16 +00:00
|
|
|
|
2018-04-13 09:10:42 +00:00
|
|
|
unit: $(UNITTEST_DIR)/Makefile build-kpatch-build
|
|
|
|
$(MAKE) -C $(UNITTEST_DIR)
|
|
|
|
|
2018-10-18 11:06:24 +00:00
|
|
|
integration: integration-quick
|
|
|
|
|
|
|
|
integration-slow: $(INTEGRATION_DIR)/Makefile build-kpatch-build build-kpatch build-kmod
|
|
|
|
$(MAKE) -C $(INTEGRATION_DIR) slow
|
|
|
|
|
|
|
|
integration-quick: $(INTEGRATION_DIR)/Makefile build-kpatch-build build-kpatch build-kmod
|
|
|
|
$(MAKE) -C $(INTEGRATION_DIR) quick
|
|
|
|
|
2018-10-30 09:49:59 +00:00
|
|
|
vagrant-integration: vagrant-integration-quick
|
|
|
|
|
|
|
|
vagrant-integration-slow:
|
|
|
|
$(MAKE) -C $(INTEGRATION_DIR) vagrant-slow
|
|
|
|
|
|
|
|
vagrant-integration-quick:
|
|
|
|
$(MAKE) -C $(INTEGRATION_DIR) vagrant-quick
|
|
|
|
|
2017-10-13 06:52:16 +00:00
|
|
|
check:
|
|
|
|
shellcheck kpatch/kpatch kpatch-build/kpatch-build kpatch-build/kpatch-gcc
|