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 | quiet_cmd_as_o_S = AS $(quiet_modtag) $@ | 349 | quiet_cmd_as_o_S = AS $(quiet_modtag) $@ |
| 350 | cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< | 350 | cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< |
| 351 | 351 | ||
| 352 | ifdef CONFIG_MODVERSIONS | 352 | ifdef CONFIG_ASM_MODVERSIONS |
| 353 | |||
| 354 | ASM_PROTOTYPES := $(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/asm-prototypes.h) | ||
| 355 | |||
| 356 | ifneq ($(ASM_PROTOTYPES),) | ||
| 357 | 353 | ||
| 358 | # versioning matches the C process described above, with difference that | 354 | # versioning matches the C process described above, with difference that |
| 359 | # we parse asm-prototypes.h C header to get function definitions. | 355 | # we parse asm-prototypes.h C header to get function definitions. |
| @@ -369,7 +365,6 @@ cmd_modversions_S = \ · 9 unmodified lines | |||
| 369 | rm -f $(@D)/.tmp_$(@F:.o=.ver); \ | 365 | rm -f $(@D)/.tmp_$(@F:.o=.ver); \ |
| 370 | fi | 366 | fi |
| 371 | endif | 367 | endif |
| 372 | endif | ||
| 373 | 368 | ||
| 374 | $(obj)/%.o: $(src)/%.S $(objtool_dep) FORCE | 369 | $(obj)/%.o: $(src)/%.S $(objtool_dep) FORCE |
| 375 | $(call if_changed_rule,as_o_S) | 370 | $(call if_changed_rule,as_o_S) |