From nobody Sun Feb 8 16:11:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.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 205.139.110.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=1571917901; cv=none; d=zoho.com; s=zohoarc; b=FCxExtwRag39pi0aEPNQ3v7KugecC3RaV+S88wQH8MCvt55B6RmIavobVqXAIkQ9XIdPZg2AFqpqoon8L/IEGodph4H+aEXUakfpl5eTv1FNwi8DXMd+CNUQ/hePdmbHq028E+8e1+AcsLSO1dNh8c04qjipFDuu1cbqK6qbwfY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571917901; 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=Ga3aoG0+pW4w9/ZcjgwSQ5AoYBo+dTKgJDycZEKTNLM=; b=P+BDT43x96eXZnX20iKH8OFVg+DTWmlw+BcKINhXURqcqVvayXjxLCtJU5ayX+l0GRTRMWihl9fiLJAGmmknj1qdwe/b86q1JL307Q3ptcFC3XeDOEridchUhYiXn+bPlkad+xQoZ5WptUwviy7FD4At4ul3UIh6JeJTNMrB2xQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.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 [205.139.110.120]) by mx.zohomail.com with SMTPS id 1571917901921443.36341072592325; Thu, 24 Oct 2019 04:51:41 -0700 (PDT) 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-342-09qwXX9WObyrAC3i4Nh2Gw-1; Thu, 24 Oct 2019 07:51:38 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9DBD7600; Thu, 24 Oct 2019 11:51:33 +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 79D816062E; Thu, 24 Oct 2019 11:51:33 +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 2E4ED180B536; Thu, 24 Oct 2019 11:51:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9OBpS3c032484 for ; Thu, 24 Oct 2019 07:51:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id C88C96012D; Thu, 24 Oct 2019 11:51:28 +0000 (UTC) Received: from antique-laptop.redhat.com (ovpn-200-50.brq.redhat.com [10.40.200.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3513960126 for ; Thu, 24 Oct 2019 11:51:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571917900; 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=Ga3aoG0+pW4w9/ZcjgwSQ5AoYBo+dTKgJDycZEKTNLM=; b=gerQun+o/nyLa9tFK/8tao1REvKi5sXg4aA5NzpK1OqMnJwLsRXIje3jgpRqOKBw/XeGlS PBxG2/BN/WkZJ1ipUaRb1leWGY9P/TKAL3YmI8/hgO2CPXayXagttng36EhAghN7YGVA0V EOojWa9mAMaJm6uR0D4Q20sn8rryYa0= From: Pavel Hrdina To: libvir-list@redhat.com Date: Thu, 24 Oct 2019 13:50:56 +0200 Message-Id: <7683db17d1e6a46ad183e88bf58f9ecef3c8b917.1571917791.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 14/20] 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.13 X-MC-Unique: 09qwXX9WObyrAC3i4Nh2Gw-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 --- 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.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list