Skip to content

Commit

Permalink
Add make fixincludes target.
Browse files Browse the repository at this point in the history
All source files were already updated with IWYU in commit 7a9bc3d,
so no source file changes are needed.
  • Loading branch information
fragglet committed Oct 13, 2024
1 parent 0719f85 commit 3289eca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/.iwyu-overrides.imp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
# Override for bugs at time of writing (8.22):
{ symbol: [ "va_start", private, "<stdarg.h>", public ] },
{ symbol: [ "va_arg", private, "<stdarg.h>", public ] },
{ symbol: [ "va_end", private, "<stdarg.h>", public ] },
{ symbol: [ "SIGIO", private, "<signal.h>", public ] },
{ symbol: [ "SIGTSTP", private, "<signal.h>", public ] },
{ symbol: [ "SIGPOLL", private, "<signal.h>", public ] },
{ symbol: [ "SIGWINCH", private, "<signal.h>", public ] },
{ symbol: [ "SIGCONT", private, "<signal.h>", public ] },
{ symbol: [ "size_t", private, "<stdlib.h>", public ] },
]
9 changes: 9 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
IWYU = iwyu
IWYU_FLAGS = --error --mapping_file=.iwyu-overrides.imp
IWYU_TRANSFORMED_FLAGS = $(patsubst %,-Xiwyu %,$(IWYU_FLAGS)) $(CFLAGS)

EXTRA_DIST = sopwith.ico

appdir = $(prefix)/share/applications
Expand Down Expand Up @@ -43,6 +47,11 @@ COMMON_SOURCES = \
vid_vga.c \
yocton.c yocton.h

fixincludes:
for d in *.c */*.c; do \
$(IWYU) $(IWYU_TRANSFORMED_FLAGS) 2>&1 $$d | fix_include; \
done

if HAVE_WINDRES
sopwith_SOURCES = $(COMMON_SOURCES) resource.rc
else
Expand Down

0 comments on commit 3289eca

Please sign in to comment.