Add CONFIG_ASM_MODVERSIONS. This allows to remove one if-conditional nesting in scripts/Makefile.build. scripts/Makefile.build is run every time Kbuild descends into a sub-directory. So, I want to avoid $(wildcard ...) evaluation where possible although computing $(wildcard ...) is so cheap that it may not make measurable performance difference.
Showing the changes to scripts (1 of 14 files). Show all
Unified · Split
| @@ -349,11 +349,7 @@ $(obj)/%.s: $(src)/%.S FORCE · 348 unmodified lines | ||
| 349 | 349 | quiet_cmd_as_o_S = AS $(quiet_modtag) $@ |
| 350 | 350 | cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< |
| 351 | 351 | |
| 352 | −ifdef CONFIG_MODVERSIONS | |
| 353 | − | |
| 354 | −ASM_PROTOTYPES := $(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/asm-prototypes.h) | |
| 355 | − | |
| 356 | −ifneq ($(ASM_PROTOTYPES),) | |
| 352 | +ifdef CONFIG_ASM_MODVERSIONS | |
| 357 | 353 | |
| 358 | 354 | # versioning matches the C process described above, with difference that |
| 359 | 355 | # we parse asm-prototypes.h C header to get function definitions. |
| @@ -369,7 +365,6 @@ cmd_modversions_S = \ · 9 unmodified lines | ||
| 369 | 365 | rm -f $(@D)/.tmp_$(@F:.o=.ver); \ |
| 370 | 366 | fi |
| 371 | 367 | endif |
| 372 | −endif | |
| 373 | 368 | |
| 374 | 369 | $(obj)/%.o: $(src)/%.S $(objtool_dep) FORCE |
| 375 | 370 | $(call if_changed_rule,as_o_S) |