add better support for IWYU and fix things

Remove the "make iwyu" build target. Move the functionality into the
recently introduced lint.fish script. Fix a lot, but not all, of the
include-what-you-use errors. Specifically, it fixes all of the IWYU errors
on my OS X server but only removes some of them on my Ubuntu 14.04 server.

Fixes #2957
This commit is contained in:
Kurtis Rader
2016-04-20 23:00:54 -07:00
parent daa217f533
commit 1f06e5f0b9
104 changed files with 685 additions and 533 deletions

View File

@@ -859,19 +859,11 @@ depend:
cp config.h /tmp/fish_make_depend/
mv $(subst obj/,/tmp/fish_make_depend/src/,$(FISH_ALL_OBJS:.o=.cpp)) /tmp/fish_make_depend/
cd /tmp/fish_make_depend && \
makedepend -f$(CURDIR)/Makefile.in -pobj/ -Y -Isrc *.cpp
makedepend -f$(CURDIR)/Makefile.in -pobj/ -Y -Isrc *.cpp
rm -Rf /tmp/fish_make_depend
./config.status
.PHONY: depend
# Include What You Use
iwyu:
# Requires the --keep-going flag as it always returns 1
# Can't set MAKEFLAGS on a target-specific basic
$(MAKE) -k _iwyu CXX=include-what-you-use
_iwyu: clean $(PROGRAMS)
.PHONY: iwyu _iwyu
# Lint the code. This only deals with C++ files.
lint:
build_tools/lint.fish $(CXX) $(CXXFLAGS)
@@ -894,7 +886,7 @@ style-all:
# Restore the source tree to the state right after extracting a tarball.
distclean: clean
$(MAKE) -C $(PCRE2_DIR) distclean || true
rm -f config.status config.log config.h Makefile
rm -f config.status config.log config.h Makefile osx/config.h
.PHONY: distclean