Skip to contentSkip to conversation

kbuild: Fix GNU make v3.80 compatibility

PATCH In review Kevin Cernekee 2 participants 2 messages May 10, 2011 – May 11, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: Fix GNU make v3.80 compatibility

According to Documentation/Changes, the kernel should be buildable with GNU make 3.80+. Commit 88d7be031f9f975bb3f50a0b5ef3796a671e7edf (kbuild:
Use a single clean rule for kernel and external modules) introduced the "$(or" construct, which requires make 3.81. This causes "make clean" to malfunction when it is used with external modules.

Replace "$(or" with an equivalent "$(if" expression, to restore backward compatibility.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index 41ea6fb..d593b12 100644
@@ -1374,7 +1374,7 @@ endif # KBUILD_EXTMOD
 clean: $(clean-dirs)
 	$(call cmd,rmdirs)
 	$(call cmd,rmfiles)
-	@find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
+	@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
 		\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
 		-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
 		-o -name '*.symtypes' -o -name 'modules.order' \
Signature · 1 line
1.7.5
#1 lore raw
Quoted 11 lines · Kevin Cernekee

According to Documentation/Changes, the kernel should be buildable with GNU make 3.80+. Commit 88d7be031f9f975bb3f50a0b5ef3796a671e7edf (kbuild:
Use a single clean rule for kernel and external modules) introduced the "$(or" construct, which requires make 3.81. This causes "make clean" to malfunction when it is used with external modules.

Replace "$(or" with an equivalent "$(if" expression, to restore backward compatibility.

Pushed to kbuild-2.6.git#kbuild, thanks.

Michal