forked from Xilinx/linux-xlnx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kbuild: introduce hostprogs-always-y and userprogs-always-y
To build host programs, you need to add the program names to 'hostprogs' to use the necessary build rule, but it is not enough to build them because there is no dependency. There are two types of host programs: built as the prerequisite of another (e.g. gen_crc32table in lib/Makefile), or always built when Kbuild visits the Makefile (e.g. genksyms in scripts/genksyms/Makefile). The latter is typical in Makefiles under scripts/, which contains host programs globally used during the kernel build. To build them, you need to add them to both 'hostprogs' and 'always-y'. This commit adds hostprogs-always-y as a shorthand. The same applies to user programs. net/bpfilter/Makefile builds bpfilter_umh on demand, hence always-y is unneeded. In contrast, programs under samples/ are added to both 'userprogs' and 'always-y' so they are always built when Kbuild visits the Makefiles. userprogs-always-y works as a shorthand. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Miguel Ojeda <[email protected]>
- Loading branch information
Showing
22 changed files
with
78 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
userprogs := cfag12864b-example | ||
always-y := $(userprogs) | ||
userprogs-always-y += cfag12864b-example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
userprogs := binderfs_example | ||
always-y := $(userprogs) | ||
userprogs-always-y += binderfs_example | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
obj-$(CONFIG_SAMPLE_CONNECTOR) += cn_test.o | ||
|
||
userprogs := ucon | ||
always-$(CONFIG_CC_CAN_LINK) := $(userprogs) | ||
userprogs-always-$(CONFIG_CC_CAN_LINK) += ucon | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
userprogs := hid-example | ||
always-y := $(userprogs) | ||
userprogs-always-y += hid-example | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (c) 2012-2019, Intel Corporation. All rights reserved. | ||
|
||
userprogs := mei-amt-version | ||
always-y := $(userprogs) | ||
userprogs-always-y += mei-amt-version | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
usertprogs := pidfd-metadata | ||
always-y := $(userprogs) | ||
usertprogs-always-y += pidfd-metadata | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
userprogs := bpf-fancy dropper bpf-direct user-trap | ||
userprogs-always-y += bpf-fancy dropper bpf-direct user-trap | ||
|
||
bpf-fancy-objs := bpf-fancy.o bpf-helper.o | ||
|
||
userccflags += -I usr/include | ||
|
||
always-y := $(userprogs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
userprogs := hpet_example | ||
always-y := $(userprogs) | ||
userprogs-always-y += hpet_example | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
userprogs := uhid-example | ||
always-y := $(userprogs) | ||
userprogs-always-y += uhid-example | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
userprogs := test-fsmount test-statx | ||
always-y := $(userprogs) | ||
userprogs-always-y += test-fsmount test-statx | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
userprogs := watch_test | ||
always-y := $(userprogs) | ||
userprogs-always-y += watch_test | ||
|
||
userccflags += -I usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
userprogs := watchdog-simple | ||
always-y := $(userprogs) | ||
userprogs-always-y += watchdog-simple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
hostprogs := genheaders | ||
hostprogs-always-y += genheaders | ||
HOST_EXTRACFLAGS += \ | ||
-I$(srctree)/include/uapi -I$(srctree)/include \ | ||
-I$(srctree)/security/selinux/include | ||
|
||
always-y := $(hostprogs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
hostprogs := mdp | ||
hostprogs-always-y += mdp | ||
HOST_EXTRACFLAGS += \ | ||
-I$(srctree)/include/uapi -I$(srctree)/include \ | ||
-I$(srctree)/security/selinux/include -I$(objtree)/include | ||
|
||
always-y := $(hostprogs) | ||
clean-files := policy.* file_contexts |