From 0c8eeea665a783b8fe82c2b6d9f01cad6cb1054e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 1 Dec 2015 16:34:09 +0100 Subject: [build] add make target "tidy" for running clang-tidy --- scripts/main.mk | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'scripts/main.mk') diff --git a/scripts/main.mk b/scripts/main.mk index 8df100decc..eab78ef626 100644 --- a/scripts/main.mk +++ b/scripts/main.mk @@ -3,12 +3,12 @@ ifeq (,$(V)) endif # Determine host platform -HOST ?= $(BUILD) +export HOST ?= $(BUILD) # Defines host defaults include scripts/$(HOST)/defaults.mk -HOST_VERSION ?= $(BUILD_VERSION) +export HOST_VERSION ?= $(BUILD_VERSION) # Optionally include version-specific host defaults -include scripts/$(HOST)/$(HOST_VERSION)/defaults.mk @@ -20,7 +20,7 @@ ifneq (,$(wildcard scripts/$(HOST)/$(HOST_VERSION)/configure.sh)) CONFIGURE_FILES += scripts/$(HOST)/$(HOST_VERSION)/configure.sh endif -HOST_SLUG = $(HOST)-$(HOST_VERSION) +export HOST_SLUG = $(HOST)-$(HOST_VERSION) CONFIGURE_FILES = scripts/$(HOST)/configure.sh ifneq (,$(wildcard scripts/$(HOST)/$(HOST_VERSION)/configure.sh)) CONFIGURE_FILES += scripts/$(HOST)/$(HOST_VERSION)/configure.sh @@ -153,6 +153,14 @@ Ninja/compdb: Ninja/__project__ $(QUIET)$(ENV) deps/ninja/ninja-$(HOST) -C build/$(HOST_SLUG)/$(BUILDTYPE) \ -t compdb cc cc_s cxx objc objcxx > $(OUTPUT) +#### Tidy ###################################################################### + +tidy: Ninja/compdb + @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Generating header files...$(FORMAT_END)\n" + $(QUIET)$(ENV) deps/ninja/ninja-$(HOST) -C build/$(HOST_SLUG)/$(BUILDTYPE) version shaders + @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Running tidy...$(FORMAT_END)\n" + @./scripts/clang-tidy.sh + #### Run tests ################################################################# test-%: Makefile/test -- cgit v1.2.1