From nobody Mon Feb 9 00:07:53 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=1571736669; cv=none; d=zoho.com; s=zohoarc; b=ag9iksJ1jNPSQeY02AwbTrgwpczuY0FDC53OhkTHIeF8nzLz9qx89hvPRda4TWD5giYfuZR9SUSVgccCXa5A4Bu7voyV+cK13JZkLrLFLBg9nok/I8G3P/Xq6phEK52NPmGPG6ZXDJC3pvjYFJZWshb4mxn5IMbBcNPjTnbWME4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571736669; 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=5EBVpzi2Mtv7sOsWOuf+kZDP8ILn1TsAlJextxyOXek=; b=fE8E9QJZSqOE46c6Ffp68cevPoyCl0wzLIrbde2YjRZ1Et6brzkqYIcJ2oVGAji/cwX4j41qXtEmVqY/L2prDgMFN4qWWi0ldk0D5YRaZThdxMa8EDtG2nkNlrsaaBrpFXnSZva5+bXP2djyc4q7qIaSWswxIf9Iiv+K+0/XBsw= 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 1571736669585899.2594407696026; Tue, 22 Oct 2019 02:31:09 -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-177--fHU43C4PJ-T-Z9qOQp98w-1; Tue, 22 Oct 2019 05:30:16 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0279A1800D6A; Tue, 22 Oct 2019 09:30:12 +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 BDCA61001B33; Tue, 22 Oct 2019 09:30:11 +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 49131180085A; Tue, 22 Oct 2019 09:30:11 +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 x9L81D8g002535 for ; Mon, 21 Oct 2019 04:01:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 97FC41001B11; Mon, 21 Oct 2019 08:01:13 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.43.2.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BAF11001938 for ; Mon, 21 Oct 2019 08:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571736668; 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=5EBVpzi2Mtv7sOsWOuf+kZDP8ILn1TsAlJextxyOXek=; b=aCqBr880fPoQmqnbyYAclWxTkGfmBgDsCMy9pFmg/cb+/zKZRd4q05RO8kMJJj+7siovcO i42U46k75zLpRp4uJemQpLO1U08y1hJrbadEwku4xjlf0BEL0VtiF8XOYN1uF7LtWEpLgA mQ0Wl7slqW4E1b0fBBJmpuy0NzNgTBg= From: Pavel Hrdina To: libvir-list@redhat.com Date: Mon, 21 Oct 2019 10:00:42 +0200 Message-Id: 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 17/25] src: esx: 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.84 on 10.5.11.22 X-MC-Unique: -fHU43C4PJ-T-Z9qOQp98w-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/esx/Makefile.inc.am | 5 +++-- src/esx/esx_vi_generator.py | 11 ++++------- tests/Makefile.am | 3 +++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/esx/Makefile.inc.am b/src/esx/Makefile.inc.am index 3dab05d71c..7ba9fd1758 100644 --- a/src/esx/Makefile.inc.am +++ b/src/esx/Makefile.inc.am @@ -63,8 +63,8 @@ $(ESX_DRIVER_GENERATED): $(ESX_GENERATED_STAMP) =20 $(ESX_GENERATED_STAMP): $(srcdir)/esx/esx_vi_generator.input \ $(srcdir)/esx/esx_vi_generator.py - $(AM_V_GEN)srcdir=3D$(srcdir) $(RUNUTF8) $(PYTHON) \ - $(srcdir)/esx/esx_vi_generator.py && touch $@ + $(AM_V_GEN) $(RUNUTF8) $(PYTHON) \ + $(srcdir)/esx/esx_vi_generator.py $(srcdir) $(builddir) && touch $@ =20 MAINTAINERCLEANFILES +=3D $(ESX_DRIVER_GENERATED) $(ESX_GENERATED_STAMP) =20 @@ -81,6 +81,7 @@ libvirt_la_BUILT_LIBADD +=3D libvirt_driver_esx.la libvirt_driver_esx_la_CFLAGS =3D \ $(CURL_CFLAGS) \ -I$(srcdir)/conf \ + -I$(builddir)/esx \ -I$(srcdir)/vmx \ $(AM_CFLAGS) \ $(NULL) diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py index 28d440a6df..c77de6e60c 100755 --- a/src/esx/esx_vi_generator.py +++ b/src/esx/esx_vi_generator.py @@ -1379,14 +1379,11 @@ additional_object_features =3D { =20 removed_object_features =3D {} =20 +if len(sys.argv) !=3D 3: + report_error("usage: %s srcdir builddir" % sys.argv[0]) =20 - -if "srcdir" in os.environ: - input_filename =3D os.path.join(os.environ["srcdir"], "esx/esx_vi_gene= rator.input") - output_dirname =3D os.path.join(os.environ["srcdir"], "esx") -else: - input_filename =3D os.path.join(os.getcwd(), "esx_vi_generator.input") - output_dirname =3D os.getcwd() +input_filename =3D os.path.join(sys.argv[1], "esx/esx_vi_generator.input") +output_dirname =3D os.path.join(sys.argv[2], "esx") =20 =20 =20 diff --git a/tests/Makefile.am b/tests/Makefile.am index 9ae456c268..d549e38e18 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -756,6 +756,9 @@ esxutilstest_SOURCES =3D \ esxutilstest.c \ testutils.c testutils.h esxutilstest_LDADD =3D $(LDADDS) +esxutilstest_CFLAGS =3D \ + -I$(top_builddir)/src/esx \ + $(AM_CFLAGS) else ! WITH_ESX EXTRA_DIST +=3D esxutilstest.c endif ! WITH_ESX --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list