mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-06 01:16:17 +01:00
Generate gtester-report from .in file
Previously, it was installed unmodified by the Meson build system. We don't need to define @bindir@, because gtester-report never actually referred to it. We also don't need a definition of GTESTER_REPORT for use by GLib itself, because its last use was removed in 2013 (https://bugzilla.gnome.org/show_bug.cgi?id=709995). Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1544 Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
b803d94366
commit
8346017b17
1
glib.mk
1
glib.mk
@ -3,7 +3,6 @@
|
||||
#GTESTER = gtester # for non-GLIB packages
|
||||
#GTESTER_REPORT = gtester-report # for non-GLIB packages
|
||||
GTESTER = $(top_builddir)/glib/gtester # for the GLIB package
|
||||
GTESTER_REPORT = $(top_builddir)/glib/gtester-report # for the GLIB package
|
||||
NULL =
|
||||
|
||||
# initialize variables for unconditional += appending
|
||||
|
@ -454,24 +454,17 @@ bin_PROGRAMS += gtester
|
||||
gtester_SOURCES = gtester.c
|
||||
gtester_LDADD = libglib-2.0.la
|
||||
|
||||
auto_config_binscripts = gtester-report
|
||||
bin_SCRIPTS = ${auto_config_binscripts}
|
||||
EXTRA_DIST += ${auto_config_binscripts}
|
||||
bin_SCRIPTS = gtester-report
|
||||
EXTRA_DIST += gtester-report.in
|
||||
|
||||
CONFIGVARS = \
|
||||
"bindir" : "${bindir}", \
|
||||
"glib-version" : "${GLIB_VERSION}"
|
||||
|
||||
install-exec-hook:
|
||||
for sf in ${auto_config_binscripts} ; do \
|
||||
mv -f "$(DESTDIR)$(bindir)/$$sf" "$(DESTDIR)$(bindir)/$$sf".tmp \
|
||||
&& sed < "$(DESTDIR)$(bindir)/$$sf".tmp > "$(DESTDIR)$(bindir)/$$sf" \
|
||||
-e '1,24s|^ *#@PKGINSTALL_CONFIGVARS_IN24LINES@| ${CONFIGVARS}|' \
|
||||
-e '1,1s|#! /usr/bin/env python.*|#!${PYTHON}|' \
|
||||
gtester-report: gtester-report.in Makefile
|
||||
$(AM_V_GEN) set -e ; \
|
||||
sed < $< > $@.tmp \
|
||||
-e '1,1s|#!.*|#!${PYTHON}|' \
|
||||
-e 's|[@]GLIB_VERSION[@]|${GLIB_VERSION}|' \
|
||||
|| exit $$? ; \
|
||||
chmod a+x $(DESTDIR)$(bindir)/$$sf ; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$sf".tmp ; \
|
||||
done
|
||||
chmod +x $@.tmp ; \
|
||||
mv $@.tmp $@
|
||||
|
||||
endif
|
||||
|
||||
|
8
glib/gtester-report → glib/gtester-report.in
Executable file → Normal file
8
glib/gtester-report → glib/gtester-report.in
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
#! /usr/bin/env python
|
||||
#! /usr/bin/env @PYTHON@
|
||||
# GLib Testing Framework Utility -*- Mode: python; -*-
|
||||
# Copyright (C) 2007 Imendio AB
|
||||
# Authors: Tim Janik
|
||||
@ -28,10 +28,6 @@ except ImportError:
|
||||
subunit = None
|
||||
|
||||
|
||||
pkginstall_configvars = {
|
||||
#@PKGINSTALL_CONFIGVARS_IN24LINES@ # configvars are substituted upon script installation
|
||||
}
|
||||
|
||||
# xml utilities
|
||||
def find_child (node, child_name):
|
||||
for child in node.childNodes:
|
||||
@ -454,7 +450,7 @@ def parse_opts():
|
||||
:return: An options object and the program arguments.
|
||||
"""
|
||||
parser = optparse.OptionParser()
|
||||
parser.version = pkginstall_configvars.get ('glib-version', '0.0-uninstalled')
|
||||
parser.version = '@GLIB_VERSION@'
|
||||
parser.usage = "%prog [OPTIONS] <gtester-log.xml>"
|
||||
parser.description = "Generate HTML reports from the XML log files generated by gtester."
|
||||
parser.epilog = "gtester-report (GLib utils) version %s."% (parser.version,)
|
@ -303,7 +303,16 @@ else
|
||||
dependencies : [libglib_dep])
|
||||
endif
|
||||
|
||||
install_data('gtester-report', install_dir : get_option('bindir'))
|
||||
report_conf = configuration_data()
|
||||
report_conf.set('GLIB_VERSION', glib_version)
|
||||
report_conf.set('PYTHON', python_name)
|
||||
configure_file(
|
||||
input: 'gtester-report.in',
|
||||
output: 'gtester-report',
|
||||
install_dir: get_option('bindir'),
|
||||
configuration: report_conf,
|
||||
install_mode: 'rwxr-xr-x'
|
||||
)
|
||||
|
||||
install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user