From patchwork Thu Nov 10 13:11:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cedric Bosdonnat X-Patchwork-Id: 9421043 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 CE6BB60484 for ; Thu, 10 Nov 2016 13:14:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4994E296E6 for ; Thu, 10 Nov 2016 13:14:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D86529702; Thu, 10 Nov 2016 13:14:05 +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 2CB6C296E6 for ; Thu, 10 Nov 2016 13:14:04 +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 1c4p8t-0002h1-KO; Thu, 10 Nov 2016 13:11:47 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4p8r-0002gp-Jj for xen-devel@lists.xen.org; Thu, 10 Nov 2016 13:11:45 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id 85/83-15840-01274285; Thu, 10 Nov 2016 13:11:44 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRWlGSWpSXmKPExsVyuP0uq65AkUq EwdnFHBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bszyfZCi7yV7x51c7ewPiFt4uRi0NIYAmj RFv/drYuRk4ONgF7ia4/R5lAbBEBaYlrny8zghQxC7QzSny4t40VJCEsYCrx6dg3FhCbRUBVY smcX2DNvAIWEp/mnAJrlhCQl7hw9RQLRFxQ4uTMJ0A2B9AgdYn184RAwsxAJc1bZzNPYOSeha RqFkLVLCRVCxiZVzGqF6cWlaUW6RrqJRVlpmeU5CZm5ugaGhjr5aYWFyemp+YkJhXrJefnbmI EhggDEOxgXP7R6RCjJAeTkijvjgCVCCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvDyFQDnBotT0 1Iq0zBxgsMKkJTh4lER4Y0DSvMUFibnFmekQqVOMilLivDYgCQGQREZpHlwbLEIuMcpKCfMyA h0ixFOQWpSbWYIq/4pRnINRSZg3C2QKT2ZeCdz0V0CLmYAWz4gDW1ySiJCSamBkrttVynSJXU DQRU3v9iqD5gKFR78vXd0vecNwruJN23+MmxYxvLazsuM6tYa3e2Po9Ieez1S3bhaXLNF51r4 4/KGrSI6Hb/jRZr/qWTdfbP6xsySi7MV0Jbn1Pk2xe1dzfvE+dHyn4pb5gYXf62d6x3Lo7r2l drit/pDqx45DSUbX1989emKOEktxRqKhFnNRcSIAVUBJuYsCAAA= X-Env-Sender: cbosdonnat@suse.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1478783503!70306688!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.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 787 invoked from network); 10 Nov 2016 13:11:43 -0000 Received: from smtp.nue.novell.com (HELO smtp.nue.novell.com) (195.135.221.5) by server-8.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 10 Nov 2016 13:11:43 -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 14:11:43 +0100 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= To: xen-devel@lists.xen.org Date: Thu, 10 Nov 2016 14:11:37 +0100 Message-Id: <20161110131137.16936-1-cbosdonnat@suse.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Cc: Wei Liu , Ian Jackson , =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Subject: [Xen-devel] [PATCH] 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 $(shell basename $*). Signed-off-by: Cédric Bosdonnat --- tools/libxl/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index af0a3ad..78fede3 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 = $(shell basename $*)) + $(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) $< $@