From patchwork Thu Nov 10 16:46:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9421509 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 DD5E060512 for ; Thu, 10 Nov 2016 16:48:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE3BC29504 for ; Thu, 10 Nov 2016 16:48:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2C8829772; Thu, 10 Nov 2016 16:48:11 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5D58B29504 for ; Thu, 10 Nov 2016 16:48:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4sUQ-0003lD-NU; Thu, 10 Nov 2016 16:46:14 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4sUO-0003l7-NI for xen-devel@lists.xen.org; Thu, 10 Nov 2016 16:46:12 +0000 Received: from [85.158.143.35] by server-11.bemta-6.messagelabs.com id C1/56-14466-454A4285; Thu, 10 Nov 2016 16:46:12 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRWlGSWpSXmKPExsVyuP0uq27wEpU Ig38zlSyWfFzM4sDocXT3b6YAxijWzLyk/IoE1ozzRz+xFvzhr/i3vJelgXEqXxcjF4eQwBJG iQdftjF3MXJysAnYS3T9OcoEYosISEtc+3yZEaSIWWAlo8Sjh+fBEsICFhI3j7xkBLFZBFQlL p5bDxbnBYp3HWtkA7ElBOQlLlw9xQIRF5Q4OfMJkM0BNEhdYv08IZAwM1BJ89bZzBMYuWchqZ qFUDULSdUCRuZVjBrFqUVlqUW6RuZ6SUWZ6RkluYmZObqGBmZ6uanFxYnpqTmJScV6yfm5mxi BQcIABDsYF68NPMQoycGkJMqrOF0lQogvKT+lMiOxOCO+qDQntfgQowwHh5IEr9BioJxgUWp6 akVaZg4wXGHSEhw8SiK8PxcCpXmLCxJzizPTIVKnGBWlxHnPLAJKCIAkMkrz4NpgMXKJUVZKm JcR6BAhnoLUotzMElT5V4ziHIxKwrwMINt5MvNK4Ka/AlrMBLR4RhzY4pJEhJRUA+Mui6bLqX XMb3ZOc67fufuJ6xfV1/KTt97sL2zdLcTXMGXNibOcC3MXS2p0ZZmfv96l+bL15tE1T5L3KR7 +HGMfvWbVtRSfpLLc9rZnuS1/pjYHnY+Ir/8SeGnB3Q0zw2Rt55+ruXnv2g3Jlw2L+R0z7kzb VvO4U/u/XIl6OOPrWwYpX1nLLb2VWIozEg21mIuKEwHkfCNOjAIAAA== X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-3.tower-21.messagelabs.com!1478796371!42107210!1 X-Originating-IP: [195.135.221.5] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.0.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22138 invoked from network); 10 Nov 2016 16:46:11 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-3.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 10 Nov 2016 16:46:11 -0000 Received: from laptop.vms (mhy71-2-88-167-63-197.fbx.proxad.net [88.167.63.197]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Thu, 10 Nov 2016 17:46:10 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Thu, 10 Nov 2016 17:46:00 +0100 Message-Id: <20161110164600.29851-1-cbosdonnat@suse.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Cc: Juergen Gross , Wei Liu , Ian Jackson , =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Subject: [Xen-devel] [PATCH v2] libxl: fix gentypes call in Makefile X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From the make documentation: "$* [...] If the target is `dir/a.foo.b' and the target pattern is `a.%.b' then the stem is `dir/foo'. In a static pattern rule, the stem is part of the file name that matched the `%' in the target pattern." The rule generating the c types files from the idl ones is not a static pattern rule, but rather an implicit rule. Thus the value of $* is preceded by the file path, instead of only what matches %. In order to get this fixed, drop the path using a $(notdir $*). Signed-off-by: Cédric Bosdonnat Acked-by: Wei Liu --- v2: use $(notdir $*) instead of $(shell basename $*) --- tools/libxl/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index af0a3ad..4dbaa98 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -250,12 +250,13 @@ $(LIBXL_OBJS) $(LIBXL_TEST_OBJS) $(LIBXLU_OBJS) \ $(LIBXL_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py - $(PYTHON) gentypes.py libxl_type$*.idl __libxl_type$*.h __libxl_type$*_private.h \ - __libxl_type$*_json.h __libxl_type$*.c - $(call move-if-changed,__libxl_type$*.h,_libxl_type$*.h) - $(call move-if-changed,__libxl_type$*_private.h,_libxl_type$*_private.h) - $(call move-if-changed,__libxl_type$*_json.h,_libxl_type$*_json.h) - $(call move-if-changed,__libxl_type$*.c,_libxl_type$*.c) + $(eval stem = $(notdir $*)) + $(PYTHON) gentypes.py libxl_type$(stem).idl __libxl_type$(stem).h __libxl_type$(stem)_private.h \ + __libxl_type$(stem)_json.h __libxl_type$(stem).c + $(call move-if-changed,__libxl_type$(stem).h,_libxl_type$(stem).h) + $(call move-if-changed,__libxl_type$(stem)_private.h,_libxl_type$(stem)_private.h) + $(call move-if-changed,__libxl_type$(stem)_json.h,_libxl_type$(stem)_json.h) + $(call move-if-changed,__libxl_type$(stem).c,_libxl_type$(stem).c) libxenlight.so: libxenlight.so.$(MAJOR) $(SYMLINK_SHLIB) $< $@