From patchwork Tue Apr 29 03:29:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 343652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 866971400B7 for ; Tue, 29 Apr 2014 13:29:47 +1000 (EST) Received: from localhost ([::1]:46960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Weyjp-00058z-F2 for incoming@patchwork.ozlabs.org; Mon, 28 Apr 2014 23:29:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeyjU-0004FO-HK for qemu-devel@nongnu.org; Mon, 28 Apr 2014 23:29:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WeyjO-000768-2C for qemu-devel@nongnu.org; Mon, 28 Apr 2014 23:29:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeyjN-00075y-RX for qemu-devel@nongnu.org; Mon, 28 Apr 2014 23:29:18 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3T3TBCP000673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Apr 2014 23:29:11 -0400 Received: from T430.nay.redhat.com (dhcp-14-247.nay.redhat.com [10.66.14.247]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s3T3T7Os009567; Mon, 28 Apr 2014 23:29:07 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Tue, 29 Apr 2014 11:29:17 +0800 Message-Id: <1398742157-29553-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , =?UTF-8?q?=C3=81kos=20Kov=C3=A1cs?= , mjt@tls.msk.ru, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Peter Maydell Subject: [Qemu-devel] [PATCH] Makefile: Fix per-object variables for Makefile.target X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The compiling is done in a subdir, so the extraction of per-object libs and cflags are referencing objects with ../ prefixed. So prefix the per-object variables "foo.o-cflags" and "foo.o-libs" to "../foo.o-cflags" and "../foo.o-libs". Signed-off-by: Fam Zheng Reviewed-by: Michael Tokarev --- Makefile.target | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile.target b/Makefile.target index ba12340..3a30aad 100644 --- a/Makefile.target +++ b/Makefile.target @@ -146,11 +146,12 @@ obj-y-save := $(obj-y) block-obj-y := common-obj-y := include $(SRC_PATH)/Makefile.objs -dummy := $(call unnest-vars,.., \ - block-obj-y \ - block-obj-m \ - common-obj-y \ - common-obj-m) +vars := block-obj-y \ + block-obj-m \ + common-obj-y \ + common-obj-m +dummy := $(foreach v,$(vars),$(call fix-obj-vars,$v,../)) +dummy := $(call unnest-vars,.., $(vars)) # Now restore obj-y obj-y := $(obj-y-save)