Commit 0c2f0a8a authored by Morten Welinder's avatar Morten Welinder

Distcheck fixes.

Cleanups.
Install introspection python overrides.
Use a more controlled way of gathering samples for dist.
parent 000a2f46
......@@ -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
......
......@@ -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 **************************************************
......
......@@ -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 \
......
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
......@@ -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;
......
......@@ -194,7 +194,6 @@ INTROSPECTION_SUPPS = \
if HAVE_INTROSPECTION
if HAVE_PYTHON_GI
TESTS += $(INTROSPECTION_TSTS)
SUPPS += $(INTROSPECTION_SUPPS)
endif
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment