From nobody Mon Feb 9 07:23:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) client-ip=216.205.24.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1585120443; cv=none; d=zohomail.com; s=zohoarc; b=D1H29EfUJET/NSoYMI102zAKKEeby48i28EWU93TNQOwWsx81SQsptrpSW/zjLiX8NeTrEjliVN8p1VUti3ZEm2JjXsWUxfb0boWnyJrKYBRIz9i07T5IBi+oPvJ84CkRomS3AyEmXbryKXMojdwgkSi1FJzCjunwQU95BNMjsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585120443; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=FJyxsqCJ03EWVklNxIeP95KpEWW+l9vNO8xYJlmfgaY=; b=gOySECSpmmvFyey2/beesSM8Vz62onNn6CnJJ9nVxEXJ4cVFVXkSQVp+LeKZB5YNji5E65SsXQcl9i5682TPHeM0wRcbUQ5aejua7BW4Y4jdWIzPWbZWiOJOvuWGLHI4jxOvI2+MHJOpZvJfon0JpqjYjHMr8lJ2AGEPQ6yHa/U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.zohomail.com with SMTPS id 1585120443971156.9380972606865; Wed, 25 Mar 2020 00:14:03 -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-396-T1qBdc2SNheRrk4BUZaJcA-1; Wed, 25 Mar 2020 03:13:30 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 03427107ACCA; Wed, 25 Mar 2020 07:13:25 +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 C5E9D5D9C5; Wed, 25 Mar 2020 07:13:24 +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 33BF18A025; Wed, 25 Mar 2020 07:13:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02P7CUcX023918 for ; Wed, 25 Mar 2020 03:12:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7906B107530; Wed, 25 Mar 2020 07:12:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71C69107524 for ; Wed, 25 Mar 2020 07:12:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1DACB101A55A for ; Wed, 25 Mar 2020 07:12:28 +0000 (UTC) Received: from mail-m24147.qiye.163.com (mail-m24147.qiye.163.com [220.194.24.147]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-332-ZLhr7c1uO8md7-C_d8nNeg-1; Wed, 25 Mar 2020 03:12:24 -0400 Received: from localhost.localdomain (unknown [123.232.151.103]) by smtp4 (Coremail) with SMTP id JedpCgD3ftNNBHtey+koAw--.408S4; Wed, 25 Mar 2020 15:12:14 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585120442; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=FJyxsqCJ03EWVklNxIeP95KpEWW+l9vNO8xYJlmfgaY=; b=icN6rN7sExePl8+jSwm9IULSNLDfvedy0q+5iWBKoY8gH8K48csfoaocNL62WtZy82I08G Yw5W+BQPeBP0s2dCD9AX+nXzU6fg6WslinnMz9vALDTqJWG/eFO8a6hMmCrAC4n24pZMT/ 135LG/Y9slz9kQND7Mcg7GnM93DYxHU= X-MC-Unique: T1qBdc2SNheRrk4BUZaJcA-1 X-MC-Unique: ZLhr7c1uO8md7-C_d8nNeg-1 From: Shi Lei To: libvir-list@redhat.com Subject: [RFC 02/29] maint: Call RNG2C automatically when relax-ng files change Date: Wed, 25 Mar 2020 15:11:42 +0800 Message-Id: <20200325071209.20841-3-shi_lei@massclouds.com> In-Reply-To: <20200325071209.20841-1-shi_lei@massclouds.com> References: <20200325071209.20841-1-shi_lei@massclouds.com> X-CM-TRANSID: JedpCgD3ftNNBHtey+koAw--.408S4 X-Coremail-Antispam: 1Uf129KBjvJXoWfGw1kZr4rWr45ZF18Xw45trb_yoWkGr4Dpw s5CF1rAa1kXrW5Kr1xKayDJF1jq3yjqas8WF1F9w1Utr4xZF98GrWxt3yY9F12gFW7Zw4I 9343KFyjgrWkAaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0z_Hq2nUUUUU= X-Originating-IP: [123.232.151.103] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiRhPxT1bdHA4Y-AAAsW X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02P7CUcX023918 X-loop: libvir-list@redhat.com 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.14 X-Mimecast-Spam-Score: 2 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Let makefiles call RNG2C for generating codes automatically. Signed-off-by: Shi Lei --- src/Makefile.am | 16 +++++++++++++++- src/access/Makefile.inc.am | 2 +- src/conf/Makefile.inc.am | 10 +++++++++- src/esx/Makefile.inc.am | 2 +- src/interface/Makefile.inc.am | 2 +- src/lxc/Makefile.inc.am | 1 + src/network/Makefile.inc.am | 2 +- src/node_device/Makefile.inc.am | 2 +- src/nwfilter/Makefile.inc.am | 2 +- src/qemu/Makefile.inc.am | 1 + src/remote/Makefile.inc.am | 2 +- src/secret/Makefile.inc.am | 2 +- src/storage/Makefile.inc.am | 2 +- src/test/Makefile.inc.am | 2 +- src/util/Makefile.inc.am | 11 ++++++++++- src/vbox/Makefile.inc.am | 2 +- tests/Makefile.am | 2 ++ tools/Makefile.am | 2 ++ 18 files changed, 51 insertions(+), 14 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 12dd6b8..dc2adb0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,7 @@ AM_CPPFLAGS =3D -I$(top_srcdir) \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ - -I./util \ + -I./util -I./conf \ -DIN_LIBVIRT \ -Dabs_top_builddir=3D"\"$(abs_top_builddir)\"" \ -Dabs_top_srcdir=3D"\"$(abs_top_srcdir)\"" \ @@ -87,6 +87,20 @@ sbin_PROGRAMS =3D bin_PROGRAMS =3D DRIVER_SOURCES =3D =20 +RNG2C_GENERATED_FILES_STAMP =3D .rng2c_generator.stamp +RNG_FILES =3D $(wildcard $(top_srcdir)/docs/schemas/*.rng) +RNG2C_SOURCE =3D $(wildcard $(top_srcdir)/rng2c/*.py) +RNG2C_ENTRIES =3D network.rng + +$(RNG2C_GENERATED_FILES_STAMP): $(RNG_FILES) $(RNG2C_SOURCE) + $(AM_V_GEN)topdir=3D$(top_srcdir) builddir=3D$(top_builddir) \ + entries=3D$(RNG2C_ENTRIES) \ + $(PYTHON) -B $(top_srcdir)/rng2c/generator.py generate -k scpf \ + && touch $@ + +MAINTAINERCLEANFILES +=3D $(RNG2C_GENERATED_FILES_STAMP) +CLEANFILES +=3D $(RNG2C_GENERATED_FILES_STAMP) + COMMON_UNIT_VARS =3D \ -e 's|[@]runstatedir[@]|$(runstatedir)|g' \ -e 's|[@]sbindir[@]|$(sbindir)|g' \ diff --git a/src/access/Makefile.inc.am b/src/access/Makefile.inc.am index 11f87c6..7832558 100644 --- a/src/access/Makefile.inc.am +++ b/src/access/Makefile.inc.am @@ -55,7 +55,7 @@ nodist_libvirt_driver_access_la_SOURCES =3D \ noinst_LTLIBRARIES +=3D libvirt_driver_access.la libvirt_la_BUILT_LIBADD +=3D libvirt_driver_access.la libvirt_driver_access_la_CFLAGS =3D \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_access_la_LDFLAGS =3D $(AM_LDFLAGS) diff --git a/src/conf/Makefile.inc.am b/src/conf/Makefile.inc.am index debc6f4..1fbde38 100644 --- a/src/conf/Makefile.inc.am +++ b/src/conf/Makefile.inc.am @@ -160,7 +160,11 @@ DEVICE_CONF_SOURCES =3D \ conf/device_conf.h \ $(NULL) =20 +CONF_GENERATED_SOURCES =3D \ + $(NULL) + CONF_SOURCES =3D \ + $(CONF_GENERATED_SOURCES) \ $(NETDEV_CONF_SOURCES) \ $(DOMAIN_CONF_SOURCES) \ $(OBJECT_EVENT_SOURCES) \ @@ -180,11 +184,15 @@ CONF_SOURCES =3D \ $(DEVICE_CONF_SOURCES) \ $(NULL) =20 +$(CONF_GENERATED_SOURCES): $(RNG2C_GENERATED_FILES_STAMP) +MAINTAINERCLEANFILES +=3D $(CONF_GENERATED_SOURCES) +CLEANFILES +=3D $(CONF_GENERATED_SOURCES) + noinst_LTLIBRARIES +=3D libvirt_conf.la libvirt_la_BUILT_LIBADD +=3D libvirt_conf.la libvirt_conf_la_SOURCES =3D $(CONF_SOURCES) libvirt_conf_la_CFLAGS =3D \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ $(NULL) libvirt_conf_la_LDFLAGS =3D $(AM_LDFLAGS) diff --git a/src/esx/Makefile.inc.am b/src/esx/Makefile.inc.am index d53cef1..1df9a54 100644 --- a/src/esx/Makefile.inc.am +++ b/src/esx/Makefile.inc.am @@ -78,7 +78,7 @@ noinst_LTLIBRARIES +=3D libvirt_driver_esx.la libvirt_la_BUILT_LIBADD +=3D libvirt_driver_esx.la libvirt_driver_esx_la_CFLAGS =3D \ $(CURL_CFLAGS) \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ -I$(builddir)/esx \ -I$(srcdir)/vmx \ $(AM_CFLAGS) \ diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am index 39157c0..e12c73a 100644 --- a/src/interface/Makefile.inc.am +++ b/src/interface/Makefile.inc.am @@ -23,7 +23,7 @@ mod_LTLIBRARIES +=3D libvirt_driver_interface.la libvirt_driver_interface_la_CFLAGS =3D \ -I$(srcdir)/access \ -I$(builddir)/access \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ $(LIBNL_CFLAGS) \ $(NULL) diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am index 2fee607..2e4c107 100644 --- a/src/lxc/Makefile.inc.am +++ b/src/lxc/Makefile.inc.am @@ -95,6 +95,7 @@ libvirt_driver_lxc_impl_la_CFLAGS =3D \ -I$(srcdir)/access \ -I$(builddir)/access \ -I$(srcdir)/conf \ + -I./conf \ -I$(builddir)/lxc \ -I$(builddir)/rpc \ -I$(srcdir)/hypervisor \ diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am index bc05b01..5184908 100644 --- a/src/network/Makefile.inc.am +++ b/src/network/Makefile.inc.am @@ -46,7 +46,7 @@ libvirt_driver_network_impl_la_CFLAGS =3D \ $(DBUS_CFLAGS) \ -I$(srcdir)/access \ -I$(builddir)/access \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_network_impl_la_SOURCES =3D $(NETWORK_DRIVER_SOURCES) diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc= .am index 0b28718..9e9d16d 100644 --- a/src/node_device/Makefile.inc.am +++ b/src/node_device/Makefile.inc.am @@ -40,7 +40,7 @@ libvirt_driver_nodedev_la_SOURCES =3D $(NODE_DEVICE_DRIVE= R_SOURCES) libvirt_driver_nodedev_la_CFLAGS =3D \ -I$(srcdir)/access \ -I$(builddir)/access \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ $(LIBNL_CFLAGS) \ $(NULL) diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am index 9a68fd8..772bf17 100644 --- a/src/nwfilter/Makefile.inc.am +++ b/src/nwfilter/Makefile.inc.am @@ -40,7 +40,7 @@ libvirt_driver_nwfilter_impl_la_CFLAGS =3D \ $(DBUS_CFLAGS) \ -I$(srcdir)/access \ -I$(builddir)/access \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_nwfilter_impl_la_LDFLAGS =3D $(AM_LDFLAGS) diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am index 51cd798..a54a498 100644 --- a/src/qemu/Makefile.inc.am +++ b/src/qemu/Makefile.inc.am @@ -99,6 +99,7 @@ libvirt_driver_qemu_impl_la_CFLAGS =3D \ -I$(srcdir)/access \ -I$(builddir)/access \ -I$(srcdir)/conf \ + -I./conf \ -I$(srcdir)/secret \ -I$(srcdir)/hypervisor \ $(AM_CFLAGS) \ diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 958bd18..e6eec31 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -47,7 +47,7 @@ REMOTE_DAEMON_CFLAGS =3D \ $(COVERAGE_CFLAGS) \ -I$(srcdir)/access \ -I$(builddir)/access \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ -I$(srcdir)/rpc \ -I$(builddir)/rpc \ -I$(builddir)/remote \ diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am index 63c8bc6..e5b608a 100644 --- a/src/secret/Makefile.inc.am +++ b/src/secret/Makefile.inc.am @@ -20,7 +20,7 @@ mod_LTLIBRARIES +=3D libvirt_driver_secret.la libvirt_driver_secret_la_CFLAGS =3D \ -I$(srcdir)/access \ -I$(builddir)/access \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_secret_la_LIBADD =3D \ diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am index 3655b8a..c792583 100644 --- a/src/storage/Makefile.inc.am +++ b/src/storage/Makefile.inc.am @@ -122,7 +122,7 @@ libvirt_driver_storage_impl_la_SOURCES =3D libvirt_driver_storage_impl_la_CFLAGS =3D \ -I$(srcdir)/access \ -I$(builddir)/access \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ -I$(srcdir)/secret \ $(AM_CFLAGS) \ $(NULL) diff --git a/src/test/Makefile.inc.am b/src/test/Makefile.inc.am index b84ab52..ce1e635 100644 --- a/src/test/Makefile.inc.am +++ b/src/test/Makefile.inc.am @@ -21,7 +21,7 @@ driver_test_assetdir =3D $(pkgdatadir) noinst_LTLIBRARIES +=3D libvirt_driver_test.la libvirt_la_BUILT_LIBADD +=3D libvirt_driver_test.la libvirt_driver_test_la_CFLAGS =3D \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ $(NULL) libvirt_driver_test_la_SOURCES =3D $(TEST_DRIVER_SOURCES) diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index 718b11a..ada1bb2 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -237,6 +237,10 @@ UTIL_SOURCES =3D \ $(NULL) =20 =20 +UTIL_GENERATED_SOURCES =3D \ + $(NULL) + + EXTRA_DIST +=3D \ $(srcdir)/keycodemapdb/data/keymaps.csv \ $(srcdir)/keycodemapdb/tools/keymap-gen \ @@ -251,8 +255,11 @@ KEYTABLES =3D \ $(KEYNAMES:%=3Dutil/virkeynametable_%.h) \ $(NULL) =20 -BUILT_SOURCES +=3D $(KEYTABLES) +UTIL_SOURCES +=3D $(KEYTABLES) $(UTIL_GENERATED_SOURCES) +BUILT_SOURCES +=3D $(KEYTABLES) $(UTIL_GENERATED_SOURCES) CLEANFILES +=3D $(KEYTABLES) +CLEANFILES +=3D $(KEYMANS) $(KEYPODS) $(UTIL_GENERATED_SOURCES) +MAINTAINERCLEANFILES +=3D $(KEYTABLES) $(UTIL_GENERATED_SOURCES) =20 UTIL_IO_HELPER_SOURCES =3D util/iohelper.c =20 @@ -298,6 +305,8 @@ libvirt_util_la_LIBADD =3D \ $(NULL) =20 =20 +$(UTIL_GENERATED_SOURCES): $(RNG2C_GENERATED_FILES_STAMP) + util/virkeycodetable_%.h: $(srcdir)/keycodemapdb/data/keymaps.csv \ $(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am $(AM_V_GEN)export NAME=3D`echo $@ | sed -e 's,util/virkeycodetable_,,' \ diff --git a/src/vbox/Makefile.inc.am b/src/vbox/Makefile.inc.am index 72a15c6..00ad02a 100644 --- a/src/vbox/Makefile.inc.am +++ b/src/vbox/Makefile.inc.am @@ -52,7 +52,7 @@ mod_LTLIBRARIES +=3D libvirt_driver_vbox.la libvirt_driver_vbox_la_LDFLAGS =3D $(AM_LDFLAGS_MOD_NOUNDEF) =20 libvirt_driver_vbox_impl_la_CFLAGS =3D \ - -I$(srcdir)/conf \ + -I$(srcdir)/conf -I./conf \ $(AM_CFLAGS) \ -DVBOX_DRIVER \ $(NULL) diff --git a/tests/Makefile.am b/tests/Makefile.am index ada5b8f..46d2523 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,7 +21,9 @@ AM_CPPFLAGS =3D \ -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_srcdir)/src/util \ + -I$(top_builddir)/src/util \ -I$(top_srcdir)/src/conf \ + -I$(top_builddir)/src/conf \ -I$(top_srcdir)/src/hypervisor \ -I$(top_builddir)/src/rpc \ $(NULL) diff --git a/tools/Makefile.am b/tools/Makefile.am index 53df930..05a219e 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -19,6 +19,8 @@ AM_CPPFLAGS =3D \ -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(top_srcdir)/src/util \ + -I$(top_builddir)/src/util \ + -I$(top_builddir)/src/conf \ -I$(top_srcdir) \ $(NULL) =20 --=20 2.17.1