From nobody Sun Feb 8 22:21:51 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=1571736671; cv=none; d=zoho.com; s=zohoarc; b=RH1oDmeDvD7kgn3Ih1n3f87PInboAPBVzeVmUEhFZ0FZ+QX7f6MrcrWO3DkraZqlGWjBFC/s0BtHbv6LUWrYf6FpderFet3VFZu7jmrx0qdm3g+g9zizdJHSOkXWhp052xDBh7Nqr5cfta4z4An5rnvG0otz2rmU4vFWZfL+uoM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571736671; 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=aomgMcMV6/YTmTOFUx3IpJ6DjG3+6XLRaMuOkhq44Rc=; b=n8DTV9L1mY9V7LkLgY3yfUW8BQ+UHmGgbXjyICX/gNP84ZGPF7PoE2F0TsHDp75tKnjh92df183vuD0VcpTDKcUz/lxHkZqoDUS6oV0yYdwiR99PM92Gm7zQWUukTEuO+fmfIxTaBn2nLgIiujvLCY/W2hMCYOgjzFtUDx1ae1c= 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 1571736671879708.4440058257215; Tue, 22 Oct 2019 02:31:11 -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-239-j5gARmDnPmiy6Ajs_KO1Sg-1; Tue, 22 Oct 2019 05:31:08 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C6581005509; Tue, 22 Oct 2019 09:31:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F6686012D; Tue, 22 Oct 2019 09:31:04 +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 BD36A4EE68; Tue, 22 Oct 2019 09:31:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9L81EMW002543 for ; Mon, 21 Oct 2019 04:01:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6BEEB1001B11; Mon, 21 Oct 2019 08:01:14 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.43.2.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6B0C10016EB for ; Mon, 21 Oct 2019 08:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571736670; 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=aomgMcMV6/YTmTOFUx3IpJ6DjG3+6XLRaMuOkhq44Rc=; b=PZk8Y9jw0dhfHk9jEocMND8IqwJm/INnfV4cCjH5fJepWuXl5azTFaO1AG5l+vqLzXep/q H7ew/nAAYHGPd3cJxpgEYf2bXyf56qtNNTYOqp7BrQimkf3tBJ7o2CT6BAtFYwzDhJ8u6E 8ZAgGm3iqh2uwHE3tJIMDwpBi1vJkv0= From: Pavel Hrdina To: libvir-list@redhat.com Date: Mon, 21 Oct 2019 10:00:43 +0200 Message-Id: <276644e805b2b7e203c0b78a8249b1f51e06b290.1571643673.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 18/25] 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.11 X-MC-Unique: j5gARmDnPmiy6Ajs_KO1Sg-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 --- src/hyperv/Makefile.inc.am | 5 +++-- src/hyperv/hyperv_wmi_generator.py | 11 +++++------ 2 files changed, 8 insertions(+), 8 deletions(-) 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