mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Weißschuh" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: thomas.weissschuh@linutronix.de,
	Thomas Gleixner <tglx@kernel.org>,
	Nicolas Schier <nsc@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/vdso] kbuild: Support generated asm-headers in subdirectories
Date: Mon, 10 Aug 2026 14:27:02 -0000	[thread overview]
Message-ID: <178637202269.442315.14328280570641279524.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260724-vdso-arch-clockmodes-v4-1-ddbe447be860@linutronix.de>

The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     2d69b891e6461eb3dc9af4741ded915966db4e01
Gitweb:        https://git.kernel.org/tip/2d69b891e6461eb3dc9af4741ded915966db4e01
Author:        Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate:    Fri, 24 Jul 2026 15:36:18 +02:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Mon, 10 Aug 2026 16:25:21 +02:00

kbuild: Support generated asm-headers in subdirectories

Extend the asm-header stub generation to also handle subdirectories.
An upcoming vdso/ header refactoring requires this.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-1-ddbe447be860@linutronix.de
---
 scripts/Makefile.asm-headers | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
index 8a4856e..b389313 100644
--- a/scripts/Makefile.asm-headers
+++ b/scripts/Makefile.asm-headers
@@ -48,14 +48,13 @@ syscall-y   := $(addprefix $(obj)/, $(syscall-y))
 generated-y := $(addprefix $(obj)/, $(generated-y))
 
 # Remove stale wrappers when the corresponding files are removed from generic-y
-old-headers := $(wildcard $(obj)/*.h)
+old-headers := $(shell test -d $(obj) && find $(obj) -name *.h)
 unwanted    := $(filter-out $(generic-y) $(generated-y) $(syscall-y),$(old-headers))
 
-quiet_cmd_wrap = WRAP    $@
-      cmd_wrap = echo "\#include <asm-generic/$*.h>" > $@
+filechk_wrap = echo "\#include <asm-generic/$*.h>"
 
 quiet_cmd_remove = REMOVE  $(unwanted)
-      cmd_remove = rm -f $(unwanted)
+      cmd_remove = rm -f $(unwanted); find $(obj) -type d -empty -delete
 
 quiet_cmd_syshdr = SYSHDR  $@
       cmd_syshdr = $(CONFIG_SHELL) $(syshdr) \
@@ -74,8 +73,8 @@ all: $(generic-y) $(syscall-y)
 	$(if $(unwanted),$(call cmd,remove))
 	@:
 
-$(obj)/%.h: $(srctree)/$(generic)/%.h
-	$(call cmd,wrap)
+$(obj)/%.h: $(srctree)/$(generic)/%.h FORCE
+	$(call filechk,wrap)
 
 $(obj)/unistd_%.h: $(syscalltbl) $(syshdr) FORCE
 	$(call if_changed,syshdr)

  parent reply	other threads:[~2026-08-10 14:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 13:36 [PATCH v4 0/7] vDSO: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdeffery Thomas Weißschuh
2026-07-24 13:36 ` [PATCH v4 1/7] kbuild: support generated asm-headers in subdirectories Thomas Weißschuh
2026-08-01 19:30   ` Nicolas Schier
2026-08-10 14:27   ` tip-bot2 for Thomas Weißschuh [this message]
2026-07-24 13:36 ` [PATCH v4 2/7] vDSO: Make clockmode constants available without CONFIG_GENERIC_GETTIMEOFDAY Thomas Weißschuh
2026-07-24 15:31   ` Arnd Bergmann
2026-08-10 14:27   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-07-24 13:36 ` [PATCH v4 3/7] MIPS: csrc-r4k: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdeffery Thomas Weißschuh
2026-08-10 14:26   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-07-24 13:36 ` [PATCH v4 4/7] clocksource/drivers/mips-gic-timer: " Thomas Weißschuh
2026-08-10 14:26   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-08-12  8:32   ` [PATCH v4 4/7] " Daniel Lezcano
2026-07-24 13:36 ` [PATCH v4 5/7] clocksource/drivers/arm_arch_timer: " Thomas Weißschuh
2026-08-10 14:26   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-08-12  8:32   ` [PATCH v4 5/7] " Daniel Lezcano
2026-07-24 13:36 ` [PATCH v4 6/7] clocksource/drivers/timer-riscv: " Thomas Weißschuh
2026-08-10 14:26   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-08-12  8:33   ` [PATCH v4 6/7] " Daniel Lezcano
2026-07-24 13:36 ` [PATCH v4 7/7] LoongArch: " Thomas Weißschuh
2026-08-10 14:26   ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-07-24 15:35 ` [PATCH v4 0/7] vDSO: " Arnd Bergmann
2026-08-13 10:26 ` Vincenzo Frascino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178637202269.442315.14328280570641279524.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=nsc@kernel.org \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®