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: 68398 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp150629qge; Mon, 23 May 2016 08:33:30 -0700 (PDT) X-Received: by 10.55.132.3 with SMTP id g3mr17203283qkd.126.1464017609404; Mon, 23 May 2016 08:33:29 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g21si30359404qgd.90.2016.05.23.08.33.29 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 23 May 2016 08:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:48919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4rrE-0005Nr-W8 for patch@linaro.org; Mon, 23 May 2016 11:33:29 -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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(+) -- 1.8.3.1 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)