mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-21 13:34:06 +03:00
meson: generate configmake.h
We don't use all of the defines so copy only the ones actually used. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
2d6cbcaa4d
commit
84b9a7455b
43
Makefile.am
43
Makefile.am
@ -42,8 +42,6 @@ check-local: all tests
|
||||
check-access: all
|
||||
@($(MAKE) $(AM_MAKEFLAGS) -C tests check-access)
|
||||
|
||||
BUILT_SOURCES = configmake.h
|
||||
|
||||
dist-hook: gen-AUTHORS
|
||||
|
||||
.PHONY: gen-AUTHORS
|
||||
@ -65,44 +63,3 @@ gen-AUTHORS:
|
||||
|
||||
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 <winsock2.h> /* 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 $@
|
||||
|
16
configmake.h.in
Normal file
16
configmake.h.in
Normal file
@ -0,0 +1,16 @@
|
||||
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||
#if WIN32
|
||||
# include <winsock2.h> /* 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
|
23
meson.build
23
meson.build
@ -92,6 +92,29 @@ docdir = datadir / 'doc' / meson.project_name()
|
||||
pkgdatadir = datadir / meson.project_name()
|
||||
|
||||
|
||||
# generate configmake.h header
|
||||
|
||||
configmake_conf = 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
|
||||
|
||||
arr_version = meson.project_version().split('.')
|
||||
|
Loading…
Reference in New Issue
Block a user