From patchwork Thu Jan 17 10:02:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 155809 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1765549jaa; Thu, 17 Jan 2019 02:03:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN4dMqyCYGNqE30Ak87RztFFIANvuIk0AzrCmAMQs8/UffOhMelI2+srWp9tpWlRjloRazkr X-Received: by 2002:a63:6ecf:: with SMTP id j198mr13135771pgc.3.1547719433142; Thu, 17 Jan 2019 02:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547719433; cv=none; d=google.com; s=arc-20160816; b=QK264zPHHpCeGpWtwpAJERXTGzt8VHLW73eIdyGrB9hSe0yT8yq5qu/5AVBdllwSY+ 8U0Kg02Gy18q7Oi3MBGj46mX0bq1YLfhAbkheasylh24lXzFQzhQs62mhC8vzmUgBJG6 pUP0xwIZbaf37W273dVkOBhC1hit3fPh7PUlejmoymM3uVZkBa9xxv4Wr6MkS2+zQZ3t WntKYS1+lkB+Lr7sDdsYsuy0nvdhaFAdiNBkAGHEjBiVCk6dc1XOxcj118OPfgTh1Wzn yrnvoMZ4WYXDvB1AANFb2ZYL0PkU7Q6uJknmL6zwYLwkjaLSLd2/EHcsK/Nu5byobfds ms0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=HJfElWjeDdYHGcIw2ZLEvlLvoV4a0ENSRIiBQO5miwQ=; b=ElKzGI09bpgixi06g4jccTzAwSDysqY6wqaaS6ZjjFbJkKjO/53mL1g6BT8jgTQuv0 Fmaeq9Llc45+Cxt/QzPU7eTA6eu8F03WPBt3Sw9O2gZLtemhjcSf5aDGsll7ZQLUaZQ+ BCtNLq9s+g3gJ8NoQbYkAxjFNJJGpv8tzDSzK3H8ytgMQfIxe/DgzK9vpejKiDTm47QA 97RE4liGhWMuwSGpilclsW7m+4JaitlIJFALL7EU5j3aCV5xjrXxlWljSp9I8Pa8IiG8 zWcCg7X86dQY9J5Z6hk0N+3oYgGB/aZiRAvcqwUyYWax3vkCc1qv2SC08GV+c+qqInF7 2wwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=V86PDZ4p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si1389602plm.1.2019.01.17.02.03.52; Thu, 17 Jan 2019 02:03:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=V86PDZ4p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727509AbfAQKDg (ORCPT + 10 others); Thu, 17 Jan 2019 05:03:36 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:49374 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbfAQKDf (ORCPT ); Thu, 17 Jan 2019 05:03:35 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id x0HA38Gq009525; Thu, 17 Jan 2019 19:03:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com x0HA38Gq009525 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547719389; bh=HJfElWjeDdYHGcIw2ZLEvlLvoV4a0ENSRIiBQO5miwQ=; h=From:To:Cc:Subject:Date:From; b=V86PDZ4pL4auDigpLKcpBBTkpbujgL6NOg3W2y1MRllItAie8rzrD+0zHiSLNg9ZU vTOto6IQIygEELgcf0ZGud/iWqY31khHJJmvNc7jEKa5ZQDu/zQcc0ExnqIECXH/sv BOnAMQTOIYpTYZpAKQol/SSMKCaxLYJcbWbRYRGxgn0XESzggseYY3jlUeWmp2qW3A tG2RJmZ9mT2yFfk+9a5q1GyJtBcxOL1V7h4CiSOjFfw5AS9KuzjX1sJfBGVKjYJYFd SNTHLmqILz4g4JRKM4toMZ3tbtzPsbOdvfSsJoWXUQeiQo+BnoGoaNOcQLtzYK/jem nED4yGHWPVK6w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Martin Schwidefsky , linux-s390@vger.kernel.org, Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] kbuild: simplify rules of data compression with size appending Date: Thu, 17 Jan 2019 19:02:41 +0900 Message-Id: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All the callers of size_append pass $(filter-out FORCE,$^). Move $(filter-out FORCE,$^) to the definition of size_append. This makes the callers cleaner because $(call ...) is unneeded for a macro with no argument. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.lib | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) -- 2.7.4 diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ecad15b..ebaa348 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -321,7 +321,7 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) # append the size as a 32-bit littleendian number as gzip does. size_append = printf $(shell \ dec_size=0; \ -for F in $1; do \ +for F in $(filter-out FORCE,$^); do \ fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F); \ dec_size=$$(expr $$dec_size + $$fsize); \ done; \ @@ -335,23 +335,20 @@ printf "%08x\n" $$dec_size | \ ) quiet_cmd_bzip2 = BZIP2 $@ -cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ - bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ + cmd_bzip2 = (cat $(filter-out FORCE,$^) | bzip2 -9 && $(size_append)) > $@ # Lzma # --------------------------------------------------------------------------- quiet_cmd_lzma = LZMA $@ -cmd_lzma = (cat $(filter-out FORCE,$^) | \ - lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ + cmd_lzma = (cat $(filter-out FORCE,$^) | lzma -9 && $(size_append)) > $@ quiet_cmd_lzo = LZO $@ -cmd_lzo = (cat $(filter-out FORCE,$^) | \ - lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ + cmd_lzo = (cat $(filter-out FORCE,$^) | lzop -9 && $(size_append)) > $@ quiet_cmd_lz4 = LZ4 $@ -cmd_lz4 = (cat $(filter-out FORCE,$^) | \ - lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ + cmd_lz4 = (cat $(filter-out FORCE,$^) | lz4c -l -c1 stdin stdout && \ + $(size_append)) > $@ # U-Boot mkimage # --------------------------------------------------------------------------- @@ -394,8 +391,7 @@ quiet_cmd_uimage = UIMAGE $@ # decompression mode. A BCJ filter isn't used either. quiet_cmd_xzkern = XZKERN $@ cmd_xzkern = (cat $(filter-out FORCE,$^) | \ - sh $(srctree)/scripts/xz_wrap.sh && \ - $(call size_append, $(filter-out FORCE,$^))) > $@ + sh $(srctree)/scripts/xz_wrap.sh && $(size_append)) > $@ quiet_cmd_xzmisc = XZMISC $@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ From patchwork Thu Jan 17 10:02:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 155807 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1765235jaa; Thu, 17 Jan 2019 02:03:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN5wTpXEwDCd9ZOVODBW87xRMqzxR+Xw1g2ePh9dGgpbW9NbUBblz/YhsBLqacwmtz9I5g7o X-Received: by 2002:a17:902:9a47:: with SMTP id x7mr14257112plv.126.1547719418403; Thu, 17 Jan 2019 02:03:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547719418; cv=none; d=google.com; s=arc-20160816; b=Bgk2Itu5m9RJu5AMWWrctyDEOkzC3XS9F6nog1XcRTC3v3CWjf6lirrlklMSDU7vwv f0Dd9qRJQjFiBK2CvoONTQpVd/VQZuu4jHMHmvKHdgKxkGWvwFA9DBRJUjDLFBp/90NF gGb7w9wu0w/0A56Yc/4qL9tZUW+KZ3GA2+1mlILqoB/gUMFyE2GvBNcETmLSXm1fI3GL gbvfeuWngtapCVq7j4fvyYnAwCrVK0gSSChpgAOX5efDMnjZEF6eliPPKNTyzvBamdgc E/8ZTn3o5heLntGZRoUMLxmKfwCqkZgmEW0zyNtwTgedu3kw4wBsd1lOcZub5RmnKFda H+pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=902g5stAYeaTwKaSHNz9A+gKSBiLuWQijr3nV3dwP7Y=; b=gVY0Aytn87jjFfJRmeVVsRDe8gMdSI7XHvdyZnDutgRB18SExuym+Dkwly7ZaSZaxM 3u6Euh3NgC/cYPVusIPMPd8aiCzK60UN6/FNq7cp+KQgSItR5pr8AJfiJJQDnkXfY1WB 5VLdbPHqDX8Bf1cqQZtSnmGcvfQ9oX2amAW+sdj2SeKyzvtlyGmRNyGCFPi/niNbo/ZF Bs2Q4BkGUoTA0QikYfAaZlKQRs88TCMKu6RIwVT4uiDYqbBg589SaudSC1GdAGoPRr5+ n4u6YYMIzyxBjA102OpDy8QTulI82MEEDWFM2u331AmWiKbjdWbqigbR8llm3XCshoDk Z7JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MgsLoJd1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t65si1338207pfd.246.2019.01.17.02.03.38; Thu, 17 Jan 2019 02:03:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MgsLoJd1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727592AbfAQKDh (ORCPT + 10 others); Thu, 17 Jan 2019 05:03:37 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:49355 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfAQKDf (ORCPT ); Thu, 17 Jan 2019 05:03:35 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id x0HA38Gr009525; Thu, 17 Jan 2019 19:03:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com x0HA38Gr009525 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547719389; bh=902g5stAYeaTwKaSHNz9A+gKSBiLuWQijr3nV3dwP7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MgsLoJd1U5FBVQDQFfoZt9g7h2takvZTZsPGLHCFhCJHlRmW7z/6sDFsiNI33ziih Xhof5XdgjMZaXEXJ4J4yD+ebl6SKTWey9Khz2dVELVb0NF48IoheeFE99b+z8hnBuh ybzpYRgATFO8F3+2F7DTjcND4pXAknMAOw7NvRhOrzB4ygjr+dSwYxy+DnwoFqFMDq OCXhuWk5fqNsRF2FZX1vl/4DN0KAmAtM57wgNULOCSm5mXIix0zx8Lhb883m0fJFk1 uAAL6o2c6zdTahJ5iZOZKrs2FhCEtbKq7ggYE/Ik70e8oWgoDdX31//1OP/2/C6y3X YjoelzfgE0CiA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Martin Schwidefsky , linux-s390@vger.kernel.org, Masahiro Yamada , Heiko Carstens , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] s390: make thin archives not directly depend on *.o.chkbss files Date: Thu, 17 Jan 2019 19:02:42 +0900 Message-Id: <1547719364-18849-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> References: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When I was refactoring cmd_ar_builtin in scripts/Makefile.build, I noticed the build breakage of s390. Some Makefiles of s390 add extra dependencies to built-in.a; built-in.a depends on timestamp files *.o.chkbss, but $(AR) does not want to include them into built-in.a. Insert a phony target 'chkbss' in between so that $(AR) can take $(filter-out $(PHONY), $^) as input. While I was here, I refactored Makefile.chkbss a little bit. Signed-off-by: Masahiro Yamada --- I want Acked-by from a s390 maintainer so this series can go into kbuild tree. Changes in v2: - New patch arch/s390/boot/Makefile | 4 ++-- arch/s390/boot/compressed/Makefile | 4 ++-- arch/s390/scripts/Makefile.chkbss | 25 +++++++++++-------------- 3 files changed, 15 insertions(+), 18 deletions(-) -- 2.7.4 Acked-by: Heiko Carstens diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile index d5ad724..b4d8a42 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -67,6 +67,6 @@ install: $(CONFIGURE) $(obj)/bzImage sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \ System.map "$(INSTALL_PATH)" -chkbss := $(OBJECTS) -chkbss-target := $(obj)/startup.a +chkbss := $(obj-y) +chkbss-target := startup.a include $(srctree)/arch/s390/scripts/Makefile.chkbss diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile index b1bdd15..fa529c5 100644 --- a/arch/s390/boot/compressed/Makefile +++ b/arch/s390/boot/compressed/Makefile @@ -63,6 +63,6 @@ OBJCOPYFLAGS_piggy.o := -I binary -O elf64-s390 -B s390:64-bit --rename-section $(obj)/piggy.o: $(obj)/vmlinux.bin$(suffix-y) FORCE $(call if_changed,objcopy) -chkbss := $(filter-out $(obj)/piggy.o $(obj)/info.o,$(OBJECTS)) -chkbss-target := $(obj)/vmlinux.bin +chkbss := $(filter-out piggy.o info.o, $(obj-y)) +chkbss-target := vmlinux.bin include $(srctree)/arch/s390/scripts/Makefile.chkbss diff --git a/arch/s390/scripts/Makefile.chkbss b/arch/s390/scripts/Makefile.chkbss index 9bba2c1..cd7e8f44 100644 --- a/arch/s390/scripts/Makefile.chkbss +++ b/arch/s390/scripts/Makefile.chkbss @@ -1,23 +1,20 @@ # SPDX-License-Identifier: GPL-2.0 +chkbss-target ?= built-in.a +$(obj)/$(chkbss-target): chkbss + +chkbss-files := $(addsuffix .chkbss, $(chkbss)) +clean-files += $(chkbss-files) + +PHONY += chkbss +chkbss: $(addprefix $(obj)/, $(chkbss-files)) + quiet_cmd_chkbss = CHKBSS $< -define cmd_chkbss - rm -f $@; \ + cmd_chkbss = \ if ! $(OBJDUMP) -j .bss -w -h $< | awk 'END { if ($$3) exit 1 }'; then \ echo "error: $< .bss section is not empty" >&2; exit 1; \ fi; \ touch $@; -endef - -chkbss-target ?= $(obj)/built-in.a -ifneq (,$(findstring /,$(chkbss))) -chkbss-files := $(patsubst %, %.chkbss, $(chkbss)) -else -chkbss-files := $(patsubst %, $(obj)/%.chkbss, $(chkbss)) -endif - -$(chkbss-target): $(chkbss-files) -targets += $(notdir $(chkbss-files)) -%.o.chkbss: %.o +$(obj)/%.o.chkbss: $(obj)/%.o $(call cmd,chkbss) From patchwork Thu Jan 17 10:02:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 155810 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1768260jaa; Thu, 17 Jan 2019 02:06:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN4E9Cbe99/Vt6U3sj2ly9gvmCh7A2c50nfh4mDMl6aBDmIyIhcy07P4DIjp+Op+Gr30ir0f X-Received: by 2002:a17:902:724a:: with SMTP id c10mr14537025pll.51.1547719577349; Thu, 17 Jan 2019 02:06:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547719577; cv=none; d=google.com; s=arc-20160816; b=NHA44KLtz8r7k69roO03ek9c/SQDI5xlTFwSVz6d16E8ebG9von/Spox4iV45ULKpT SmaGPeKSRjvKc3UFJAStxsWefmOXkhrhvR3waNSwc2H7W8mb6ZMY1fpnFRWe87lcOcmr BAxp2y3TXWKrBwYBd9kWZevlFOEA7ru1yl69gzqgxmZwwcWWb5tfcka5vAauft5/lawX D1l+VVBgJU3PHqDJ4xU3ae3hwodzgGhn0lDRnSckmfS1ppzmdxvQ7tppwskCrmmZJad6 bjUst0uFjKpY1652k6XQDFHvJo3QQggUmn1OxfykFjlUZ3QvhWX5cJH09tlDjQMmXAYG lwpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=uCbD1NfqujoHfNDZGzPP15V6qMGvWE1LwqUSGy/cdrU=; b=DIViCdRuWJB3Nv5JrGaUDbp3njoRLrk7xcVf9XPkpewwVelUP+/n7r6GDksVviLrHC 07kRj6JQG9SlixXxAiRej5GTZatr8wWJKTY8dgz9sGoxqw0VckfhRpd3SZ8yQhQFOvN9 9L/5MiBSukmv3Gyj7N5EzmhOw/fFTUCUMiJKqiBM1BLxVTlatIH/nu9qDffWVOVUgxQE 2jeqoCSesaarOkrHzmJp6VKkz/yh66tEpGbXWbzboXPu/Rz9Ni9KLOo3YY0PtEZfH9hm xxa0K6Eorpr2+C7wtsa00eS6/YMlisdfopPipAl8RRCRWUVQYrRD946tIraNhNZrxHn3 yX5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=q+WMSljV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j132si1310507pfc.84.2019.01.17.02.06.17; Thu, 17 Jan 2019 02:06:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=q+WMSljV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727708AbfAQKGP (ORCPT + 10 others); Thu, 17 Jan 2019 05:06:15 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:53798 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfAQKGO (ORCPT ); Thu, 17 Jan 2019 05:06:14 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id x0HA38Gs009525; Thu, 17 Jan 2019 19:03:10 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com x0HA38Gs009525 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547719391; bh=uCbD1NfqujoHfNDZGzPP15V6qMGvWE1LwqUSGy/cdrU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q+WMSljVwSbbUNvetGMOyIpBMNZil8tXGaZIghXUAFcOvzAYtt2eObZt9OHQw+EsB VT9HrMRyw6g63duXILjG1mKDgq4fpgl7WAT8lo5hXojP6VWw5VEn6h+9a8DgEAWkOr dCZxB+yBv+1dYL+BbKusReRxctJzlVQShc8vrLRAX2YzdQcr/wd6wCVGj+Id8wUkJ0 /hYoPQbh5sDapigvEMpqz9bGv1m04i5vi91v24AX1sDuyhiyopo8i6tAOWzlNXVoea vCw6MHmNSVtEr2bEvsgcsWwQuInqKc29A9sIs2RvzIaWtWkMBpnXljjQGVMFBLouVQ 8BAb374SJhAnw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Martin Schwidefsky , linux-s390@vger.kernel.org, Masahiro Yamada , Borislav Petkov , linux-mips@vger.kernel.org, Rob Herring , James Hogan , x86@kernel.org, Thomas Gleixner , Ralf Baechle , devicetree@vger.kernel.org, "H. Peter Anvin" , Benjamin Herrenschmidt , Michal Marek , Paul Burton , Ingo Molnar , Michael Ellerman , Heiko Carstens , linux-kernel@vger.kernel.org, Paul Mackerras , Mark Rutland , linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 3/4] kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^) Date: Thu, 17 Jan 2019 19:02:43 +0900 Message-Id: <1547719364-18849-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> References: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In Kbuild, if_changed and friends must have FORCE as a prerequisite. Hence, $(filter-out FORCE,$^) or $(filter-out $(PHONY),$^) is a common pattern to get the names of all the prerequisites except phony targets. Add real-prereqs as a shorthand. Note: We cannot replace $(filter %.o,$^) in cmd_link_multi-m because $^ may include auto-generated dependencies from the .*.cmd file when a single object module is changed into a multi object module. Refer to commit 69ea912fda74 ("kbuild: remove unneeded link_multi_deps"). I added some comment to avoid accidental breakage. Signed-off-by: Masahiro Yamada --- The patch context depends on some other ones. Please use 'git am -C1' if you want to test this on Linus' tree. Changes in v2: - clean up arch/s390/boot/Makefile as well Documentation/devicetree/bindings/Makefile | 2 +- arch/mips/boot/Makefile | 2 +- arch/powerpc/boot/Makefile | 2 +- arch/s390/boot/Makefile | 2 +- arch/x86/realmode/rm/Makefile | 3 +-- scripts/Kbuild.include | 4 ++++ scripts/Makefile.build | 9 ++++++--- scripts/Makefile.lib | 18 +++++++++--------- scripts/Makefile.modpost | 2 +- 9 files changed, 25 insertions(+), 19 deletions(-) -- 2.7.4 Acked-by: Rob Herring diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile index 6e5cef0..e4eb5d1 100644 --- a/Documentation/devicetree/bindings/Makefile +++ b/Documentation/devicetree/bindings/Makefile @@ -15,7 +15,7 @@ DT_TMP_SCHEMA := processed-schema.yaml extra-y += $(DT_TMP_SCHEMA) quiet_cmd_mk_schema = SCHEMA $@ - cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(filter-out FORCE, $^) + cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(real-prereqs) DT_DOCS = $(shell cd $(srctree)/$(src) && find * -name '*.yaml') DT_SCHEMA_FILES ?= $(addprefix $(src)/,$(DT_DOCS)) diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 35704c2..3ce4dd5 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -115,7 +115,7 @@ endif targets += vmlinux.its.S quiet_cmd_its_cat = CAT $@ - cmd_its_cat = cat $(filter-out $(PHONY), $^) >$@ + cmd_its_cat = cat $(real-prereqs) >$@ $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE $(call if_changed,its_cat) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 0e8dadd..73d1f35 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -218,7 +218,7 @@ quiet_cmd_bootas = BOOTAS $@ cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< quiet_cmd_bootar = BOOTAR $@ - cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@ + cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(real-prereqs); mv $@.$$$$ $@ $(obj-libfdt): $(obj)/%.o: $(srctree)/scripts/dtc/libfdt/%.c FORCE $(call if_changed_dep,bootcc) diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile index b4d8a42..11ca879 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -58,7 +58,7 @@ $(obj)/compressed/vmlinux: $(obj)/startup.a FORCE $(Q)$(MAKE) $(build)=$(obj)/compressed $@ quiet_cmd_ar = AR $@ - cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(filter $(OBJECTS), $^) + cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) $(obj)/startup.a: $(OBJECTS) FORCE $(call if_changed,ar) diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile index 4463fa7..394377c 100644 --- a/arch/x86/realmode/rm/Makefile +++ b/arch/x86/realmode/rm/Makefile @@ -37,8 +37,7 @@ REALMODE_OBJS = $(addprefix $(obj)/,$(realmode-y)) sed-pasyms := -n -r -e 's/^([0-9a-fA-F]+) [ABCDGRSTVW] (.+)$$/pa_\2 = \2;/p' quiet_cmd_pasyms = PASYMS $@ - cmd_pasyms = $(NM) $(filter-out FORCE,$^) | \ - sed $(sed-pasyms) | sort | uniq > $@ + cmd_pasyms = $(NM) $(real-prereqs) | sed $(sed-pasyms) | sort | uniq > $@ targets += pasyms.h $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 3081603..d93250b 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -24,6 +24,10 @@ depfile = $(subst $(comma),_,$(dot-target).d) basetarget = $(basename $(notdir $@)) ### +# real prerequisites without phony targets +real-prereqs = $(filter-out $(PHONY), $^) + +### # Escape single quote for use in echo statements escsq = $(subst $(squote),'\$(squote)',$1) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 681ab58..9800178 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -399,8 +399,7 @@ $(sort $(subdir-obj-y)): $(subdir-ym) ; ifdef builtin-target quiet_cmd_ar_builtin = AR $@ - cmd_ar_builtin = rm -f $@; \ - $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(filter $(real-obj-y), $^) + cmd_ar_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) $(builtin-target): $(real-obj-y) FORCE $(call if_changed,ar_builtin) @@ -428,7 +427,7 @@ ifdef lib-target quiet_cmd_link_l_target = AR $@ # lib target archives do get a symbol table and index -cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(lib-y) +cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) $(lib-target): $(lib-y) FORCE $(call if_changed,link_l_target) @@ -453,6 +452,10 @@ targets += $(obj)/lib-ksyms.o endif +# NOTE: +# Do not replace $(filter %.o,^) with $(real-prereqs). When a single object +# module is turned into a multi object module, $^ will contain header file +# dependencies recorded in the .*.cmd file. quiet_cmd_link_multi-m = LD [M] $@ cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) $(cmd_secanalysis) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ebaa348..c6fc295 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -231,7 +231,7 @@ $(obj)/%: $(src)/%_shipped # --------------------------------------------------------------------------- quiet_cmd_ld = LD $@ -cmd_ld = $(LD) $(ld_flags) $(filter-out FORCE,$^) -o $@ + cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@ # Objcopy # --------------------------------------------------------------------------- @@ -243,7 +243,7 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ # --------------------------------------------------------------------------- quiet_cmd_gzip = GZIP $@ - cmd_gzip = cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@ + cmd_gzip = cat $(real-prereqs) | gzip -n -f -9 > $@ # DTC # --------------------------------------------------------------------------- @@ -321,7 +321,7 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) # append the size as a 32-bit littleendian number as gzip does. size_append = printf $(shell \ dec_size=0; \ -for F in $(filter-out FORCE,$^); do \ +for F in $(real-prereqs); do \ fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F); \ dec_size=$$(expr $$dec_size + $$fsize); \ done; \ @@ -335,19 +335,19 @@ printf "%08x\n" $$dec_size | \ ) quiet_cmd_bzip2 = BZIP2 $@ - cmd_bzip2 = (cat $(filter-out FORCE,$^) | bzip2 -9 && $(size_append)) > $@ + cmd_bzip2 = (cat $(real-prereqs) | bzip2 -9 && $(size_append)) > $@ # Lzma # --------------------------------------------------------------------------- quiet_cmd_lzma = LZMA $@ - cmd_lzma = (cat $(filter-out FORCE,$^) | lzma -9 && $(size_append)) > $@ + cmd_lzma = (cat $(real-prereqs) | lzma -9 && $(size_append)) > $@ quiet_cmd_lzo = LZO $@ - cmd_lzo = (cat $(filter-out FORCE,$^) | lzop -9 && $(size_append)) > $@ + cmd_lzo = (cat $(real-prereqs) | lzop -9 && $(size_append)) > $@ quiet_cmd_lz4 = LZ4 $@ - cmd_lz4 = (cat $(filter-out FORCE,$^) | lz4c -l -c1 stdin stdout && \ + cmd_lz4 = (cat $(real-prereqs) | lz4c -l -c1 stdin stdout && \ $(size_append)) > $@ # U-Boot mkimage @@ -390,11 +390,11 @@ quiet_cmd_uimage = UIMAGE $@ # big dictionary would increase the memory usage too much in the multi-call # decompression mode. A BCJ filter isn't used either. quiet_cmd_xzkern = XZKERN $@ -cmd_xzkern = (cat $(filter-out FORCE,$^) | \ + cmd_xzkern = (cat $(real-prereqs) | \ sh $(srctree)/scripts/xz_wrap.sh && $(size_append)) > $@ quiet_cmd_xzmisc = XZMISC $@ -cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ + cmd_xzmisc = (cat $(real-prereqs) | \ xz --check=crc32 --lzma2=dict=1MiB) > $@ # ASM offsets diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 7d4af0d0..c0b7f52 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -122,7 +122,7 @@ quiet_cmd_ld_ko_o = LD [M] $@ cmd_ld_ko_o = \ $(LD) -r $(KBUILD_LDFLAGS) \ $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ - -o $@ $(filter-out FORCE,$^) ; \ + -o $@ $(real-prereqs) ; \ $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) $(modules): %.ko :%.o %.mod.o FORCE From patchwork Thu Jan 17 10:02:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 155808 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1765479jaa; Thu, 17 Jan 2019 02:03:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN7HA8yINFDbv3x0K2OWR+qEBcU0aMspBhVIHV+R4+049/Om1UR4I2GnWaOt+J0fIDG97DZc X-Received: by 2002:a65:590b:: with SMTP id f11mr12925440pgu.60.1547719429777; Thu, 17 Jan 2019 02:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547719429; cv=none; d=google.com; s=arc-20160816; b=PFtaPH0dO6h1scpGbgF9iWcISTRMSttL8chJWmtOw4y9kMceBlTk9mGKwQMjXL6xCn eXoGnNOvydp+IYUKqgXU63NrwLJmJ/s8IgRSc0P8kQ9Wsq7XNZ9FMKXokP1gxdoL59aD 1LCAopwIAAYE1EmaJuUCEphgmJcJy4CsFGp0ttyCyYveygjpT0c1kiwX8zAn1tcQySpd 9nBKMUWi3Khqs90YK74rkxTnbYOjogQXbvflsGZkkAL4L1fPnUg2SrTHOLZsG+aoLRxp fUhOpvwM7DGV+24pAxGIux3XwlenQ5P813fCTWcQQbe7zsDRA6eAX/XHvANNfx6ZfXOX MBuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=soy1QAAm9zjbqbxh/eF8P8dx1NBX+Q5/ESX1favG7s8=; b=qBJ0keqKfIb+PiCrkjM3f5vvFyuhAmvx7Y8PgGZPnqvfnKR0H659Odj8DHWfdN87Xl EGWD0oSwCWgkMIYtv8fqj8A0vi0ZK/l0e6cD59ChkFrfX2HJk+DvKNPe6fgYojhUm4KO 6I3GqhN+xOY+G8+Y7Dolkjo1fhOQRGnJEKHGEwxH8GDek0gomoK6XAnR9FC1MDNslEOS HhfIDmR3nUOYt8gfOLMrb9696gjESWJY51SkE+EV5VB4pZX5agfQmjSwaCFU7HUF0iFS wrl3vOeggScUXQBQ54xUvnJJ5EENG6tn7dhjpuEe92+3KBHCTueNp6P/31PD2Y1xiVWv lx9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=mBWnQHCA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16si1187326plo.182.2019.01.17.02.03.49; Thu, 17 Jan 2019 02:03:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=mBWnQHCA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727732AbfAQKDr (ORCPT + 10 others); Thu, 17 Jan 2019 05:03:47 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:49394 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726985AbfAQKDg (ORCPT ); Thu, 17 Jan 2019 05:03:36 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id x0HA38Gt009525; Thu, 17 Jan 2019 19:03:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com x0HA38Gt009525 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547719392; bh=soy1QAAm9zjbqbxh/eF8P8dx1NBX+Q5/ESX1favG7s8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mBWnQHCAno0hRXrIv1/BWp+TQ5HNg+bXOXxeN5tR6N3jv5qp1fAVoZBew1H5n6ozx QRQRI5blUfNFwwWK9rUq0marR1jhoMMPZu29xlFC64nSUWWwnjVTGP4TnFWAETPauN Z/vFjK58juF7ef9ZevE8/mgfD06WgbTgOykrRiCxJ8opuWY2F39HfEOsQALuSI9FDE bpATk77Z7TEoy64DlbXSQRTvU/yG6+nKC2iZMgdPw4+RhPTu7r6fqgxbHIF6Bu5MFV mT+jDJCcw1g+kr2krr1zc4XvK+O7vl4dbjUBx3hzzYASTRyv+Vc2a3tR5xsuqWyJ6I jApeHHrJRm3GA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Martin Schwidefsky , linux-s390@vger.kernel.org, Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] kbuild: remove unnecessary in-subshell execution Date: Thu, 17 Jan 2019 19:02:44 +0900 Message-Id: <1547719364-18849-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> References: <1547719364-18849-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commands surrounded by ( ) are executed in a subshell, but in most cases, we do not need to spawn an extra subshell. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.build | 4 ++-- scripts/Makefile.lib | 21 ++++++++++----------- scripts/mkcompile_h | 4 ++-- 3 files changed, 14 insertions(+), 15 deletions(-) -- 2.7.4 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 9800178..f8e2794 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -312,11 +312,11 @@ $(real-obj-m:.o=.s): modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) # # These mirror gensymtypes_c and co above, keep them in synch. cmd_gensymtypes_S = \ - (echo "\#include " ; \ + { echo "\#include " ; \ echo "\#include " ; \ $(CPP) $(a_flags) $< | \ grep "\<___EXPORT_SYMBOL\>" | \ - sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ) | \ + sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ; } | \ $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | \ $(GENKSYMS) $(if $(1), -T $(2)) \ $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index c6fc295..c0abd9a 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -271,7 +271,7 @@ DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) # Generate an assembly file to wrap the output of the device tree compiler quiet_cmd_dt_S_dtb= DTB $@ cmd_dt_S_dtb= \ -( \ +{ \ echo '\#include '; \ echo '.section .dtb.init.rodata,"a"'; \ echo '.balign STRUCT_ALIGNMENT'; \ @@ -281,7 +281,7 @@ cmd_dt_S_dtb= \ echo '__dtb_$(subst -,_,$(*F))_end:'; \ echo '.global __dtb_$(subst -,_,$(*F))_end'; \ echo '.balign STRUCT_ALIGNMENT'; \ -) > $@ +} > $@ $(obj)/%.dtb.S: $(obj)/%.dtb FORCE $(call if_changed,dt_S_dtb) @@ -335,20 +335,20 @@ printf "%08x\n" $$dec_size | \ ) quiet_cmd_bzip2 = BZIP2 $@ - cmd_bzip2 = (cat $(real-prereqs) | bzip2 -9 && $(size_append)) > $@ + cmd_bzip2 = { cat $(real-prereqs) | bzip2 -9 && $(size_append); } > $@ # Lzma # --------------------------------------------------------------------------- quiet_cmd_lzma = LZMA $@ - cmd_lzma = (cat $(real-prereqs) | lzma -9 && $(size_append)) > $@ + cmd_lzma = { cat $(real-prereqs) | lzma -9 && $(size_append); } > $@ quiet_cmd_lzo = LZO $@ - cmd_lzo = (cat $(real-prereqs) | lzop -9 && $(size_append)) > $@ + cmd_lzo = { cat $(real-prereqs) | lzop -9 && $(size_append); } > $@ quiet_cmd_lz4 = LZ4 $@ - cmd_lz4 = (cat $(real-prereqs) | lz4c -l -c1 stdin stdout && \ - $(size_append)) > $@ + cmd_lz4 = { cat $(real-prereqs) | lz4c -l -c1 stdin stdout && \ + $(size_append); } > $@ # U-Boot mkimage # --------------------------------------------------------------------------- @@ -390,12 +390,11 @@ quiet_cmd_uimage = UIMAGE $@ # big dictionary would increase the memory usage too much in the multi-call # decompression mode. A BCJ filter isn't used either. quiet_cmd_xzkern = XZKERN $@ - cmd_xzkern = (cat $(real-prereqs) | \ - sh $(srctree)/scripts/xz_wrap.sh && $(size_append)) > $@ + cmd_xzkern = { cat $(real-prereqs) | sh $(srctree)/scripts/xz_wrap.sh && \ + $(size_append); } > $@ quiet_cmd_xzmisc = XZMISC $@ - cmd_xzmisc = (cat $(real-prereqs) | \ - xz --check=crc32 --lzma2=dict=1MiB) > $@ + cmd_xzmisc = cat $(real-prereqs) | xz --check=crc32 --lzma2=dict=1MiB > $@ # ASM offsets # --------------------------------------------------------------------------- diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 87f1fc9..2339f86 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -62,7 +62,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" # Generate a temporary compile.h -( echo /\* This file is auto generated, version $VERSION \*/ +{ echo /\* This file is auto generated, version $VERSION \*/ if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi echo \#define UTS_MACHINE \"$ARCH\" @@ -73,7 +73,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\" echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version ' | sed 's/[[:space:]]*$//'`\" -) > .tmpcompile +} > .tmpcompile # Only replace the real compile.h if the new one is different, # in order to preserve the timestamp and avoid unnecessary