From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBNAt-0006dy-Ma for qemu-devel@nongnu.org; Fri, 20 Nov 2009 01:40:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBNAo-0006cQ-8W for qemu-devel@nongnu.org; Fri, 20 Nov 2009 01:40:54 -0500 Received: from [199.232.76.173] (port=54007 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBNAo-0006cJ-2h for qemu-devel@nongnu.org; Fri, 20 Nov 2009 01:40:50 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:60326) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NBNAn-00016W-CK for qemu-devel@nongnu.org; Fri, 20 Nov 2009 01:40:49 -0500 Message-ID: <4B0639E7.40509@mail.berlios.de> Date: Fri, 20 Nov 2009 07:40:39 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1258657672-9897-1-git-send-email-weil@mail.berlios.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Fix build for mingw32 on windows ($@ in macro) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: QEMU Developers , herbszt@gmx.de malc schrieb: > On Thu, 19 Nov 2009, Stefan Weil wrote: > >> Make using mingw32 on windows does not preserve $@ in macros >> when they are modified using this pattern: >> target: macro += something >> >> This behaviour results in an error when QEMU_CFLAGS containing >> "-MMD -MP -MT $@" is modified for compilation of source files >> which use SDL: $@ will expand to nothing, -MT no longer has >> the correct argument (it will take the next one from the command >> line) and the build will fail or run with a wrong command line. >> >> The problem is fixed by using a new macro QEMU_DGFLAGS >> which is not modified by a target rule. > > Why not just stuff `-MMD -MP -MT $@' into the rules? > > [..snip..] As in most cases, there are many ways to do something... During my test, I had the dependency flags in the rules. I decided to use a macro to allow people running make without dependency generation (make QEMU_DGFLAGS=). Stefan