All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-kbuild@vger.kernel.org
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Frank Rowand <frank.rowand@sony.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: [PATCH 09/10] kbuild: add *.asn1.[ch] to 'targets' automatically
Date: Fri, 23 Mar 2018 22:04:38 +0900	[thread overview]
Message-ID: <1521810279-6282-9-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1521810279-6282-1-git-send-email-yamada.masahiro@socionext.com>

Use $(call if_changed,...) instead of $(call cmd,...) in case the
build command is changed in the future.  Add intermediate files to
'targets' automatically to include *.cmd files.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/Makefile.build | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 8c3ca61..cc081af 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -432,8 +432,9 @@ quiet_cmd_asn1_compiler = ASN.1   $@
 
 .PRECIOUS: $(objtree)/$(obj)/%.asn1.c $(objtree)/$(obj)/%.asn1.h
 
-$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler
-	$(call cmd,asn1_compiler)
+$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 \
+					$(objtree)/scripts/asn1_compiler FORCE
+	$(call if_changed,asn1_compiler)
 
 # Build the compiled-in targets
 # ---------------------------------------------------------------------------
@@ -544,10 +545,12 @@ targets := $(filter-out $(PHONY), $(targets))
 intermediate_targets = $(foreach sfx, $(2), \
 				$(patsubst %$(strip $(1)),%$(sfx), \
 					$(filter %$(strip $(1)), $(targets))))
+# %.asn1.o <- %.asn1.[ch] <- %.asn1
 # %.dtb.o <- %.dtb.S <- %.dtb <- %.dts
 # %.lex.o <- %.lex.c <- %.l
 # %.tab.o <- %.tab.[ch] <- %.y
-targets += $(call intermediate_targets, .dtb.o, .dtb.S .dtb) \
+targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \
+	   $(call intermediate_targets, .dtb.o, .dtb.S .dtb) \
 	   $(call intermediate_targets, .lex.o, .lex.c) \
 	   $(call intermediate_targets, .tab.o, .tab.c .tab.h)
 
-- 
2.7.4

  parent reply	other threads:[~2018-03-23 13:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 13:04 [PATCH 01/10] .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore Masahiro Yamada
2018-03-23 13:04 ` [PATCH 02/10] kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile Masahiro Yamada
2018-03-24  1:20   ` Frank Rowand
2018-03-23 13:04 ` [PATCH 03/10] genksyms: generate lexer and parser during build instead of shipping Masahiro Yamada
2018-03-30 17:40   ` [03/10] " Andrei Vagin
2018-03-30 22:21     ` Andrei Vagin
2018-03-31  2:20       ` Masahiro Yamada
2018-03-31  5:11         ` Andrei Vagin
2018-03-23 13:04 ` [PATCH 04/10] kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically Masahiro Yamada
2018-03-24  1:22   ` Frank Rowand
2018-03-23 13:04 ` [PATCH 05/10] kbuild: add %.dtb.S and %.dtb " Masahiro Yamada
2018-03-24  1:24   ` Frank Rowand
2018-03-23 13:04 ` [PATCH 06/10] .gitignore: move *-asn1.[ch] patterns to the top-level .gitignore Masahiro Yamada
2018-03-27  6:04   ` Masahiro Yamada
2018-03-23 13:04 ` [PATCH 07/10] kbuild: clean up *-asn1.[ch] patterns from top-level Makefile Masahiro Yamada
2018-03-27  6:04   ` Masahiro Yamada
2018-03-23 13:04 ` [PATCH 08/10] kbuild: rename *-asn1.[ch] to *.asn.[ch] Masahiro Yamada
2018-03-23 13:30   ` Masahiro Yamada
2018-03-26 15:45   ` David Howells
2018-03-27  4:08     ` Masahiro Yamada
2018-03-27  6:06   ` Masahiro Yamada
2018-03-23 13:04 ` Masahiro Yamada [this message]
2018-03-26 15:38   ` [PATCH 09/10] kbuild: add *.asn1.[ch] to 'targets' automatically Masahiro Yamada
2018-03-23 13:04 ` [PATCH 10/10] kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS specifier Masahiro Yamada
2018-03-24  1:26   ` Frank Rowand
2018-03-24  1:27 ` [PATCH 01/10] .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore Frank Rowand

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=1521810279-6282-9-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=arnd@arndb.de \
    --cc=frank.rowand@sony.com \
    --cc=geert@linux-m68k.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=sam@ravnborg.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.