[gnumeric] Distcheck fixes.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Distcheck fixes.
- Date: Sun, 29 Apr 2018 18:00:38 +0000 (UTC)
commit 0c2f0a8a47b1ab692f09b67530af9493332b2777
Author: Morten Welinder <terra gnome org>
Date: Sun Apr 29 13:59:04 2018 -0400
Distcheck fixes.
Cleanups.
Install introspection python overrides.
Use a more controlled way of gathering samples for dist.
Makefile.am | 21 +++++++++------------
configure.ac | 16 +++++++++++++++-
doc/Makefile.am | 3 +++
introspection/Makefile.am | 10 ++++++++++
test/GnumericTest.pm | 24 ++++++++++++++++++------
test/Makefile.am | 1 -
6 files changed, 55 insertions(+), 20 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8ba3bb4..6c88f0c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,10 +2,8 @@ SUBDIRS = . po po-functions src plugins icons @COMPONENT_DIR@ templates doc tool
XML_I18N_XML_KIND = --pass-through
-change_logs = ChangeLog \
- OChangeLog-1999-07-09 \
- OChangeLog-2000-02-23 OChangeLog-2000-10-10 \
- OChangeLog-2001-06-26
+# We used to distribute old ChangeLog files too.
+change_logs = ChangeLog
CLEANFILES = gnumeric.desktop gnumeric.keys gnumeric.appdata.xml
DISTCLEANFILES = intltool-extract intltool-merge intltool-update $(pkgconfig_DATA)
@@ -13,11 +11,14 @@ DISTCLEANFILES = intltool-extract intltool-merge intltool-update $(pkgconfig_DAT
DISTCHECK_CONFIGURE_FLAGS = --without-perl --without-python \
--enable-introspection=auto \
--with-gir-dir=\$${datadir}/gir-1.0 \
- --with-typelib-dir=\$${libdir}/girepository-1.0
+ --with-typelib-dir=\$${libdir}/girepository-1.0 \
+ --with-gi-overrides-dir=\$${libdir}/gi/overrides
+
+DIST_SAMPLES = $(shell (cd $(srcdir)/test && perl -e 'use GnumericTest; foreach
(&GnumericTest::corpus("dist")) { print "$$_\n"; }'))
EXTRA_DIST = \
README HACKING NEWS BEVERAGES BUGS MAINTAINERS AUTHORS $(change_logs) \
- COPYING-gpl2 COPYING-gpl3 \
+ COPYING COPYING-gpl2 COPYING-gpl3 \
gnumeric.appdata.xml.in \
gnumeric.desktop.in \
gnumeric.keys.in \
@@ -29,7 +30,8 @@ EXTRA_DIST = \
intltool-update.in \
xmldocs.make \
libspreadsheet.pc.in \
- omf.make
+ omf.make \
+ $(DIST_SAMPLES)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libspreadsheet-@GNUMERIC_API_VER@.pc
@@ -66,11 +68,6 @@ install-exec-local: gnumeric-features.h
uninstall-local:
rm -f $(DESTDIR)$(configexecincludedir)/gnumeric-features.h
-dist-hook:
- mkdir $(distdir)/samples
- cp $(srcdir)/samples/*.gnumeric $(distdir)/samples/.
- mkdir $(distdir)/samples/excel
- cp $(srcdir)/samples/excel/*.xls $(distdir)/samples/excel/.
## If I understand this correctly, this hack is needed only --with-perl:
if WITH_PERL
diff --git a/configure.ac b/configure.ac
index 00e0a45..c1ab19d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -870,6 +870,7 @@ fi
# and the Python plugin
have_python=no
have_python_gi=no
+PYTHON_GIOVERRIDESDIR=
if test "x$PYTHON" != x; then
AC_DEFINE_UNQUOTED(PYTHON_INTERPRETER, ["$PYTHON"],
[The Python interpreter to use])
@@ -878,6 +879,7 @@ if test "x$PYTHON" != x; then
AC_MSG_CHECKING([for python module gi])
if $PYTHON -c 'import gi' 2>/dev/null; then
have_python_gi=yes
+ [PYTHON_GIOVERRIDESDIR=`python -c 'import gi; import os.path;
print(os.path.dirname(gi.__file__)+"/overrides")'`]
fi
AC_MSG_RESULT($have_python_gi)
fi
@@ -955,7 +957,7 @@ AC_SUBST(GNM_PY_CFLAGS)
AC_SUBST(GNM_PY_LDFLAGS)
AC_SUBST(GNM_PY_LIBADD)
-YELP_HELP_INIT
+YELP_HELP_INIT(no-lc-dist)
# Support for PDF docs
AC_ARG_ENABLE(pdfdocs,
@@ -1119,6 +1121,18 @@ AC_ARG_WITH([typelib-dir],
[TYPELIBDIR=$INTROSPECTION_TYPELIBDIR]
)
AC_SUBST(TYPELIBDIR)
+AC_ARG_WITH([gi-overrides-dir],
+ AS_HELP_STRING(
+ [--with-gi-overrides-dir],
+ [
+ path to introspection overrides repository
+ (automatically detected via python)
+ ]
+ ),
+ [GIOVERRIDESDIR=$withval],
+ [GIOVERRIDESDIR=$PYTHON_GIOVERRIDESDIR]
+)
+AC_SUBST(GIOVERRIDESDIR)
dnl **************************************************
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 22e4732..2a04398 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -11,6 +11,9 @@ HELP_ID=gnumeric
HELP_LINGUAS=cs de es
HELP_FILES=gnumeric.xml
+distclean-local:
+ for l in $(HELP_LINGUAS); do rm $l/gnumeric.xml; done
+
HELP_EXTRA= \
about-authors.xml \
about-history.xml \
diff --git a/introspection/Makefile.am b/introspection/Makefile.am
index 9cfedb5..5109f6f 100644
--- a/introspection/Makefile.am
+++ b/introspection/Makefile.am
@@ -1,3 +1,13 @@
EXTRA_DIST = README \
gi/overrides/Gnm.py \
gi/overrides/__init__.py
+
+if HAVE_INTROSPECTION
+if HAVE_PYTHON_GI
+install-data-local:
+ install -m 0444 -t @GIOVERRIDESDIR@ gi/overrides/Gnm.py
+
+uninstall-local:
+ rm -f @GIOVERRIDESDIR@/Gnm.py
+endif
+endif
diff --git a/test/GnumericTest.pm b/test/GnumericTest.pm
index ba33fa2..8d15277 100644
--- a/test/GnumericTest.pm
+++ b/test/GnumericTest.pm
@@ -28,9 +28,14 @@ $PYTHON = undef;
$PERL = $Config{'perlpath'};
$PERL .= $Config{'_exe'} if $^O ne 'VMS' && $PERL !~ m/$Config{'_exe'}$/i;
-$topsrc = $0;
-$topsrc =~ s|/[^/]+$|/..|;
-$topsrc =~ s|/test/\.\.$||;
+if ($0 eq '-e') {
+ # Running as "perl -e '...'", so no idea about where we are
+ $topsrc = '.';
+} else {
+ $topsrc = $0;
+ $topsrc =~ s|/[^/]+$|/..|;
+ $topsrc =~ s|/test/\.\.$||;
+}
$top_builddir = "..";
$samples = "$topsrc/samples"; $samples =~ s{^\./+}{};
@@ -177,10 +182,10 @@ sub subtest {
# -----------------------------------------------------------------------------
-my @full_corpus =
- ("$samples/excel/address.xls",
+my @dist_corpus =
+ ("$samples/regress.gnumeric",
+ "$samples/excel/address.xls",
"$samples/excel/bitwise.xls",
- "$samples/excel/chart-tests-excel.xls",
"$samples/excel/datefuns.xls",
"$samples/excel/dbfuns.xls",
"$samples/excel/engfuns.xls",
@@ -244,12 +249,19 @@ my @full_corpus =
"$samples/validation-tests.gnumeric",
);
+my @full_corpus =
+ ("$samples/excel/chart-tests-excel.xls", # Too big
+ @dist_corpus);
+
+
sub corpus {
my ($c) = @_;
my $corpus = ($c || $user_corpus || $default_corpus);
if ($corpus eq 'full') {
return @full_corpus;
+ } elsif ($corpus eq 'dist') {
+ return @dist_corpus;
} elsif ($corpus =~ /^random:(\d+)$/) {
my $n = $1;
my @corpus = grep { -r $_; } @full_corpus;
diff --git a/test/Makefile.am b/test/Makefile.am
index a30ee5d..8c68965 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -194,7 +194,6 @@ INTROSPECTION_SUPPS = \
if HAVE_INTROSPECTION
if HAVE_PYTHON_GI
TESTS += $(INTROSPECTION_TSTS)
- SUPPS += $(INTROSPECTION_SUPPS)
endif
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]