linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	Alexander Lobakin <alobakin@pm.me>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 2/2] mips: syscalls: use pattern rules to generate syscall headers
Date: Fri, 28 May 2021 12:46:15 +0900	[thread overview]
Message-ID: <20210528034615.2157002-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20210528034615.2157002-1-masahiroy@kernel.org>

Use pattern rules to unify similar build rules among n32, n64, and o32.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/mips/kernel/syscalls/Makefile | 28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

diff --git a/arch/mips/kernel/syscalls/Makefile b/arch/mips/kernel/syscalls/Makefile
index 6eee6a3b85df..10bf90dc02c0 100644
--- a/arch/mips/kernel/syscalls/Makefile
+++ b/arch/mips/kernel/syscalls/Makefile
@@ -5,9 +5,6 @@ uapi := arch/$(SRCARCH)/include/generated/uapi/asm
 _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)')	\
 	  $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
 
-syscalln32 := $(src)/syscall_n32.tbl
-syscalln64 := $(src)/syscall_n64.tbl
-syscallo32 := $(src)/syscall_o32.tbl
 syshdr := $(srctree)/scripts/syscallhdr.sh
 sysnr := $(srctree)/$(src)/syscallnr.sh
 systbl := $(srctree)/scripts/syscalltbl.sh
@@ -23,34 +20,17 @@ quiet_cmd_sysnr = SYSNR   $@
 quiet_cmd_systbl = SYSTBL  $@
       cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@
 
-$(uapi)/unistd_n32.h: $(syscalln32) $(syshdr) FORCE
-	$(call if_changed,syshdr)
-
-$(uapi)/unistd_n64.h: $(syscalln64) $(syshdr) FORCE
-	$(call if_changed,syshdr)
-
-$(uapi)/unistd_o32.h: $(syscallo32) $(syshdr) FORCE
+$(uapi)/unistd_%.h: $(src)/syscall_%.tbl $(syshdr) FORCE
 	$(call if_changed,syshdr)
 
 sysnr_pfx_unistd_nr_n32 := N32
-$(kapi)/unistd_nr_n32.h: $(syscalln32) $(sysnr) FORCE
-	$(call if_changed,sysnr)
-
 sysnr_pfx_unistd_nr_n64 := 64
-$(kapi)/unistd_nr_n64.h: $(syscalln64) $(sysnr) FORCE
-	$(call if_changed,sysnr)
-
 sysnr_pfx_unistd_nr_o32 := O32
-$(kapi)/unistd_nr_o32.h: $(syscallo32) $(sysnr) FORCE
-	$(call if_changed,sysnr)
-
-$(kapi)/syscall_table_n32.h: $(syscalln32) $(systbl) FORCE
-	$(call if_changed,systbl)
 
-$(kapi)/syscall_table_n64.h: $(syscalln64) $(systbl) FORCE
-	$(call if_changed,systbl)
+$(kapi)/unistd_nr_%.h: $(src)/syscall_%.tbl $(sysnr) FORCE
+	$(call if_changed,sysnr)
 
-$(kapi)/syscall_table_o32.h: $(syscallo32) $(systbl) FORCE
+$(kapi)/syscall_table_%.h: $(src)/syscall_%.tbl $(systbl) FORCE
 	$(call if_changed,systbl)
 
 uapisyshdr-y		+= unistd_n32.h			\
-- 
2.27.0


  reply	other threads:[~2021-05-28  3:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28  3:46 [PATCH 1/2] mips: syscalls: define syscall offsets directly in <asm/unistd.h> Masahiro Yamada
2021-05-28  3:46 ` Masahiro Yamada [this message]
2021-06-01  9:48   ` [PATCH 2/2] mips: syscalls: use pattern rules to generate syscall headers Thomas Bogendoerfer
2021-05-28 13:47 ` [PATCH 1/2] mips: syscalls: define syscall offsets directly in <asm/unistd.h> Philippe Mathieu-Daudé
2021-06-01  9:47 ` Thomas Bogendoerfer

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=20210528034615.2157002-2-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=alobakin@pm.me \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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;
as well as URLs for NNTP newsgroup(s).