From patchwork Fri Mar 31 15:01:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolaus Schulz X-Patchwork-Id: 745688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vvl8T2RxXz9ryv for ; Sat, 1 Apr 2017 02:02:01 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754884AbdCaPCB (ORCPT ); Fri, 31 Mar 2017 11:02:01 -0400 Received: from mail.avionic-design.de ([87.253.173.79]:32990 "EHLO mail.avionic-design.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754730AbdCaPCA (ORCPT ); Fri, 31 Mar 2017 11:02:00 -0400 Received: from avionic-0071.adnet.avionic-design.de (87.138.236.184) by mail.avionic-design.de (172.17.100.63) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Fri, 31 Mar 2017 17:01:55 +0200 From: Nikolaus Schulz To: CC: Nikolaus Schulz Subject: [cbootimage-configs PATCH v2] post.mk: Create dependency makefile by makefile rule Date: Fri, 31 Mar 2017 17:01:53 +0200 Message-ID: <20170331150153.14606-2-nikolaus.schulz@avionic-design.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170331150153.14606-1-nikolaus.schulz@avionic-design.de> References: <20170331150153.14606-1-nikolaus.schulz@avionic-design.de> MIME-Version: 1.0 X-Originating-IP: [87.138.236.184] X-ClientProxiedBy: mail.avionic-design.de (172.17.100.63) To mail.avionic-design.de (172.17.100.63) Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Creating the emmc image requires creating the bct file and the bootloader image first. These dependencies are written to a makefile snippet that is created by the gen-image-deps.sh script. But that script is only invoked when the rule that creates the emmc image is run, which is too late for creating the dependencies makefile. Add a rule to post.mk that tells make how to create the dependencies makefile; with that in place, make automatically makes the dependency makefile before executing any other rules. Signed-off-by: Nikolaus Schulz --- build/post.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/post.mk b/build/post.mk index 979d8ce..a647c81 100644 --- a/build/post.mk +++ b/build/post.mk @@ -21,11 +21,12 @@ bcts: $(bcts) images: $(images) image_deps := $(addprefix .,$(addsuffix .d,$(images))) +$(image_deps): .%.d : %.cfg + ../../../build/gen-image-deps.sh $< $(@:.%.d=%) $@ -include $(image_deps) %.bct: %.bct.cfg cbootimage -gbct -$(soc) $< $@ %.img: %.img.cfg - ../../../build/gen-image-deps.sh $< $@ .$@.d cbootimage -$(soc) $< $@