From nobody Sun Feb 8 04:38:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573227978; cv=none; d=zoho.com; s=zohoarc; b=Kyft44OL8MZ17DfUiHh637SYE4NbhWZide7s3+jvaw5UhteIo/bMupCN0zqF2eHwVZZiHcy3Tl7zAPE21+YFP6y88BcJW5GcqTKz4OcevFXs+0HkpgvhwfkUTSj8yPkBKrZQan3sOg4Re0dEcil2q0rD96Wle/eZMhTQwywXgK0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573227978; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=njBzvfO2BVukKlC/vzzJoGD5rxGlYh2pk0lOE4Bppl4=; b=cY/dPs5HTKNh4G1+v1InRFcGgTIMQi609tihroRXVLjU/aK83C+7AhUI857mLpyxPBTVYXf0Sq8Rr7WWrnE7QbLYHr4apSerGd87g83P4+5yTEsGCF1yiikCw3HZooe4q4wBx8qxBfaktap4ZkEzXSCjXVREgd3FyZZJQuZ9Cwg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573227978832990.5602747748674; Fri, 8 Nov 2019 07:46:18 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-63-s0egm9jqN9quldXZEbOozw-1; Fri, 08 Nov 2019 10:46:14 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 53D65801E54; Fri, 8 Nov 2019 15:46:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F2905C299; Fri, 8 Nov 2019 15:46:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DD2D418006D2; Fri, 8 Nov 2019 15:46:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA8Fgf6W014153 for ; Fri, 8 Nov 2019 10:42:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 87C805D6B7; Fri, 8 Nov 2019 15:42:41 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-200-52.brq.redhat.com [10.40.200.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7FD45D6AE for ; Fri, 8 Nov 2019 15:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573227977; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=njBzvfO2BVukKlC/vzzJoGD5rxGlYh2pk0lOE4Bppl4=; b=g1tNBrozhcGA+65oXQ+JbHHm8WUGZ5+ubLomOpEo0ZKUVZxEhQIkPGasBrASPAwYnrk2So zwwLKECxZvcscoiPisYlglw44mCK4jCUxjP8N28hxzY2cTgJSsjxJYPqNC23sCkMjwNUMT ECKvm6NbdyFl5KHcC93LMmAZEbBSKio= From: Pavel Hrdina To: libvir-list@redhat.com Date: Fri, 8 Nov 2019 16:42:15 +0100 Message-Id: <11be65cda4307abdc7fd81668feb704ce702dfc8.1573227570.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v4 14/20] [ACKED] src: hyperv: generate source files into build directory X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: s0egm9jqN9quldXZEbOozw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina Reviewed-by: J=C3=A1n Tomko Reviewed-by: Daniel P. Berrang=C3=A9 --- Notes: Changes in v2: - remove entries from .gitignore .gitignore | 1 - src/hyperv/Makefile.inc.am | 5 +++-- src/hyperv/hyperv_wmi_generator.py | 11 +++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 46f6f98045..85a417112d 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,6 @@ Makefile.in # libvirt related ignores /build/ /ci/scratch/ -/src/hyperv/*.generated.* /src/locking/lock_daemon_dispatch_stubs.h /src/logging/log_daemon_dispatch_stubs.h /src/lxc/lxc_controller_dispatch.h diff --git a/src/hyperv/Makefile.inc.am b/src/hyperv/Makefile.inc.am index 6728b39c90..79e94d09bb 100644 --- a/src/hyperv/Makefile.inc.am +++ b/src/hyperv/Makefile.inc.am @@ -41,8 +41,8 @@ $(HYPERV_DRIVER_GENERATED): $(HYPERV_GENERATED_STAMP) =20 $(HYPERV_GENERATED_STAMP): $(srcdir)/hyperv/hyperv_wmi_generator.input \ $(srcdir)/hyperv/hyperv_wmi_generator.py - $(AM_V_GEN)srcdir=3D$(srcdir) $(RUNUTF8) $(PYTHON) \ - $(srcdir)/hyperv/hyperv_wmi_generator.py \ + $(AM_V_GEN) $(RUNUTF8) $(PYTHON) \ + $(srcdir)/hyperv/hyperv_wmi_generator.py $(srcdir) $(builddir) \ && touch $@ =20 MAINTAINERCLEANFILES +=3D $(HYPERV_DRIVER_GENERATED) $(HYPERV_GENERATED_ST= AMP) @@ -53,6 +53,7 @@ libvirt_la_BUILT_LIBADD +=3D libvirt_driver_hyperv.la libvirt_driver_hyperv_la_CFLAGS =3D \ $(OPENWSMAN_CFLAGS) \ -I$(srcdir)/conf \ + -I$(builddir)/hyperv \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_hyperv_la_LDFLAGS =3D $(AM_LDFLAGS) diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_gen= erator.py index a9ece0ff00..c3cd39cc76 100755 --- a/src/hyperv/hyperv_wmi_generator.py +++ b/src/hyperv/hyperv_wmi_generator.py @@ -454,12 +454,11 @@ def parse_class(block): =20 =20 def main(): - if "srcdir" in os.environ: - input_filename =3D os.path.join(os.environ["srcdir"], "hyperv/hype= rv_wmi_generator.input") - output_dirname =3D os.path.join(os.environ["srcdir"], "hyperv") - else: - input_filename =3D os.path.join(os.getcwd(), "hyperv_wmi_generator= .input") - output_dirname =3D os.getcwd() + if len(sys.argv) !=3D 3: + report_error("usage: %s srcdir builddir" % sys.argv[0]) + + input_filename =3D os.path.join(sys.argv[1], "hyperv", "hyperv_wmi_gen= erator.input") + output_dirname =3D os.path.join(sys.argv[2], "hyperv") =20 classes_typedef =3D open_and_print(os.path.join(output_dirname, "hyper= v_wmi_classes.generated.typedef")) classes_header =3D open_and_print(os.path.join(output_dirname, "hyperv= _wmi_classes.generated.h")) --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list