Skip to contentSkip to conversation

libselinux/Makefile: use $(MAKE) instead of a bare make for fuzz clean

PATCH In review Stephen Smalley 1 participant 4 messages Sep 14 – Sep 15 SELinux security module

lore
Share & tools
lore

Stephen Smalley

author maintainer
#0 lore raw

PATCH 1/2 libselinux/Makefile: use $(MAKE) instead of a bare make for fuzz clean

All other make invocations are done using $(MAKE); we should do likewise here.

---
 libselinux/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libselinux/Makefile +1 -1
index aa8d053e..00b52aa7 100644
@@ -63,7 +63,7 @@ clean distclean:
 	@for subdir in $(SUBDIRS); do \
 		(cd $$subdir && $(MAKE) $@) || exit 1; \
 	done
-	make -C fuzz clean
+	$(MAKE) -C fuzz clean
 
 .PHONY: fuzz
 fuzz: all
Signature · 1 line
2.55.0
author maintainer
#1 lore raw

PATCH 2/2 libsepol/fuzz/Makefile: drop -I../cil/include from CFLAGS

Nothing under libsepol/fuzz includes <cil/*.h> directly and since commit efd1aa51 ("libsepol: add include/sepol/cil symlink for in-tree builds"), the existing include <sepol/cil/cil.h> resolves via the ../include/sepol/cil symlink to the in-tree copy. Hence, we can drop the -I../cil/include flag from CFLAGS when building the fuzzers.

---
 libsepol/fuzz/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libsepol/fuzz/Makefile +1 -1
index 4c8820ae..b406c737 100644
@@ -10,7 +10,7 @@ TARGETS := binpolicy-fuzzer secilc-fuzzer module-package-fuzzer
 LIBSEPOLA := ../src/libsepol.a
 
 CFLAGS ?= -g -O0 -Wall
-override CFLAGS += -I../include -I../cil/include -D_GNU_SOURCE \
+override CFLAGS += -I../include -D_GNU_SOURCE \
 	-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -DDEFINEMAIN -DVERBOSE=1
 
 all: $(TARGETS)
Signature · 1 line
2.55.0
author maintainer
#2 lore raw

Re: [PATCH 2/2] libsepol/fuzz/Makefile: drop -I../cil/include from CFLAGS

Quoted 8 lines · Stephen Smalley

Nothing under libsepol/fuzz includes <cil/*.h> directly and since commit efd1aa51 ("libsepol: add include/sepol/cil symlink for in-tree builds"), the existing include <sepol/cil/cil.h> resolves via the ../include/sepol/cil symlink to the in-tree copy. Hence, we can drop the -I../cil/include flag from CFLAGS when building the fuzzers.

This patch has been merged.