diff options
author | Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> | 2014-11-04 16:26:45 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2014-11-05 09:55:57 +0000 |
commit | c716b3888e7e8150d1c1053ee6550afb56438b1f (patch) | |
tree | a4dd334df679a623de436021795587d138724498 /Makefile.in | |
parent | 6cc8ed7d64b4c01550539170c1848f1152e433af (diff) |
Add build support for iwyu
include-what-you-use is a tool to help removing unneeded includes.
Homepage:
https://code.google.com/p/include-what-you-use/
So to use it pass its path to configure like:
./configure --with-iwyu=/usr/bin/include-what-you-use
May be helpful for fdo#42949
Change-Id: Idc185c5181d754b9dfd82fcf6a5ad05953b3cd03
Reviewed-on: https://gerrit.libreoffice.org/12255
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in index c13deb4f383c..a051625566d7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -60,6 +60,8 @@ export GMAKE_OPTIONS?=-r$(if $(verbose)$(VERBOSE),,s)$(value $(MAKEFLAGS)) PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),) +IWYU_OPTION := $(if $(IWYU_PATH),-k CXX=$(IWYU_PATH),) + # # Partial Build # @@ -67,13 +69,13 @@ define gb_Top_GbuildModuleRules .PHONY: $(1) $(1).all $(1).build $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)) $(1): bootstrap fetch - cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) + cd $(SRCDIR)/$(2) && $$(MAKE) $(IWYU_OPTION) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $(1).build $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)): cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@) $(1).all: bootstrap fetch - $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)) + $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)) endef @@ -230,7 +232,7 @@ build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset) ifneq ($(filter-out WNT MACOSX IOS ANDROID,$(OS)),) mkdir -p $(INSTDIR) && install-gdb-printers -a $(INSTDIR) -c endif - $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal) + $(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal) ifeq ($(OS),IOS) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios endif |