From nobody Sun Feb 8 15:30:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.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=1594893653; cv=none; d=zohomail.com; s=zohoarc; b=n+TNy59FTfrg0IldN7G14lWQjxJy9cducK2Sn4tX0FPUyNlUAbdA6+6+cYd9lQdkDgpZBzVvHqovGLlCN8A9GZ5l4fiF0XgeGgGYT1ah2mLidY452FWJGwGd5bhhXCcN2yePZItiO5T5upc7mGe3cHp7HjKj6ef1gATlJfEbFjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893653; 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=MTbcA2mwlgGWm1zwtwc1cUR2K/wuri7OeXunUbAbZno=; b=FCwmXvkoCBBWruDGfotmYYK5Pt+5aspxbq8EyybjW74RX7Ufl66Tss4IbqActV7xx8jL3rKBpQNhlYn0t4x9hOas3Qpp1nw76SSTc+fCiz7H7EEZmJTw3vaKSE2JQ3XQ+X/mDzbvPta7W4aGBpd8XKgzYmKGXjmypbiMi81g73s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.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 1594893653787171.34800383243692; Thu, 16 Jul 2020 03:00:53 -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-235-8L205f1qP-2TX6yuDBaFRA-1; Thu, 16 Jul 2020 06:00:48 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 460828015F7; Thu, 16 Jul 2020 10:00:41 +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 24ED972ADE; Thu, 16 Jul 2020 10:00:41 +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 E312A96240; Thu, 16 Jul 2020 10:00:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA0XmB015309 for ; Thu, 16 Jul 2020 06:00:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7F01B2B6DC; Thu, 16 Jul 2020 10:00:33 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDB762DE69 for ; Thu, 16 Jul 2020 10:00:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893650; 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=MTbcA2mwlgGWm1zwtwc1cUR2K/wuri7OeXunUbAbZno=; b=WJQofMqcYiDMBHpkFqz1+jl2Vs1rxWRUFNBmeqnCcAHpZRgL+BmzhCEbHOqVghg6oiBN2X f4d3hOA7jcc0mFFmfNGvSVADirTF+epEfq8oZ1C9I8mjdHyW6PDfiqvdGHJ07ALXGG/ulb 1ZfWAvtoJhiQsxKbOQCOc2tmyqcSyus= X-MC-Unique: 8L205f1qP-2TX6yuDBaFRA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 014/351] meson: generate configmake.h Date: Thu, 16 Jul 2020 11:54:10 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We don't use all of the defines so copy only the ones actually used. Signed-off-by: Pavel Hrdina Reviewed-by: J=C3=A1n Tomko --- Makefile.am | 41 ----------------------------------------- configmake.h.in | 16 ++++++++++++++++ meson.build | 23 +++++++++++++++++++++++ 3 files changed, 39 insertions(+), 41 deletions(-) create mode 100644 configmake.h.in diff --git a/Makefile.am b/Makefile.am index fbb3cb09ff1..82ccbac6f91 100644 --- a/Makefile.am +++ b/Makefile.am @@ -63,44 +63,3 @@ gen-AUTHORS: =20 ci-%: $(MAKE) -C $(srcdir)/ci/ $@ - -# Listed in the same order as the GNU makefile conventions, and -# provided by autoconf 2.59c+ or 2.70. -# The Automake-defined pkg* macros are appended, in the order -# listed in the Automake 1.10a+ documentation. -configmake.h: Makefile - $(AM_V_GEN)rm -f $@-t && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - echo '#if WIN32'; \ - echo '# include /* avoid mingw pollution on DATADIR */'; \ - echo '#endif'; \ - echo '#define PREFIX "$(prefix)"'; \ - echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ - echo '#define BINDIR "$(bindir)"'; \ - echo '#define SBINDIR "$(sbindir)"'; \ - echo '#define LIBEXECDIR "$(libexecdir)"'; \ - echo '#define DATAROOTDIR "$(datarootdir)"'; \ - echo '#define DATADIR "$(datadir)"'; \ - echo '#define SYSCONFDIR "$(sysconfdir)"'; \ - echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ - echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ - echo '#define RUNSTATEDIR "$(runstatedir)"'; \ - echo '#define INCLUDEDIR "$(includedir)"'; \ - echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ - echo '#define DOCDIR "$(docdir)"'; \ - echo '#define INFODIR "$(infodir)"'; \ - echo '#define HTMLDIR "$(htmldir)"'; \ - echo '#define DVIDIR "$(dvidir)"'; \ - echo '#define PDFDIR "$(pdfdir)"'; \ - echo '#define PSDIR "$(psdir)"'; \ - echo '#define LIBDIR "$(libdir)"'; \ - echo '#define LISPDIR "$(lispdir)"'; \ - echo '#define LOCALEDIR "$(localedir)"'; \ - echo '#define MANDIR "$(mandir)"'; \ - echo '#define MANEXT "$(manext)"'; \ - echo '#define PKGDATADIR "$(pkgdatadir)"'; \ - echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ - echo '#define PKGLIBDIR "$(pkglibdir)"'; \ - echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - mv -f $@-t $@ diff --git a/configmake.h.in b/configmake.h.in new file mode 100644 index 00000000000..c9930b60493 --- /dev/null +++ b/configmake.h.in @@ -0,0 +1,16 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +#if WIN32 +# include /* avoid mingw pollution on DATADIR */ +#endif +#mesondefine BINDIR +#mesondefine DATADIR +#mesondefine LIBDIR +#mesondefine LIBEXECDIR +#mesondefine LOCALEDIR +#mesondefine LOCALSTATEDIR +#mesondefine MANDIR +#mesondefine PKGDATADIR +#mesondefine PREFIX +#mesondefine RUNSTATEDIR +#mesondefine SBINDIR +#mesondefine SYSCONFDIR diff --git a/meson.build b/meson.build index 3b149e829d3..07dacf92009 100644 --- a/meson.build +++ b/meson.build @@ -87,6 +87,29 @@ docdir =3D datadir / 'doc' / meson.project_name() pkgdatadir =3D datadir / meson.project_name() =20 =20 +# generate configmake.h header + +configmake_conf =3D configuration_data() +configmake_conf.set_quoted('BINDIR', bindir) +configmake_conf.set_quoted('DATADIR', datadir) +configmake_conf.set_quoted('LIBDIR', libdir) +configmake_conf.set_quoted('LIBEXECDIR', libexecdir) +configmake_conf.set_quoted('LOCALEDIR', localedir) +configmake_conf.set_quoted('LOCALSTATEDIR', localstatedir) +configmake_conf.set_quoted('MANDIR', mandir) +configmake_conf.set_quoted('PKGDATADIR', pkgdatadir) +configmake_conf.set_quoted('PREFIX', prefix) +configmake_conf.set_quoted('RUNSTATEDIR', runstatedir) +configmake_conf.set_quoted('SBINDIR', sbindir) +configmake_conf.set_quoted('SYSCONFDIR', sysconfdir) + +configure_file( + input: 'configmake.h.in', + output: 'configmake.h', + configuration: configmake_conf, +) + + # figure out libvirt version strings =20 arr_version =3D meson.project_version().split('.') --=20 2.26.2