History

kbuild: trivial cleanups on the comments

This is a bunch of trivial fixes and cleanups.

Cao jin committed 9 years ago

Commit 312a3d01 parent cb874814 files · +13 −14Browse files

Unified · Split

4 files
  1. Makefile +5 −5
  2. scripts/Kbuild.include +3 −4
  3. scripts/Makefile.build +4 −4
  4. scripts/basic/Makefile +1 −1
Makefile+5−5
@@ -442,7 +442,7 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ · 441 unmodified lines
442# ===========================================================================442# ===========================================================================
443# Rules shared between *config targets and build targets443# Rules shared between *config targets and build targets
444 444
445# Basic helpers built in scripts/445# Basic helpers built in scripts/basic/
446PHONY += scripts_basic446PHONY += scripts_basic
447scripts_basic:447scripts_basic:
448 $(Q)$(MAKE) $(build)=scripts/basic448 $(Q)$(MAKE) $(build)=scripts/basic
@@ -505,7 +505,7 @@ ifeq ($(KBUILD_EXTMOD),) · 56 unmodified lines
505 endif505 endif
506 endif506 endif
507endif507endif
508# install and module_install need also be processed one by one508# install and modules_install need also be processed one by one
509ifneq ($(filter install,$(MAKECMDGOALS)),)509ifneq ($(filter install,$(MAKECMDGOALS)),)
510 ifneq ($(filter modules_install,$(MAKECMDGOALS)),)510 ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
511 mixed-targets := 1511 mixed-targets := 1
@@ -964,7 +964,7 @@ export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt- · 452 unmodified lines
964export KBUILD_VMLINUX_LIBS := $(libs-y1)964export KBUILD_VMLINUX_LIBS := $(libs-y1)
965export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds965export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
966export LDFLAGS_vmlinux966export LDFLAGS_vmlinux
967# used by scripts/pacmage/Makefile967# used by scripts/package/Makefile
968export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools)968export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools)
969 969
970vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) $(KBUILD_VMLINUX_LIBS)970vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) $(KBUILD_VMLINUX_LIBS)
@@ -992,8 +992,8 @@ include/generated/autoksyms.h: FORCE · 21 unmodified lines
992ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)992ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
993 993
994# Final link of vmlinux with optional arch pass after final link994# Final link of vmlinux with optional arch pass after final link
995 cmd_link-vmlinux = \995cmd_link-vmlinux = \
996 $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \996 $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \
997 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)997 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
998 998
999vmlinux: scripts/link-vmlinux.sh vmlinux_prereq $(vmlinux-deps) FORCE999vmlinux: scripts/link-vmlinux.sh vmlinux_prereq $(vmlinux-deps) FORCE
scripts/Kbuild.include+3−4
@@ -85,8 +85,8 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) · 84 unmodified lines
85 85
86# try-run86# try-run
87# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)87# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
88# Exit code chooses option. "$$TMP" is can be used as temporary file and88# Exit code chooses option. "$$TMP" serves as a temporary file and is
89# is automatically cleaned up.89# automatically cleaned up.
90try-run = $(shell set -e; \90try-run = $(shell set -e; \
91 TMP="$(TMPOUT).$$$$.tmp"; \91 TMP="$(TMPOUT).$$$$.tmp"; \
92 TMPO="$(TMPOUT).$$$$.o"; \92 TMPO="$(TMPOUT).$$$$.o"; \
@@ -261,7 +261,6 @@ make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1))))) · 168 unmodified lines
261any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)261any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
262 262
263# Execute command if command has changed or prerequisite(s) are updated.263# Execute command if command has changed or prerequisite(s) are updated.
264#
265if_changed = $(if $(strip $(any-prereq) $(arg-check)), \264if_changed = $(if $(strip $(any-prereq) $(arg-check)), \
266 @set -e; \265 @set -e; \
267 $(echo-cmd) $(cmd_$(1)); \266 $(echo-cmd) $(cmd_$(1)); \
@@ -315,7 +314,7 @@ if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \ · 47 unmodified lines
315 $(rule_$(1)), @:)314 $(rule_$(1)), @:)
316 315
317###316###
318# why - tell why a a target got build317# why - tell why a target got built
319# enabled by make V=2318# enabled by make V=2
320# Output (listed in the order they are checked):319# Output (listed in the order they are checked):
321# (1) - due to target is PHONY320# (1) - due to target is PHONY
scripts/Makefile.build+4−4
@@ -229,8 +229,8 @@ ifeq ("$(origin RECORDMCOUNT_WARN)", "command line") · 228 unmodified lines
229endif229endif
230# Due to recursion, we must skip empty.o.230# Due to recursion, we must skip empty.o.
231# The empty.o file is created in the make process in order to determine231# The empty.o file is created in the make process in order to determine
232# the target endianness and word size. It is made before all other C232# the target endianness and word size. It is made before all other C
233# files, including recordmcount.233# files, including recordmcount.
234sub_cmd_record_mcount = \234sub_cmd_record_mcount = \
235 if [ $(@) != "scripts/mod/empty.o" ]; then \235 if [ $(@) != "scripts/mod/empty.o" ]; then \
236 $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \236 $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \
@@ -245,13 +245,13 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH · 8 unmodified lines
245 "$(LD)" "$(NM)" "$(RM)" "$(MV)" \245 "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
246 "$(if $(part-of-module),1,0)" "$(@)";246 "$(if $(part-of-module),1,0)" "$(@)";
247recordmcount_source := $(srctree)/scripts/recordmcount.pl247recordmcount_source := $(srctree)/scripts/recordmcount.pl
248endif248endif # BUILD_C_RECORDMCOUNT
249cmd_record_mcount = \249cmd_record_mcount = \
250 if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \250 if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \
251 "$(CC_FLAGS_FTRACE)" ]; then \251 "$(CC_FLAGS_FTRACE)" ]; then \
252 $(sub_cmd_record_mcount) \252 $(sub_cmd_record_mcount) \
253 fi;253 fi;
254endif254endif # CONFIG_FTRACE_MCOUNT_RECORD
255 255
256ifdef CONFIG_STACK_VALIDATION256ifdef CONFIG_STACK_VALIDATION
257ifneq ($(SKIP_STACK_VALIDATION),1)257ifneq ($(SKIP_STACK_VALIDATION),1)
scripts/basic/Makefile+1−1
@@ -1,5 +1,5 @@
1###1###
2# Makefile.basic lists the most basic programs used during the build process.2# This Makefile lists the most basic programs used during the build process.
3# The programs listed herein are what are needed to do the basic stuff,3# The programs listed herein are what are needed to do the basic stuff,
4# such as fix file dependencies.4# such as fix file dependencies.
5# This initial step is needed to avoid files to be recompiled5# This initial step is needed to avoid files to be recompiled

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t