From patchwork Mon May 23 15:09:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9132061 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 7BBB2607D5 for ; Mon, 23 May 2016 15:31:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 728C228219 for ; Mon, 23 May 2016 15:31:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6752328237; Mon, 23 May 2016 15:31:42 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F14B028219 for ; Mon, 23 May 2016 15:31:41 +0000 (UTC) Received: from localhost ([::1]:48907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rpU-0004G3-Op for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 May 2016 11:31:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rUq-0002Dq-Ks for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4rUo-00046t-F4 for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:19 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rUo-00046f-7Y for qemu-devel@nongnu.org; Mon, 23 May 2016 11:10:18 -0400 Received: by mail-wm0-x244.google.com with SMTP id q62so16005488wmg.3 for ; Mon, 23 May 2016 08:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=zxOytBFDKdic0UE0YfkL8kFTZbTPtJ6fQeXyNrr0ap4=; b=Qggcrls1FXbpsVrLzZ6ZqUUOUFXJ1JBot56hf2jXOZrReVnjCIvBVqdbv4r/skTbKD 5MPLkGBFEzHDCLBKQeCwHJtuUyv4kIibvQuYjDoe+jFEJxXECskeGl/LjoTuuDst2s9R lfJsLdqO/Z47tHqN3nWflhkm0p7kDjJP5qkzvgrp6RtYUjXdaT5CFvVzxnxDWYztPV2m 6qeAdDlnTifD0hQ1eLli9WIZsF6gsD0vucpOxOvFGVSEuk43KJFg5E1yLa5T0KwPMEg7 z46Vf11sDNL1J4vs5y4IX7blKMafl/uTjuTVIzEwr+W8MSPKd3EHwFwuP/pcE4saOsDk 7hqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=zxOytBFDKdic0UE0YfkL8kFTZbTPtJ6fQeXyNrr0ap4=; b=i6qlEovX+36lHQveBxSJ+5aDjref8lhBFEG94fXa7CPdTfEkBtsJf8//ZYDYtDe4tZ mHP8Oqbdb/vauxnW4X6jhW3F/UQs7Z/KH62XBTbb264X3Ldt5CND4PADY4l5k6CjlhQe WuIphtsABPY3iX9DUp/f2vE+RWsP+eV7S8q8RUpeRmq/aNUrJXYksRLUykcD++mkCp0g z9+3wTUsjc0L01PWcWe6YDeboJ2ouLYU7wdTPJyDDDcsdMSz9zy7Ed73mRZStVemHEl3 xoctvaITlPD8o/jzotowwilzYUFroYAeYuSKcV36DWUW4Ei59jRVr7cXtIf+VM0Nqzwf zntQ== X-Gm-Message-State: AOPr4FUUxqnKtp5HYi5mj15XWFgo0DQV0Y5lz9l4+V22H0ngi8oaK376GzipvMiH7ToeIQ== X-Received: by 10.194.22.8 with SMTP id z8mr16739799wje.102.1464016217610; Mon, 23 May 2016 08:10:17 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-252-58.clienti.tiscali.it. [78.12.252.58]) by smtp.gmail.com with ESMTPSA id ac2sm19250359wjc.35.2016.05.23.08.10.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2016 08:10:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 23 May 2016 17:09:50 +0200 Message-Id: <1464016199-43768-16-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> References: <1464016199-43768-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PULL 15/24] Remove config-devices.mak on 'make clean' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Maydell Our dependency mechanism works like this: * on first build there is neither a .o nor a .d * we create the .d as a side effect of creating the .o * for rebuilds we know when we need to update the .o, which also updates the .d This system requires that you're never in a situation where there is a .o file but no .d (because then we will never realise we need to build the .d, and we will not have the dependency information about when to rebuild the .o). This is working fine for our object files, but we also try to use it for $TARGET/config-devices.mak (where the dependency file is in $TARGET-config-devices.mak.d). Unfortunately "make clean" doesn't remove config-devices.mak, which means that it puts us in the forbidden situation of "object file exists but not its .d file". This in turn means that we will fail to notice when we need to rebuild: mkdir build/depbug (cd build/depbug && '../../configure') make -C build/depbug -j8 make -C build/depbug clean echo "CONFIG_CANARY = y" >> default-configs/arm-softmmu.mak make -C build/depbug grep CANARY build/depbug/aarch64-softmmu/config-devices.mak The CANARY token should show up in config-devices.mak but does not. Fix this bug by making "make clean" delete the config-devices.mak files. config-all-devices.mak doesn't have the same problem since it has no .d file, but delete it too, since it is created by "make" and logically should be removed by "make clean". (Note that it is important not to remove config-devices.mak until after we have recursively run 'make clean' in the subdirectories.) Signed-off-by: Peter Maydell Message-Id: <1463484451-22979-1-git-send-email-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 1d076a9..a5d7e62 100644 --- a/Makefile +++ b/Makefile @@ -356,6 +356,7 @@ clean: if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ rm -f $$d/qemu-options.def; \ done + rm -f $(SUBDIR_DEVICES_MAK) config-all-devices.mak VERSION ?= $(shell cat VERSION)