From patchwork Thu Apr 6 19:07:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 9668131 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CF2EF602B3 for ; Thu, 6 Apr 2017 19:07:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3243285C4 for ; Thu, 6 Apr 2017 19:07:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6A46285D5; Thu, 6 Apr 2017 19:07:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EECE285C4 for ; Thu, 6 Apr 2017 19:07:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932405AbdDFTHt (ORCPT ); Thu, 6 Apr 2017 15:07:49 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:33271 "EHLO mail-wr0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755006AbdDFTHk (ORCPT ); Thu, 6 Apr 2017 15:07:40 -0400 Received: by mail-wr0-f169.google.com with SMTP id g19so32948730wrb.0 for ; Thu, 06 Apr 2017 12:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y1hVF0rBSGt+lz/xZn6ZTzozdv4AkDc66giA2kDAgQQ=; b=d7pAbp2TcCo19/2zVLnUWuCRBv1xJH8YzA7NaKLp/LGxyrSgHSwiUj6+DH9NFa9wM/ J+HlML+4dCkihi8mu0o7BoYVWD7agbf0jQf6FIw5+jCnX5cqAfRNM5CbUfDpL7Ux4lyo 6G8p7yMoNCH34tzPvrmxfB+StVQQY4U5m1koI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y1hVF0rBSGt+lz/xZn6ZTzozdv4AkDc66giA2kDAgQQ=; b=tY9l+pLBkF9bpuojCgf4jzqW3rxn01YXrGLKIJiPDTaiTrzspcOXf3gZ1RTXpAkDvi upkqOta7Rqa0jYnRSguhoDgObh3gRlT3eKZI1qqp8PSQcrTshBUVxFmMAnZ3t6y5+HeS MOxr43H8PQRSOdp1zm4vPZB8GT7qNeHyotS4Dj6mfXNcgeExakHqr9wHoeVmxKq/M+gv GqFVpEzcLGQ+7PFxUfP+Xs3IeU069dQWcbvi6hXiqwjB10Erhj/m+DFEVV1gkAyBwsvT 9e3mU1SS9Q5W1PLr01avHVxnrJnIn8LUbdq/5mJpkeIZT5TpHzEt87jl7CjbNPpdaMS4 zyFw== X-Gm-Message-State: AN3rC/47aSWdLOB9X64bwPo8NHoPSOHgyLEAxbE9szyxDWFwjCGdxjg1liv8uTuGDsPbH+8o X-Received: by 10.28.183.198 with SMTP id h189mr753159wmf.7.1491505658897; Thu, 06 Apr 2017 12:07:38 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id p185sm27483415wme.20.2017.04.06.12.07.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Apr 2017 12:07:35 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 9DE693E07BC; Thu, 6 Apr 2017 20:07:37 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: drjones@redhat.com, pbonzini@redhat.com Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [RFC kvm-unit-tests PATCH 5/8] Makefile: add explicit mkdir for .o targets Date: Thu, 6 Apr 2017 20:07:24 +0100 Message-Id: <20170406190727.5624-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170406190727.5624-1-alex.bennee@linaro.org> References: <20170406190727.5624-1-alex.bennee@linaro.org> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is fairly direct way of ensuring the target build directories are created before we build a binary blob. mkdir -p fails gracefully if the directory is already there. Signed-off-by: Alex Bennée --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 781186e..56598df 100644 --- a/Makefile +++ b/Makefile @@ -79,8 +79,13 @@ $(LIBFDT_archive): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS)) $(AR) rcs $@ $^ %.o: %.S + mkdir -p $(dir $@) $(CC) $(CFLAGS) -c -nostdlib -o $@ $< +%.o: %.c + mkdir -p $(dir $@) + $(CC) $(CFLAGS) -c -o $@ $< + -include */.*.d */*/.*.d all: $(shell git -C $(SRCDIR) rev-parse --verify --short=8 HEAD >build-head 2>/dev/null)