From patchwork Sat May 15 11:03:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 52704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 977EAB7E02 for ; Sat, 15 May 2010 21:07:42 +1000 (EST) Received: from localhost ([127.0.0.1]:55533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODFDW-0004o0-Ny for incoming@patchwork.ozlabs.org; Sat, 15 May 2010 07:07:38 -0400 Received: from [140.186.70.92] (port=44685 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODFBG-0003op-PK for qemu-devel@nongnu.org; Sat, 15 May 2010 07:05:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODF9X-0000Vq-7n for qemu-devel@nongnu.org; Sat, 15 May 2010 07:05:18 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:36142) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODF9W-0000VY-Vw for qemu-devel@nongnu.org; Sat, 15 May 2010 07:03:31 -0400 Received: from smtp07.web.de ( [172.20.5.215]) by fmmailgate02.web.de (Postfix) with ESMTP id 53452160BC5CF; Sat, 15 May 2010 13:03:29 +0200 (CEST) Received: from [88.64.22.236] (helo=[192.168.1.10]) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1ODF9V-0002xH-00; Sat, 15 May 2010 13:03:29 +0200 Message-ID: <4BEE7F80.2090203@web.de> Date: Sat, 15 May 2010 13:03:28 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: qemu-devel , Juan Quintela X-Enigmail-Version: 0.95.7 X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX1+MrK1OupXu5ZuU7P+MCB0HZQU4CjYOCDnekF/p 14rVBn9pGBxuquS+sVEnTlmfcAJ5cWU97KOQ6/lqborYRZiByH iGwKtCpJ4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Subject: [Qemu-devel] [PATCH] Put dependency files in proper subdir X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka This seems to resolve subtle breakages of our build system: Dependency files generated for targets like 'dir/foo.o' were saved as 'foo.d'. Now, if there was also a target 'foo.o', one of the dependency file was overwritten. Concrete example: libhw*/macio.o vs. libhw*/ide/macio.o. And this often left a segfaulting build result behind when changing the "wrong" data structures". Fix it by generating proper 'dir/foo.d'. Signed-off-by: Jan Kiszka Acked-by: Paolo Bonzini Acked-by: Juan Quintela --- rules.mak | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -o $@ $<," CC $(TARGET_DIR)$@") diff --git a/rules.mak b/rules.mak index 7e10432..c843a13 100644 --- a/rules.mak +++ b/rules.mak @@ -12,7 +12,7 @@ MAKEFLAGS += -rR %.mak: # Flags for dependency generation -QEMU_DGFLAGS += -MMD -MP -MT $@ +QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d %.o: %.c $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c