History

kbuild: rename hostprogs-y/always to hostprogs/always-y

In old days, the "host-progs" syntax was used for specifying host programs. It was renamed to the current "hostprogs-y" in 2004. It is typically useful in scripts/Makefile because it allows Kbuild to selectively compile host programs based on the kernel configuration. This commit renames like follows: always -> always-y hostprogs-y -> hostprogs So, scripts/Makefile will look like this: always-$(CONFIG_BUILD_BIN2C) += ... always-$(CONFIG_KALLSYMS) += ... ... hostprogs := $(always-y) $(always-m) I think this makes more sense because a host program is always a host program, irrespective of the kernel configuration. We want to specify which ones to compile by CONFIG options, so always-y will be handier. The "always", "hostprogs-y", "hostprogs-m" will be kept for backward compatibility for a while.

Masahiro Yamada committed 6 years ago

Commit 5f2fb521 parent faa7bdd49 files · +172 −190Browse files

Unified · Split

49 files
  1. Documentation/kbuild/makefiles.rst +16 −33
  2. Kbuild +4 −4
  3. arch/alpha/boot/Makefile +1 −1
  4. arch/arm/vdso/Makefile +1 −1
  5. arch/arm64/kernel/vdso32/Makefile +2 −2
  6. arch/mips/boot/Makefile +1 −1
  7. arch/mips/boot/compressed/Makefile +2 −2
  8. arch/mips/boot/tools/Makefile +1 −1
  9. arch/mips/tools/Makefile +2 −2
  10. arch/mips/vdso/Makefile +1 −1
  11. arch/powerpc/boot/Makefile +2 −2
  12. arch/s390/tools/Makefile +2 −2
  13. arch/sparc/boot/Makefile +1 −1
  14. arch/sparc/vdso/Makefile +1 −1
  15. arch/x86/boot/Makefile +2 −2
  16. arch/x86/boot/compressed/Makefile +1 −1
  17. arch/x86/entry/vdso/Makefile +1 −1
  18. arch/x86/realmode/rm/Makefile +1 −1
  19. arch/x86/tools/Makefile +2 −2
  20. drivers/gpu/drm/radeon/Makefile +1 −1
  21. drivers/tty/vt/Makefile +1 −1
  22. drivers/video/logo/Makefile +1 −1
  23. drivers/zorro/Makefile +1 −1
  24. fs/unicode/Makefile +1 −1
  25. lib/Makefile +2 −2
  26. lib/raid6/Makefile +1 −1
  27. net/bpfilter/Makefile +1 −1
  28. samples/bpf/Makefile +59 −59
  29. samples/connector/Makefile +2 −6
  30. samples/hidraw/Makefile +2 −4
  31. samples/mei/Makefile +2 −2
  32. samples/pidfd/Makefile +2 −2
  33. samples/seccomp/Makefile +2 −2
  34. samples/uhid/Makefile +2 −2
  35. samples/vfs/Makefile +2 −3
  36. scripts/Makefile +11 −11
  37. scripts/Makefile.build +5 −3
  38. scripts/Makefile.clean +2 −2
  39. scripts/Makefile.host +4 −4
  40. scripts/Makefile.lib +5 −1
  41. scripts/basic/Makefile +2 −2
  42. scripts/dtc/Makefile +2 −2
  43. scripts/gcc-plugins/Makefile +1 −1
  44. scripts/genksyms/Makefile +2 −2
  45. scripts/kconfig/Makefile +5 −5
  46. scripts/mod/Makefile +2 −2
  47. scripts/selinux/genheaders/Makefile +2 −2
  48. scripts/selinux/mdp/Makefile +2 −2
  49. usr/Makefile +1 −1
Documentation/kbuild/makefiles.rst+16−33
@@ -28,7 +28,6 @@ This document describes the Linux kernel Makefiles. · 27 unmodified lines
28 --- 4.3 Using C++ for host programs28 --- 4.3 Using C++ for host programs
29 --- 4.4 Controlling compiler options for host programs29 --- 4.4 Controlling compiler options for host programs
30 --- 4.5 When host programs are actually built30 --- 4.5 When host programs are actually built
31 --- 4.6 Using hostprogs-$(CONFIG_FOO)
32 31
33 === 5 Kbuild clean infrastructure32 === 5 Kbuild clean infrastructure
34 33
@@ -595,11 +594,11 @@ compilation stage. · 560 unmodified lines
595Two steps are required in order to use a host executable.594Two steps are required in order to use a host executable.
596 595
597The first step is to tell kbuild that a host program exists. This is596The first step is to tell kbuild that a host program exists. This is
598done utilising the variable hostprogs-y.597done utilising the variable "hostprogs".
599 598
600The second step is to add an explicit dependency to the executable.599The second step is to add an explicit dependency to the executable.
601This can be done in two ways. Either add the dependency in a rule,600This can be done in two ways. Either add the dependency in a rule,
602or utilise the variable $(always).601or utilise the variable "always-y".
603Both possibilities are described in the following.602Both possibilities are described in the following.
604 603
6054.1 Simple Host Program6044.1 Simple Host Program
@@ -612,7 +611,7 @@ Both possibilities are described in the following. · 6 unmodified lines
612 611
613 Example::612 Example::
614 613
615 hostprogs-y := bin2hex614 hostprogs := bin2hex
616 615
617 Kbuild assumes in the above example that bin2hex is made from a single616 Kbuild assumes in the above example that bin2hex is made from a single
618 c-source file named bin2hex.c located in the same directory as617 c-source file named bin2hex.c located in the same directory as
@@ -630,7 +629,7 @@ Both possibilities are described in the following. · 11 unmodified lines
630 Example::629 Example::
631 630
632 #scripts/lxdialog/Makefile631 #scripts/lxdialog/Makefile
633 hostprogs-y := lxdialog632 hostprogs := lxdialog
634 lxdialog-objs := checklist.o lxdialog.o633 lxdialog-objs := checklist.o lxdialog.o
635 634
636 Objects with extension .o are compiled from the corresponding .c635 Objects with extension .o are compiled from the corresponding .c
@@ -650,7 +649,7 @@ Both possibilities are described in the following. · 13 unmodified lines
650 Example::649 Example::
651 650
652 #scripts/kconfig/Makefile651 #scripts/kconfig/Makefile
653 hostprogs-y := qconf652 hostprogs := qconf
654 qconf-cxxobjs := qconf.o653 qconf-cxxobjs := qconf.o
655 654
656 In the example above the executable is composed of the C++ file655 In the example above the executable is composed of the C++ file
@@ -662,7 +661,7 @@ Both possibilities are described in the following. · 5 unmodified lines
662 Example::661 Example::
663 662
664 #scripts/kconfig/Makefile663 #scripts/kconfig/Makefile
665 hostprogs-y := qconf664 hostprogs := qconf
666 qconf-cxxobjs := qconf.o665 qconf-cxxobjs := qconf.o
667 qconf-objs := check.o666 qconf-objs := check.o
668 667
@@ -710,7 +709,7 @@ Both possibilities are described in the following. · 41 unmodified lines
710 Example::709 Example::
711 710
712 #drivers/pci/Makefile711 #drivers/pci/Makefile
713 hostprogs-y := gen-devlist712 hostprogs := gen-devlist
714 $(obj)/devlist.h: $(src)/pci.ids $(obj)/gen-devlist713 $(obj)/devlist.h: $(src)/pci.ids $(obj)/gen-devlist
715 ( cd $(obj); ./gen-devlist ) < $<714 ( cd $(obj); ./gen-devlist ) < $<
716 715
@@ -718,47 +717,31 @@ Both possibilities are described in the following. · 1 unmodified line
718 $(obj)/gen-devlist is updated. Note that references to717 $(obj)/gen-devlist is updated. Note that references to
719 the host programs in special rules must be prefixed with $(obj).718 the host programs in special rules must be prefixed with $(obj).
720 719
721 (2) Use $(always)720 (2) Use always-y
722 721
723 When there is no suitable special rule, and the host program722 When there is no suitable special rule, and the host program
724 shall be built when a makefile is entered, the $(always)723 shall be built when a makefile is entered, the always-y
725 variable shall be used.724 variable shall be used.
726 725
727 Example::726 Example::
728 727
729 #scripts/lxdialog/Makefile728 #scripts/lxdialog/Makefile
730 hostprogs-y := lxdialog729 hostprogs := lxdialog
731 always := $(hostprogs-y)730 always-y := $(hostprogs)
732 731
733 This will tell kbuild to build lxdialog even if not referenced in732 This will tell kbuild to build lxdialog even if not referenced in
734 any rule.733 any rule.
735 734
7364.6 Using hostprogs-$(CONFIG_FOO)
737---------------------------------
738
739 A typical pattern in a Kbuild file looks like this:
740
741 Example::
742
743 #scripts/Makefile
744 hostprogs-$(CONFIG_KALLSYMS) += kallsyms
745
746 Kbuild knows about both 'y' for built-in and 'm' for module.
747 So if a config symbol evaluates to 'm', kbuild will still build
748 the binary. In other words, Kbuild handles hostprogs-m exactly
749 like hostprogs-y. But only hostprogs-y is recommended to be used
750 when no CONFIG symbols are involved.
751
7525 Kbuild clean infrastructure7355 Kbuild clean infrastructure
753=============================736=============================
754 737
755"make clean" deletes most generated files in the obj tree where the kernel738"make clean" deletes most generated files in the obj tree where the kernel
756is compiled. This includes generated files such as host programs.739is compiled. This includes generated files such as host programs.
757Kbuild knows targets listed in $(hostprogs-y), $(hostprogs-m), $(always),740Kbuild knows targets listed in $(hostprogs), $(always-y), $(always-m),
758$(extra-y) and $(targets). They are all deleted during "make clean".741$(always-), $(extra-y), $(extra-) and $(targets). They are all deleted
759Files matching the patterns "*.[oas]", "*.ko", plus some additional files742during "make clean". Files matching the patterns "*.[oas]", "*.ko", plus
760generated by kbuild are deleted all over the kernel src tree when743some additional files generated by kbuild are deleted all over the kernel
761"make clean" is executed.744source tree when "make clean" is executed.
762 745
763Additional files or directories can be specified in kbuild makefiles by use of746Additional files or directories can be specified in kbuild makefiles by use of
764$(clean-files).747$(clean-files).
Kbuild+4−4
@@ -7,7 +7,7 @@ · 6 unmodified lines
7 7
8bounds-file := include/generated/bounds.h8bounds-file := include/generated/bounds.h
9 9
10always := $(bounds-file)10always-y := $(bounds-file)
11targets := kernel/bounds.s11targets := kernel/bounds.s
12 12
13$(bounds-file): kernel/bounds.s FORCE13$(bounds-file): kernel/bounds.s FORCE
@@ -28,7 +28,7 @@ $(timeconst-file): kernel/time/timeconst.bc FORCE · 14 unmodified lines
28 28
29offsets-file := include/generated/asm-offsets.h29offsets-file := include/generated/asm-offsets.h
30 30
31always += $(offsets-file)31always-y += $(offsets-file)
32targets += arch/$(SRCARCH)/kernel/asm-offsets.s32targets += arch/$(SRCARCH)/kernel/asm-offsets.s
33 33
34arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file)34arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file)
@@ -39,7 +39,7 @@ $(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE · 4 unmodified lines
39#####39#####
40# Check for missing system calls40# Check for missing system calls
41 41
42always += missing-syscalls42always-y += missing-syscalls
43 43
44quiet_cmd_syscalls = CALL $<44quiet_cmd_syscalls = CALL $<
45 cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags)45 cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags)
@@ -50,7 +50,7 @@ missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE · 4 unmodified lines
50#####50#####
51# Check atomic headers are up-to-date51# Check atomic headers are up-to-date
52 52
53always += old-atomics53always-y += old-atomics
54 54
55quiet_cmd_atomics = CALL $<55quiet_cmd_atomics = CALL $<
56 cmd_atomics = $(CONFIG_SHELL) $<56 cmd_atomics = $(CONFIG_SHELL) $<
arch/alpha/boot/Makefile+1−1
@@ -8,7 +8,7 @@ · 7 unmodified lines
8# Copyright (C) 1994 by Linus Torvalds8# Copyright (C) 1994 by Linus Torvalds
9#9#
10 10
11hostprogs-y := tools/mkbb tools/objstrip11hostprogs := tools/mkbb tools/objstrip
12targets := vmlinux.gz vmlinux \12targets := vmlinux.gz vmlinux \
13 vmlinux.nh tools/lxboot tools/bootlx tools/bootph \13 vmlinux.nh tools/lxboot tools/bootlx tools/bootph \
14 tools/bootpzh bootloader bootpheader bootpzheader 14 tools/bootpzh bootloader bootpheader bootpzheader
arch/arm/vdso/Makefile+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
5ARCH_REL_TYPE_ABS := R_ARM_JUMP_SLOT|R_ARM_GLOB_DAT|R_ARM_ABS325ARCH_REL_TYPE_ABS := R_ARM_JUMP_SLOT|R_ARM_GLOB_DAT|R_ARM_ABS32
6include $(srctree)/lib/vdso/Makefile6include $(srctree)/lib/vdso/Makefile
7 7
8hostprogs-y := vdsomunge8hostprogs := vdsomunge
9 9
10obj-vdso := vgettimeofday.o datapage.o note.o10obj-vdso := vgettimeofday.o datapage.o note.o
11 11
arch/arm64/kernel/vdso32/Makefile+2−2
@@ -115,9 +115,9 @@ VDSO_LDFLAGS += $(call cc32-ldoption,-fuse-ld=bfd) · 114 unmodified lines
115 115
116# Borrow vdsomunge.c from the arm vDSO116# Borrow vdsomunge.c from the arm vDSO
117# We have to use a relative path because scripts/Makefile.host prefixes117# We have to use a relative path because scripts/Makefile.host prefixes
118# $(hostprogs-y) with $(obj)118# $(hostprogs) with $(obj)
119munge := ../../../arm/vdso/vdsomunge119munge := ../../../arm/vdso/vdsomunge
120hostprogs-y := $(munge)120hostprogs := $(munge)
121 121
122c-obj-vdso := note.o122c-obj-vdso := note.o
123c-obj-vdso-gettimeofday := vgettimeofday.o123c-obj-vdso-gettimeofday := vgettimeofday.o
arch/mips/boot/Makefile+1−1
@@ -21,7 +21,7 @@ endif · 20 unmodified lines
21drop-sections := .reginfo .mdebug .comment .note .pdr .options .MIPS.options21drop-sections := .reginfo .mdebug .comment .note .pdr .options .MIPS.options
22strip-flags := $(addprefix --remove-section=,$(drop-sections))22strip-flags := $(addprefix --remove-section=,$(drop-sections))
23 23
24hostprogs-y := elf2ecoff24hostprogs := elf2ecoff
25 25
26suffix-y := bin26suffix-y := bin
27suffix-$(CONFIG_KERNEL_BZIP2) := bz227suffix-$(CONFIG_KERNEL_BZIP2) := bz2
arch/mips/boot/compressed/Makefile+2−2
@@ -84,7 +84,7 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE · 83 unmodified lines
84HOSTCFLAGS_calc_vmlinuz_load_addr.o += $(LINUXINCLUDE)84HOSTCFLAGS_calc_vmlinuz_load_addr.o += $(LINUXINCLUDE)
85 85
86# Calculate the load address of the compressed kernel image86# Calculate the load address of the compressed kernel image
87hostprogs-y := calc_vmlinuz_load_addr87hostprogs := calc_vmlinuz_load_addr
88 88
89ifneq ($(zload-y),)89ifneq ($(zload-y),)
90VMLINUZ_LOAD_ADDRESS := $(zload-y)90VMLINUZ_LOAD_ADDRESS := $(zload-y)
@@ -112,7 +112,7 @@ ifdef CONFIG_MACH_DECSTATION · 21 unmodified lines
112endif112endif
113 113
114# elf2ecoff can only handle 32bit image114# elf2ecoff can only handle 32bit image
115hostprogs-y += ../elf2ecoff115hostprogs += ../elf2ecoff
116 116
117ifdef CONFIG_32BIT117ifdef CONFIG_32BIT
118 VMLINUZ = vmlinuz118 VMLINUZ = vmlinuz
arch/mips/boot/tools/Makefile+1−1
@@ -1,6 +1,6 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2 2
3hostprogs-y += relocs3hostprogs += relocs
4relocs-objs += relocs_32.o4relocs-objs += relocs_32.o
5relocs-objs += relocs_64.o5relocs-objs += relocs_64.o
6relocs-objs += relocs_main.o6relocs-objs += relocs_main.o
arch/mips/tools/Makefile+2−2
@@ -1,10 +1,10 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2hostprogs-y := elf-entry2hostprogs := elf-entry
3PHONY += elf-entry3PHONY += elf-entry
4elf-entry: $(obj)/elf-entry4elf-entry: $(obj)/elf-entry
5 @:5 @:
6 6
7hostprogs-$(CONFIG_CPU_LOONGSON3_WORKAROUNDS) += loongson3-llsc-check7hostprogs += loongson3-llsc-check
8PHONY += loongson3-llsc-check8PHONY += loongson3-llsc-check
9loongson3-llsc-check: $(obj)/loongson3-llsc-check9loongson3-llsc-check: $(obj)/loongson3-llsc-check
10 @:10 @:
arch/mips/vdso/Makefile+1−1
@@ -100,7 +100,7 @@ $(obj)/%.so.raw: OBJCOPYFLAGS := -S · 99 unmodified lines
100$(obj)/%.so.raw: $(obj)/%.so.dbg.raw FORCE100$(obj)/%.so.raw: $(obj)/%.so.dbg.raw FORCE
101 $(call if_changed,objcopy)101 $(call if_changed,objcopy)
102 102
103hostprogs-y := genvdso103hostprogs := genvdso
104 104
105quiet_cmd_genvdso = GENVDSO $@105quiet_cmd_genvdso = GENVDSO $@
106define cmd_genvdso106define cmd_genvdso
arch/powerpc/boot/Makefile+2−2
@@ -224,7 +224,7 @@ $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE · 223 unmodified lines
224$(obj)/wrapper.a: $(obj-wlib) FORCE224$(obj)/wrapper.a: $(obj-wlib) FORCE
225 $(call if_changed,bootar)225 $(call if_changed,bootar)
226 226
227hostprogs-y := addnote hack-coff mktree227hostprogs := addnote hack-coff mktree
228 228
229targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)229targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
230extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \230extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
@@ -464,7 +464,7 @@ WRAPPER_BINDIR := /usr/sbin · 233 unmodified lines
464INSTALL := install464INSTALL := install
465 465
466extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))466extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
467hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y))467hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs))
468wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper468wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
469dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))469dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))
470 470
arch/s390/tools/Makefile+2−2
@@ -10,8 +10,8 @@ PHONY += kapi · 9 unmodified lines
10 10
11kapi: $(kapi-hdrs-y)11kapi: $(kapi-hdrs-y)
12 12
13hostprogs-y += gen_facilities13hostprogs += gen_facilities
14hostprogs-y += gen_opcode_table14hostprogs += gen_opcode_table
15 15
16HOSTCFLAGS_gen_facilities.o += $(LINUXINCLUDE)16HOSTCFLAGS_gen_facilities.o += $(LINUXINCLUDE)
17 17
arch/sparc/boot/Makefile+1−1
@@ -7,7 +7,7 @@ · 6 unmodified lines
7ROOT_IMG := /usr/src/root.img7ROOT_IMG := /usr/src/root.img
8ELFTOAOUT := elftoaout8ELFTOAOUT := elftoaout
9 9
10hostprogs-y := piggyback10hostprogs := piggyback
11targets := tftpboot.img image zImage vmlinux.aout11targets := tftpboot.img image zImage vmlinux.aout
12clean-files := System.map12clean-files := System.map
13 13
arch/sparc/vdso/Makefile+1−1
@@ -41,7 +41,7 @@ $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE · 40 unmodified lines
41 $(call if_changed,vdso)41 $(call if_changed,vdso)
42 42
43HOST_EXTRACFLAGS += -I$(srctree)/tools/include43HOST_EXTRACFLAGS += -I$(srctree)/tools/include
44hostprogs-y += vdso2c44hostprogs += vdso2c
45 45
46quiet_cmd_vdso2c = VDSO2C $@46quiet_cmd_vdso2c = VDSO2C $@
47 cmd_vdso2c = $(obj)/vdso2c $< $(<:%.dbg=%) $@47 cmd_vdso2c = $(obj)/vdso2c $< $(<:%.dbg=%) $@
arch/x86/boot/Makefile+2−2
@@ -45,8 +45,8 @@ setup-y += video-vesa.o · 44 unmodified lines
45setup-y += video-bios.o45setup-y += video-bios.o
46 46
47targets += $(setup-y)47targets += $(setup-y)
48hostprogs-y := tools/build48hostprogs := tools/build
49hostprogs-$(CONFIG_X86_FEATURE_NAMES) += mkcpustr49hostprogs += mkcpustr
50 50
51HOST_EXTRACFLAGS += -I$(srctree)/tools/include \51HOST_EXTRACFLAGS += -I$(srctree)/tools/include \
52 -include include/generated/autoconf.h \52 -include include/generated/autoconf.h \
arch/x86/boot/compressed/Makefile+1−1
@@ -58,7 +58,7 @@ KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \ · 57 unmodified lines
58endif58endif
59LDFLAGS_vmlinux := -T59LDFLAGS_vmlinux := -T
60 60
61hostprogs-y := mkpiggy61hostprogs := mkpiggy
62HOST_EXTRACFLAGS += -I$(srctree)/tools/include62HOST_EXTRACFLAGS += -I$(srctree)/tools/include
63 63
64sed-voffset := -e 's/^\([0-9a-fA-F]*\) [ABCDGRSTVW] \(_text\|__bss_start\|_end\)$$/\#define VO_\2 _AC(0x\1,UL)/p'64sed-voffset := -e 's/^\([0-9a-fA-F]*\) [ABCDGRSTVW] \(_text\|__bss_start\|_end\)$$/\#define VO_\2 _AC(0x\1,UL)/p'
arch/x86/entry/vdso/Makefile+1−1
@@ -59,7 +59,7 @@ $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE · 58 unmodified lines
59 $(call if_changed,vdso_and_check)59 $(call if_changed,vdso_and_check)
60 60
61HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi -I$(srctree)/arch/$(SUBARCH)/include/uapi61HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi -I$(srctree)/arch/$(SUBARCH)/include/uapi
62hostprogs-y += vdso2c62hostprogs += vdso2c
63 63
64quiet_cmd_vdso2c = VDSO2C $@64quiet_cmd_vdso2c = VDSO2C $@
65 cmd_vdso2c = $(obj)/vdso2c $< $(<:%.dbg=%) $@65 cmd_vdso2c = $(obj)/vdso2c $< $(<:%.dbg=%) $@
arch/x86/realmode/rm/Makefile+1−1
@@ -12,7 +12,7 @@ OBJECT_FILES_NON_STANDARD := y · 11 unmodified lines
12# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.12# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
13KCOV_INSTRUMENT := n13KCOV_INSTRUMENT := n
14 14
15always := realmode.bin realmode.relocs15always-y := realmode.bin realmode.relocs
16 16
17wakeup-objs := wakeup_asm.o wakemain.o video-mode.o17wakeup-objs := wakeup_asm.o wakemain.o video-mode.o
18wakeup-objs += copy.o bioscall.o regs.o18wakeup-objs += copy.o bioscall.o regs.o
arch/x86/tools/Makefile+2−2
@@ -26,7 +26,7 @@ posttest: $(obj)/insn_decoder_test vmlinux $(obj)/insn_sanity · 25 unmodified lines
26 $(call cmd,posttest)26 $(call cmd,posttest)
27 $(call cmd,sanitytest)27 $(call cmd,sanitytest)
28 28
29hostprogs-y += insn_decoder_test insn_sanity29hostprogs += insn_decoder_test insn_sanity
30 30
31# -I needed for generated C source and C source which in the kernel tree.31# -I needed for generated C source and C source which in the kernel tree.
32HOSTCFLAGS_insn_decoder_test.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/uapi/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/uapi/32HOSTCFLAGS_insn_decoder_test.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/uapi/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/uapi/
@@ -39,7 +39,7 @@ $(obj)/insn_decoder_test.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/l · 6 unmodified lines
39$(obj)/insn_sanity.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/inat.c $(srctree)/arch/x86/include/asm/inat_types.h $(srctree)/arch/x86/include/asm/inat.h $(srctree)/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c39$(obj)/insn_sanity.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/inat.c $(srctree)/arch/x86/include/asm/inat_types.h $(srctree)/arch/x86/include/asm/inat.h $(srctree)/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c
40 40
41HOST_EXTRACFLAGS += -I$(srctree)/tools/include41HOST_EXTRACFLAGS += -I$(srctree)/tools/include
42hostprogs-y += relocs42hostprogs += relocs
43relocs-objs := relocs_32.o relocs_64.o relocs_common.o43relocs-objs := relocs_32.o relocs_64.o relocs_common.o
44PHONY += relocs44PHONY += relocs
45relocs: $(obj)/relocs45relocs: $(obj)/relocs
drivers/gpu/drm/radeon/Makefile+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
5 5
6ccflags-y := -Idrivers/gpu/drm/amd/include6ccflags-y := -Idrivers/gpu/drm/amd/include
7 7
8hostprogs-y := mkregtable8hostprogs := mkregtable
9clean-files := rn50_reg_safe.h r100_reg_safe.h r200_reg_safe.h rv515_reg_safe.h r300_reg_safe.h r420_reg_safe.h rs600_reg_safe.h r600_reg_safe.h evergreen_reg_safe.h cayman_reg_safe.h9clean-files := rn50_reg_safe.h r100_reg_safe.h r200_reg_safe.h rv515_reg_safe.h r300_reg_safe.h r420_reg_safe.h rs600_reg_safe.h r600_reg_safe.h evergreen_reg_safe.h cayman_reg_safe.h
10 10
11quiet_cmd_mkregtable = MKREGTABLE $@11quiet_cmd_mkregtable = MKREGTABLE $@
drivers/tty/vt/Makefile+1−1
@@ -12,7 +12,7 @@ obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o · 11 unmodified lines
12# Files generated that shall be removed upon make clean12# Files generated that shall be removed upon make clean
13clean-files := consolemap_deftbl.c defkeymap.c13clean-files := consolemap_deftbl.c defkeymap.c
14 14
15hostprogs-y += conmakehash15hostprogs += conmakehash
16 16
17quiet_cmd_conmk = CONMK $@17quiet_cmd_conmk = CONMK $@
18 cmd_conmk = $(obj)/conmakehash $< > $@18 cmd_conmk = $(obj)/conmakehash $< > $@
drivers/video/logo/Makefile+1−1
@@ -18,7 +18,7 @@ obj-$(CONFIG_SPU_BASE) += logo_spe_clut224.o · 17 unmodified lines
18 18
19# How to generate logo's19# How to generate logo's
20 20
21hostprogs-y := pnmtologo21hostprogs := pnmtologo
22 22
23# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."23# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
24quiet_cmd_logo = LOGO $@24quiet_cmd_logo = LOGO $@
drivers/zorro/Makefile+1−1
@@ -7,7 +7,7 @@ obj-$(CONFIG_ZORRO) += zorro.o zorro-driver.o zorro-sysfs.o · 6 unmodified lines
7obj-$(CONFIG_PROC_FS) += proc.o7obj-$(CONFIG_PROC_FS) += proc.o
8obj-$(CONFIG_ZORRO_NAMES) += names.o8obj-$(CONFIG_ZORRO_NAMES) += names.o
9 9
10hostprogs-y := gen-devlist10hostprogs := gen-devlist
11 11
12# Files generated that shall be removed upon make clean12# Files generated that shall be removed upon make clean
13clean-files := devlist.h13clean-files := devlist.h
fs/unicode/Makefile+1−1
@@ -35,4 +35,4 @@ $(obj)/utf8data.h: $(src)/utf8data.h_shipped FORCE · 34 unmodified lines
35endif35endif
36 36
37targets += utf8data.h37targets += utf8data.h
38hostprogs-y += mkutf8data38hostprogs += mkutf8data
lib/Makefile+2−2
@@ -239,8 +239,8 @@ obj-$(CONFIG_ASN1) += asn1_decoder.o · 238 unmodified lines
239 239
240obj-$(CONFIG_FONT_SUPPORT) += fonts/240obj-$(CONFIG_FONT_SUPPORT) += fonts/
241 241
242hostprogs-y := gen_crc32table242hostprogs := gen_crc32table
243hostprogs-y += gen_crc64table243hostprogs += gen_crc64table
244clean-files := crc32table.h244clean-files := crc32table.h
245clean-files += crc64table.h245clean-files += crc64table.h
246 246
lib/raid6/Makefile+1−1
@@ -10,7 +10,7 @@ raid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o \ · 9 unmodified lines
10raid6_pq-$(CONFIG_KERNEL_MODE_NEON) += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o10raid6_pq-$(CONFIG_KERNEL_MODE_NEON) += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o
11raid6_pq-$(CONFIG_S390) += s390vx8.o recov_s390xc.o11raid6_pq-$(CONFIG_S390) += s390vx8.o recov_s390xc.o
12 12
13hostprogs-y += mktables13hostprogs += mktables
14 14
15ifeq ($(CONFIG_ALTIVEC),y)15ifeq ($(CONFIG_ALTIVEC),y)
16altivec_flags := -maltivec $(call cc-option,-mabi=altivec)16altivec_flags := -maltivec $(call cc-option,-mabi=altivec)
net/bpfilter/Makefile+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
3# Makefile for the Linux BPFILTER layer.3# Makefile for the Linux BPFILTER layer.
4#4#
5 5
6hostprogs-y := bpfilter_umh6hostprogs := bpfilter_umh
7bpfilter_umh-objs := main.o7bpfilter_umh-objs := main.o
8KBUILD_HOSTCFLAGS += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi8KBUILD_HOSTCFLAGS += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi
9HOSTCC := $(CC)9HOSTCC := $(CC)
samples/bpf/Makefile+59−59
@@ -111,65 +111,65 @@ ibumad-objs := bpf_load.o ibumad_user.o $(TRACE_HELPERS) · 110 unmodified lines
111hbm-objs := bpf_load.o hbm.o $(CGROUP_HELPERS)111hbm-objs := bpf_load.o hbm.o $(CGROUP_HELPERS)
112 112
113# Tell kbuild to always build the programs113# Tell kbuild to always build the programs
114always := $(tprogs-y)114always-y := $(tprogs-y)
115always += sockex1_kern.o115always-y += sockex1_kern.o
116always += sockex2_kern.o116always-y += sockex2_kern.o
117always += sockex3_kern.o117always-y += sockex3_kern.o
118always += tracex1_kern.o118always-y += tracex1_kern.o
119always += tracex2_kern.o119always-y += tracex2_kern.o
120always += tracex3_kern.o120always-y += tracex3_kern.o
121always += tracex4_kern.o121always-y += tracex4_kern.o
122always += tracex5_kern.o122always-y += tracex5_kern.o
123always += tracex6_kern.o123always-y += tracex6_kern.o
124always += tracex7_kern.o124always-y += tracex7_kern.o
125always += sock_flags_kern.o125always-y += sock_flags_kern.o
126always += test_probe_write_user_kern.o126always-y += test_probe_write_user_kern.o
127always += trace_output_kern.o127always-y += trace_output_kern.o
128always += tcbpf1_kern.o128always-y += tcbpf1_kern.o
129always += tc_l2_redirect_kern.o129always-y += tc_l2_redirect_kern.o
130always += lathist_kern.o130always-y += lathist_kern.o
131always += offwaketime_kern.o131always-y += offwaketime_kern.o
132always += spintest_kern.o132always-y += spintest_kern.o
133always += map_perf_test_kern.o133always-y += map_perf_test_kern.o
134always += test_overhead_tp_kern.o134always-y += test_overhead_tp_kern.o
135always += test_overhead_raw_tp_kern.o135always-y += test_overhead_raw_tp_kern.o
136always += test_overhead_kprobe_kern.o136always-y += test_overhead_kprobe_kern.o
137always += parse_varlen.o parse_simple.o parse_ldabs.o137always-y += parse_varlen.o parse_simple.o parse_ldabs.o
138always += test_cgrp2_tc_kern.o138always-y += test_cgrp2_tc_kern.o
139always += xdp1_kern.o139always-y += xdp1_kern.o
140always += xdp2_kern.o140always-y += xdp2_kern.o
141always += xdp_router_ipv4_kern.o141always-y += xdp_router_ipv4_kern.o
142always += test_current_task_under_cgroup_kern.o142always-y += test_current_task_under_cgroup_kern.o
143always += trace_event_kern.o143always-y += trace_event_kern.o
144always += sampleip_kern.o144always-y += sampleip_kern.o
145always += lwt_len_hist_kern.o145always-y += lwt_len_hist_kern.o
146always += xdp_tx_iptunnel_kern.o146always-y += xdp_tx_iptunnel_kern.o
147always += test_map_in_map_kern.o147always-y += test_map_in_map_kern.o
148always += tcp_synrto_kern.o148always-y += tcp_synrto_kern.o
149always += tcp_rwnd_kern.o149always-y += tcp_rwnd_kern.o
150always += tcp_bufs_kern.o150always-y += tcp_bufs_kern.o
151always += tcp_cong_kern.o151always-y += tcp_cong_kern.o
152always += tcp_iw_kern.o152always-y += tcp_iw_kern.o
153always += tcp_clamp_kern.o153always-y += tcp_clamp_kern.o
154always += tcp_basertt_kern.o154always-y += tcp_basertt_kern.o
155always += tcp_tos_reflect_kern.o155always-y += tcp_tos_reflect_kern.o
156always += tcp_dumpstats_kern.o156always-y += tcp_dumpstats_kern.o
157always += xdp_redirect_kern.o157always-y += xdp_redirect_kern.o
158always += xdp_redirect_map_kern.o158always-y += xdp_redirect_map_kern.o
159always += xdp_redirect_cpu_kern.o159always-y += xdp_redirect_cpu_kern.o
160always += xdp_monitor_kern.o160always-y += xdp_monitor_kern.o
161always += xdp_rxq_info_kern.o161always-y += xdp_rxq_info_kern.o
162always += xdp2skb_meta_kern.o162always-y += xdp2skb_meta_kern.o
163always += syscall_tp_kern.o163always-y += syscall_tp_kern.o
164always += cpustat_kern.o164always-y += cpustat_kern.o
165always += xdp_adjust_tail_kern.o165always-y += xdp_adjust_tail_kern.o
166always += xdp_fwd_kern.o166always-y += xdp_fwd_kern.o
167always += task_fd_query_kern.o167always-y += task_fd_query_kern.o
168always += xdp_sample_pkts_kern.o168always-y += xdp_sample_pkts_kern.o
169always += ibumad_kern.o169always-y += ibumad_kern.o
170always += hbm_out_kern.o170always-y += hbm_out_kern.o
171always += hbm_edt_kern.o171always-y += hbm_edt_kern.o
172always += xdpsock_kern.o172always-y += xdpsock_kern.o
173 173
174ifeq ($(ARCH), arm)174ifeq ($(ARCH), arm)
175# Strip all except -D__LINUX_ARM_ARCH__ option needed to handle linux175# Strip all except -D__LINUX_ARM_ARCH__ option needed to handle linux
samples/connector/Makefile+2−6
@@ -2,12 +2,8 @@ · 1 unmodified line
2obj-$(CONFIG_SAMPLE_CONNECTOR) += cn_test.o2obj-$(CONFIG_SAMPLE_CONNECTOR) += cn_test.o
3 3
4# List of programs to build4# List of programs to build
5ifdef CONFIG_SAMPLE_CONNECTOR5hostprogs := ucon
6hostprogs-y := ucon6always-y := $(hostprogs)
7endif
8
9# Tell kbuild to always build the programs
10always := $(hostprogs-y)
11 7
12HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include8HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include
13 9
samples/hidraw/Makefile+2−4
@@ -1,9 +1,7 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2# List of programs to build2# List of programs to build
3hostprogs-y := hid-example3hostprogs := hid-example
4 4always-y := $(hostprogs)
5# Tell kbuild to always build the programs
6always := $(hostprogs-y)
7 5
8HOSTCFLAGS_hid-example.o += -I$(objtree)/usr/include6HOSTCFLAGS_hid-example.o += -I$(objtree)/usr/include
9 7
samples/mei/Makefile+2−2
@@ -1,10 +1,10 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2# Copyright (c) 2012-2019, Intel Corporation. All rights reserved.2# Copyright (c) 2012-2019, Intel Corporation. All rights reserved.
3 3
4hostprogs-y := mei-amt-version4hostprogs := mei-amt-version
5 5
6HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include6HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include
7 7
8always := $(hostprogs-y)8always-y := $(hostprogs)
9 9
10all: mei-amt-version10all: mei-amt-version
samples/pidfd/Makefile+2−2
@@ -1,6 +1,6 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2 2
3hostprogs-y := pidfd-metadata3hostprogs := pidfd-metadata
4always := $(hostprogs-y)4always-y := $(hostprogs)
5HOSTCFLAGS_pidfd-metadata.o += -I$(objtree)/usr/include5HOSTCFLAGS_pidfd-metadata.o += -I$(objtree)/usr/include
6all: pidfd-metadata6all: pidfd-metadata
samples/seccomp/Makefile+2−2
@@ -1,6 +1,6 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2ifndef CROSS_COMPILE2ifndef CROSS_COMPILE
3hostprogs-y := bpf-fancy dropper bpf-direct user-trap3hostprogs := bpf-fancy dropper bpf-direct user-trap
4 4
5HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include5HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
6HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include6HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include
@@ -40,5 +40,5 @@ HOSTLDLIBS_bpf-fancy += $(MFLAG) · 33 unmodified lines
40HOSTLDLIBS_dropper += $(MFLAG)40HOSTLDLIBS_dropper += $(MFLAG)
41HOSTLDLIBS_user-trap += $(MFLAG)41HOSTLDLIBS_user-trap += $(MFLAG)
42endif42endif
43always := $(hostprogs-y)43always-y := $(hostprogs)
44endif44endif
samples/uhid/Makefile+2−2
@@ -1,8 +1,8 @@
1# SPDX-License-Identifier: GPL-2.0-only1# SPDX-License-Identifier: GPL-2.0-only
2# List of programs to build2# List of programs to build
3hostprogs-y := uhid-example3hostprogs := uhid-example
4 4
5# Tell kbuild to always build the programs5# Tell kbuild to always build the programs
6always := $(hostprogs-y)6always-y := $(hostprogs)
7 7
8HOSTCFLAGS_uhid-example.o += -I$(objtree)/usr/include8HOSTCFLAGS_uhid-example.o += -I$(objtree)/usr/include
samples/vfs/Makefile+2−3
@@ -1,11 +1,10 @@
1# SPDX-License-Identifier: GPL-2.0-only1# SPDX-License-Identifier: GPL-2.0-only
2# List of programs to build2# List of programs to build
3hostprogs-y := \3hostprogs := \
4 test-fsmount \4 test-fsmount \
5 test-statx5 test-statx
6 6
7# Tell kbuild to always build the programs7always-y := $(hostprogs)
8always := $(hostprogs-y)
9 8
10HOSTCFLAGS_test-fsmount.o += -I$(objtree)/usr/include9HOSTCFLAGS_test-fsmount.o += -I$(objtree)/usr/include
11HOSTCFLAGS_test-statx.o += -I$(objtree)/usr/include10HOSTCFLAGS_test-statx.o += -I$(objtree)/usr/include
scripts/Makefile+11−11
@@ -7,14 +7,14 @@ · 6 unmodified lines
7 7
8HOST_EXTRACFLAGS += -I$(srctree)/tools/include8HOST_EXTRACFLAGS += -I$(srctree)/tools/include
9 9
10hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c10always-$(CONFIG_BUILD_BIN2C) += bin2c
11hostprogs-$(CONFIG_KALLSYMS) += kallsyms11always-$(CONFIG_KALLSYMS) += kallsyms
12hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount12always-$(BUILD_C_RECORDMCOUNT) += recordmcount
13hostprogs-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable13always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
14hostprogs-$(CONFIG_ASN1) += asn1_compiler14always-$(CONFIG_ASN1) += asn1_compiler
15hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file15always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
16hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert16always-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
17hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert17always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
18 18
19HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include19HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
20HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include20HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
@@ -30,10 +30,10 @@ HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED · 9 unmodified lines
30HOSTLDLIBS_sorttable = -lpthread30HOSTLDLIBS_sorttable = -lpthread
31endif31endif
32 32
33always := $(hostprogs-y) $(hostprogs-m)33hostprogs := $(always-y) $(always-m)
34 34
35# The following hostprogs-y programs are only build on demand35# The following programs are only built on demand
36hostprogs-y += unifdef36hostprogs += unifdef
37 37
38subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins38subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
39subdir-$(CONFIG_MODVERSIONS) += genksyms39subdir-$(CONFIG_MODVERSIONS) += genksyms
scripts/Makefile.build+5−3
@@ -16,6 +16,8 @@ obj-m := · 15 unmodified lines
16lib-y :=16lib-y :=
17lib-m :=17lib-m :=
18always :=18always :=
19always-y :=
20always-m :=
19targets :=21targets :=
20subdir-y :=22subdir-y :=
21subdir-m :=23subdir-m :=
@@ -44,7 +46,7 @@ include $(kbuild-file) · 22 unmodified lines
44include scripts/Makefile.lib46include scripts/Makefile.lib
45 47
46# Do not include host rules unless needed48# Do not include host rules unless needed
47ifneq ($(hostprogs-y)$(hostprogs-m)$(hostlibs-y)$(hostlibs-m)$(hostcxxlibs-y)$(hostcxxlibs-m),)49ifneq ($(hostprogs)$(hostlibs-y)$(hostlibs-m)$(hostcxxlibs-y)$(hostcxxlibs-m),)
48include scripts/Makefile.host50include scripts/Makefile.host
49endif51endif
50 52
@@ -348,7 +350,7 @@ $(obj)/%.o: $(src)/%.S $(objtool_dep) FORCE · 297 unmodified lines
348 $(call if_changed_rule,as_o_S)350 $(call if_changed_rule,as_o_S)
349 351
350targets += $(filter-out $(subdir-obj-y), $(real-obj-y)) $(real-obj-m) $(lib-y)352targets += $(filter-out $(subdir-obj-y), $(real-obj-y)) $(real-obj-m) $(lib-y)
351targets += $(extra-y) $(MAKECMDGOALS) $(always)353targets += $(extra-y) $(always-y) $(MAKECMDGOALS)
352 354
353# Linker scripts preprocessor (.lds.S -> .lds)355# Linker scripts preprocessor (.lds.S -> .lds)
354# ---------------------------------------------------------------------------356# ---------------------------------------------------------------------------
@@ -490,7 +492,7 @@ else · 135 unmodified lines
490 492
491__build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \493__build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
492 $(if $(KBUILD_MODULES),$(obj-m) $(mod-targets) $(modorder-target)) \494 $(if $(KBUILD_MODULES),$(obj-m) $(mod-targets) $(modorder-target)) \
493 $(subdir-ym) $(always)495 $(subdir-ym) $(always-y)
494 @:496 @:
495 497
496endif498endif
scripts/Makefile.clean+2−2
@@ -28,8 +28,8 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) · 27 unmodified lines
28# directory28# directory
29 29
30__clean-files := $(extra-y) $(extra-m) $(extra-) \30__clean-files := $(extra-y) $(extra-m) $(extra-) \
31 $(always) $(targets) $(clean-files) \31 $(always) $(always-y) $(always-m) $(always-) $(targets) $(clean-files) \
32 $(hostprogs-y) $(hostprogs-m) $(hostprogs-) \32 $(hostprogs) $(hostprogs-y) $(hostprogs-m) $(hostprogs-) \
33 $(hostlibs-y) $(hostlibs-m) $(hostlibs-) \33 $(hostlibs-y) $(hostlibs-m) $(hostlibs-) \
34 $(hostcxxlibs-y) $(hostcxxlibs-m)34 $(hostcxxlibs-y) $(hostcxxlibs-m)
35 35
scripts/Makefile.host+4−4
@@ -24,21 +24,21 @@ $(obj)/%.tab.c $(obj)/%.tab.h: $(src)/%.y FORCE · 23 unmodified lines
24# Both C and C++ are supported, but preferred language is C for such utilities.24# Both C and C++ are supported, but preferred language is C for such utilities.
25#25#
26# Sample syntax (see Documentation/kbuild/makefiles.rst for reference)26# Sample syntax (see Documentation/kbuild/makefiles.rst for reference)
27# hostprogs-y := bin2hex27# hostprogs := bin2hex
28# Will compile bin2hex.c and create an executable named bin2hex28# Will compile bin2hex.c and create an executable named bin2hex
29#29#
30# hostprogs-y := lxdialog30# hostprogs := lxdialog
31# lxdialog-objs := checklist.o lxdialog.o31# lxdialog-objs := checklist.o lxdialog.o
32# Will compile lxdialog.c and checklist.c, and then link the executable32# Will compile lxdialog.c and checklist.c, and then link the executable
33# lxdialog, based on checklist.o and lxdialog.o33# lxdialog, based on checklist.o and lxdialog.o
34#34#
35# hostprogs-y := qconf35# hostprogs := qconf
36# qconf-cxxobjs := qconf.o36# qconf-cxxobjs := qconf.o
37# qconf-objs := menu.o37# qconf-objs := menu.o
38# Will compile qconf as a C++ program, and menu as a C program.38# Will compile qconf as a C++ program, and menu as a C program.
39# They are linked as C++ code to the executable qconf39# They are linked as C++ code to the executable qconf
40 40
41__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))41__hostprogs := $(sort $(hostprogs))
42host-cshlib := $(sort $(hostlibs-y) $(hostlibs-m))42host-cshlib := $(sort $(hostlibs-y) $(hostlibs-m))
43host-cxxshlib := $(sort $(hostcxxlibs-y) $(hostcxxlibs-m))43host-cxxshlib := $(sort $(hostcxxlibs-y) $(hostcxxlibs-m))
44 44
scripts/Makefile.lib+5−1
@@ -4,6 +4,8 @@ asflags-y += $(EXTRA_AFLAGS) · 3 unmodified lines
4ccflags-y += $(EXTRA_CFLAGS)4ccflags-y += $(EXTRA_CFLAGS)
5cppflags-y += $(EXTRA_CPPFLAGS)5cppflags-y += $(EXTRA_CPPFLAGS)
6ldflags-y += $(EXTRA_LDFLAGS)6ldflags-y += $(EXTRA_LDFLAGS)
7always-y += $(always)
8hostprogs += $(hostprogs-y) $(hostprogs-m)
7 9
8# flags that take effect in current and sub directories10# flags that take effect in current and sub directories
9KBUILD_AFLAGS += $(subdir-asflags-y)11KBUILD_AFLAGS += $(subdir-asflags-y)
@@ -59,6 +61,8 @@ subdir-obj-y := $(filter %/built-in.a, $(obj-y)) · 49 unmodified lines
59real-obj-y := $(foreach m, $(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))61real-obj-y := $(foreach m, $(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))
60real-obj-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)) $($(m:.o=-))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m)))62real-obj-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)) $($(m:.o=-))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m)))
61 63
64always-y += $(always-m)
65
62# DTB66# DTB
63# If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built67# If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built
64extra-y += $(dtb-y)68extra-y += $(dtb-y)
@@ -72,7 +76,7 @@ endif · 7 unmodified lines
72# Add subdir path76# Add subdir path
73 77
74extra-y := $(addprefix $(obj)/,$(extra-y))78extra-y := $(addprefix $(obj)/,$(extra-y))
75always := $(addprefix $(obj)/,$(always))79always-y := $(addprefix $(obj)/,$(always-y))
76targets := $(addprefix $(obj)/,$(targets))80targets := $(addprefix $(obj)/,$(targets))
77modorder := $(addprefix $(obj)/,$(modorder))81modorder := $(addprefix $(obj)/,$(modorder))
78obj-m := $(addprefix $(obj)/,$(obj-m))82obj-m := $(addprefix $(obj)/,$(obj-m))
scripts/basic/Makefile+2−2
@@ -2,5 +2,5 @@ · 1 unmodified line
2#2#
3# fixdep: used to generate dependency information during build process3# fixdep: used to generate dependency information during build process
4 4
5hostprogs-y := fixdep5hostprogs := fixdep
6always := $(hostprogs-y)6always-y := $(hostprogs)
scripts/dtc/Makefile+2−2
@@ -1,8 +1,8 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2# scripts/dtc makefile2# scripts/dtc makefile
3 3
4hostprogs-$(CONFIG_DTC) := dtc4hostprogs := dtc
5always := $(hostprogs-y)5always-$(CONFIG_DTC) := $(hostprogs)
6 6
7dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \7dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
8 srcpos.o checks.o util.o8 srcpos.o checks.o util.o
scripts/gcc-plugins/Makefile+1−1
@@ -23,7 +23,7 @@ $(objtree)/$(obj)/randomize_layout_seed.h: FORCE · 22 unmodified lines
23targets = randomize_layout_seed.h randomize_layout_hash.h23targets = randomize_layout_seed.h randomize_layout_hash.h
24 24
25$(HOSTLIBS)-y := $(foreach p,$(GCC_PLUGIN),$(if $(findstring /,$(p)),,$(p)))25$(HOSTLIBS)-y := $(foreach p,$(GCC_PLUGIN),$(if $(findstring /,$(p)),,$(p)))
26always := $($(HOSTLIBS)-y)26always-y := $($(HOSTLIBS)-y)
27 27
28$(foreach p,$($(HOSTLIBS)-y:%.so=%),$(eval $(p)-objs := $(p).o))28$(foreach p,$($(HOSTLIBS)-y:%.so=%),$(eval $(p)-objs := $(p).o))
29 29
scripts/genksyms/Makefile+2−2
@@ -1,7 +1,7 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2 2
3hostprogs-y := genksyms3hostprogs := genksyms
4always := $(hostprogs-y)4always-y := $(hostprogs)
5 5
6genksyms-objs := genksyms.o parse.tab.o lex.lex.o6genksyms-objs := genksyms.o parse.tab.o lex.lex.o
7 7
scripts/kconfig/Makefile+5−5
@@ -157,11 +157,11 @@ HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src) · 156 unmodified lines
157HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src)157HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src)
158 158
159# conf: Used for defconfig, oldconfig and related targets159# conf: Used for defconfig, oldconfig and related targets
160hostprogs-y += conf160hostprogs += conf
161conf-objs := conf.o $(common-objs)161conf-objs := conf.o $(common-objs)
162 162
163# nconf: Used for the nconfig target based on ncurses163# nconf: Used for the nconfig target based on ncurses
164hostprogs-y += nconf164hostprogs += nconf
165nconf-objs := nconf.o nconf.gui.o $(common-objs)165nconf-objs := nconf.o nconf.gui.o $(common-objs)
166 166
167HOSTLDLIBS_nconf = $(shell . $(obj)/nconf-cfg && echo $$libs)167HOSTLDLIBS_nconf = $(shell . $(obj)/nconf-cfg && echo $$libs)
@@ -171,7 +171,7 @@ HOSTCFLAGS_nconf.gui.o = $(shell . $(obj)/nconf-cfg && echo $$cflags) · 3 unmodified lines
171$(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/nconf-cfg171$(obj)/nconf.o $(obj)/nconf.gui.o: $(obj)/nconf-cfg
172 172
173# mconf: Used for the menuconfig target based on lxdialog173# mconf: Used for the menuconfig target based on lxdialog
174hostprogs-y += mconf174hostprogs += mconf
175lxdialog := $(addprefix lxdialog/, \175lxdialog := $(addprefix lxdialog/, \
176 checklist.o inputbox.o menubox.o textbox.o util.o yesno.o)176 checklist.o inputbox.o menubox.o textbox.o util.o yesno.o)
177mconf-objs := mconf.o $(lxdialog) $(common-objs)177mconf-objs := mconf.o $(lxdialog) $(common-objs)
@@ -183,7 +183,7 @@ $(foreach f, mconf.o $(lxdialog), \ · 5 unmodified lines
183$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg183$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg
184 184
185# qconf: Used for the xconfig target based on Qt185# qconf: Used for the xconfig target based on Qt
186hostprogs-y += qconf186hostprogs += qconf
187qconf-cxxobjs := qconf.o187qconf-cxxobjs := qconf.o
188qconf-objs := images.o $(common-objs)188qconf-objs := images.o $(common-objs)
189 189
@@ -199,7 +199,7 @@ $(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg · 9 unmodified lines
199 $(call cmd,moc)199 $(call cmd,moc)
200 200
201# gconf: Used for the gconfig target based on GTK+201# gconf: Used for the gconfig target based on GTK+
202hostprogs-y += gconf202hostprogs += gconf
203gconf-objs := gconf.o images.o $(common-objs)203gconf-objs := gconf.o images.o $(common-objs)
204 204
205HOSTLDLIBS_gconf = $(shell . $(obj)/gconf-cfg && echo $$libs)205HOSTLDLIBS_gconf = $(shell . $(obj)/gconf-cfg && echo $$libs)
scripts/mod/Makefile+2−2
@@ -1,8 +1,8 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2OBJECT_FILES_NON_STANDARD := y2OBJECT_FILES_NON_STANDARD := y
3 3
4hostprogs-y := modpost mk_elfconfig4hostprogs := modpost mk_elfconfig
5always := $(hostprogs-y) empty.o5always-y := $(hostprogs) empty.o
6 6
7modpost-objs := modpost.o file2alias.o sumversion.o7modpost-objs := modpost.o file2alias.o sumversion.o
8 8
scripts/selinux/genheaders/Makefile+2−2
@@ -1,7 +1,7 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2hostprogs-y := genheaders2hostprogs := genheaders
3HOST_EXTRACFLAGS += \3HOST_EXTRACFLAGS += \
4 -I$(srctree)/include/uapi -I$(srctree)/include \4 -I$(srctree)/include/uapi -I$(srctree)/include \
5 -I$(srctree)/security/selinux/include5 -I$(srctree)/security/selinux/include
6 6
7always := $(hostprogs-y)7always-y := $(hostprogs)
scripts/selinux/mdp/Makefile+2−2
@@ -1,8 +1,8 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2hostprogs-y := mdp2hostprogs := mdp
3HOST_EXTRACFLAGS += \3HOST_EXTRACFLAGS += \
4 -I$(srctree)/include/uapi -I$(srctree)/include \4 -I$(srctree)/include/uapi -I$(srctree)/include \
5 -I$(srctree)/security/selinux/include -I$(objtree)/include5 -I$(srctree)/security/selinux/include -I$(objtree)/include
6 6
7always := $(hostprogs-y)7always-y := $(hostprogs)
8clean-files := policy.* file_contexts8clean-files := policy.* file_contexts
usr/Makefile+1−1
@@ -52,7 +52,7 @@ ifeq ($(cpio-data),) · 51 unmodified lines
52 52
53cpio-data := $(obj)/initramfs_data.cpio53cpio-data := $(obj)/initramfs_data.cpio
54 54
55hostprogs-y := gen_init_cpio55hostprogs := gen_init_cpio
56 56
57# .initramfs_data.cpio.d is used to identify all files included57# .initramfs_data.cpio.d is used to identify all files included
58# in initramfs and to detect if any files are added/removed.58# in initramfs and to detect if any files are added/removed.