Message ID | 20210125231659.106201-1-masahiroy@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 8b5f4eb3ab700046b9f41d53544791fa02852551 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/4] net: move CONFIG_NET guard to top Makefile | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | warning | Series does not have a cover letter |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 15 of 15 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 42 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Tue, 26 Jan 2021 08:16:55 +0900 you wrote: > When CONFIG_NET is disabled, nothing under the net/ directory is > compiled. Move the CONFIG_NET guard to the top Makefile so the net/ > directory is entirely skipped. > > When Kbuild visits net/Makefile, CONFIG_NET is obvioulsy 'y' because > CONFIG_NET is a bool option. Clean up net/Makefile. > > [...] Here is the summary with links: - [1/4] net: move CONFIG_NET guard to top Makefile https://git.kernel.org/netdev/net-next/c/8b5f4eb3ab70 - [2/4] net: dcb: use obj-$(CONFIG_DCB) form in net/Makefile https://git.kernel.org/netdev/net-next/c/1e328ed55920 - [3/4] net: switchdev: use obj-$(CONFIG_NET_SWITCHDEV) form in net/Makefile https://git.kernel.org/netdev/net-next/c/0cfd99b487f1 - [4/4] net: l3mdev: use obj-$(CONFIG_NET_L3_MASTER_DEV) form in net/Makefile https://git.kernel.org/netdev/net-next/c/d32f834cd687 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/Makefile b/Makefile index b0e4767735dc..61357f7eb55f 100644 --- a/Makefile +++ b/Makefile @@ -649,7 +649,8 @@ ifeq ($(KBUILD_EXTMOD),) core-y := init/ usr/ drivers-y := drivers/ sound/ drivers-$(CONFIG_SAMPLES) += samples/ -drivers-y += net/ virt/ +drivers-$(CONFIG_NET) += net/ +drivers-y += virt/ libs-y := lib/ endif # KBUILD_EXTMOD diff --git a/net/Makefile b/net/Makefile index d96b0aa8f39f..6fa3b2e26cab 100644 --- a/net/Makefile +++ b/net/Makefile @@ -6,20 +6,19 @@ # Rewritten to use lists instead of if-statements. # -obj-$(CONFIG_NET) := devres.o socket.o core/ +obj-y := devres.o socket.o core/ -tmp-$(CONFIG_COMPAT) := compat.o -obj-$(CONFIG_NET) += $(tmp-y) +obj-$(CONFIG_COMPAT) += compat.o # LLC has to be linked before the files in net/802/ obj-$(CONFIG_LLC) += llc/ -obj-$(CONFIG_NET) += ethernet/ 802/ sched/ netlink/ bpf/ ethtool/ +obj-y += ethernet/ 802/ sched/ netlink/ bpf/ ethtool/ obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_INET) += ipv4/ obj-$(CONFIG_TLS) += tls/ obj-$(CONFIG_XFRM) += xfrm/ obj-$(CONFIG_UNIX_SCM) += unix/ -obj-$(CONFIG_NET) += ipv6/ +obj-y += ipv6/ obj-$(CONFIG_BPFILTER) += bpfilter/ obj-$(CONFIG_PACKET) += packet/ obj-$(CONFIG_NET_KEY) += key/ @@ -63,9 +62,7 @@ obj-$(CONFIG_6LOWPAN) += 6lowpan/ obj-$(CONFIG_IEEE802154) += ieee802154/ obj-$(CONFIG_MAC802154) += mac802154/ -ifeq ($(CONFIG_NET),y) obj-$(CONFIG_SYSCTL) += sysctl_net.o -endif obj-$(CONFIG_DNS_RESOLVER) += dns_resolver/ obj-$(CONFIG_CEPH_LIB) += ceph/ obj-$(CONFIG_BATMAN_ADV) += batman-adv/
When CONFIG_NET is disabled, nothing under the net/ directory is compiled. Move the CONFIG_NET guard to the top Makefile so the net/ directory is entirely skipped. When Kbuild visits net/Makefile, CONFIG_NET is obvioulsy 'y' because CONFIG_NET is a bool option. Clean up net/Makefile. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- Makefile | 3 ++- net/Makefile | 11 ++++------- 2 files changed, 6 insertions(+), 8 deletions(-)