built-sources: $(BUILT_SOURCES)
AM_CPPFLAGS = \
- -I$(top_srcdir)/gl \
- -I$(top_builddir)/gl \
+ -I"$(top_srcdir)/gl" \
+ -I"$(top_builddir)/gl" \
-DINSTALLDIR=\"$(bindir)\"
AM_V_P ?= :
$(FIGURE_SPVS): $(pspp)
.sps.spv:
- $(AM_V_GEN)(cd $(top_srcdir)/examples \
- && $(abs_top_builddir)/$(pspp) ../doc/pspp-figures/$(<F) -o - -O format=spv) > $@.tmp
+ $(AM_V_GEN)(cd "$(top_srcdir)/examples" \
+ && "$(abs_top_builddir)/$(pspp)" ../doc/pspp-figures/$(<F) -o - -O format=spv) > $@.tmp
$(AM_V_at)mv $@.tmp $@
# In some cases, the tutorial only wants some parts of the output.
};
WriteMakefile(
+ MAKEFILE => 'MakefileX',
FULLPERL => "PSPP_TEST_CMD=\"$Locations{BuildDir}/src/ui/terminal/pspp\" \$(PERL)",
NAME => 'PSPP',
DISTNAME => 'PSPP-Perl',
perl-module/pspp-module-config: Makefile
$(AM_V_GEN)(echo '%Locations = (';\
printf " SourceDir => '";\
- (cd $(top_srcdir) && echo `pwd`\', ) ;\
+ (cd "$(top_srcdir)" && echo `pwd`\', ) ;\
printf " BuildDir => '";\
- (cd $(top_builddir) && echo `pwd`\' );\
- echo ');') > $(top_builddir)/perl-module/pspp-module-config
+ (cd "$(top_builddir)" && echo `pwd`\' );\
+ echo ');') > "$(top_builddir)/perl-module/pspp-module-config"
-perl-module/Makefile: perl-module/Makefile.PL perl-module/pspp-module-config $(module_sources)
+perl-module/Makefile: perl-module/MakefileX
+ $(SED) -e "/^INC/s/\([^=]\) *-I/\1\" -I/g" -e "/^INC/s/ *-I */ -I\"/g" -e "/^INC/s/ *$$/\"/" -e "/^MYEXTLIB/s/\([^=]\) \([^=]\)/\1\\\\ \2/g" $< > $@
+
+perl-module/MakefileX: perl-module/Makefile.PL perl-module/pspp-module-config $(module_sources)
$(AM_V_GEN)cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix) \
OPTIMIZE="$(CFLAGS) $(CPPFLAGS)" \
LD="`$(PERL) -e 'use Config::Perl::V;print Config::Perl::V::myconfig()->{config}{ld};'` $(LDFLAGS)"
if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \
rm -f $(module_sources) ; \
fi
- rm -f perl-module/Makefile.old
+ rm -f perl-module/Makefile.old perl-module/MakefileX perl-module/MakefileX.old perl-module/Makefile
CLEANFILES += \
perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz \
-AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/lib
+AM_CPPFLAGS += -I"$(top_srcdir)/src" -I"$(top_srcdir)/lib"
pkglib_LTLIBRARIES = src/libpspp-core.la src/libpspp.la
$(AV_V_GEN)$(MKDIR_P) `dirname $@` && \
$(PERL) $< -o $@ -i $(top_srcdir)/src/language/expressions/operations.def
-AM_CPPFLAGS += -I$(abs_top_builddir)/src/language/expressions \
- -I$(top_srcdir)/src/language/expressions
+AM_CPPFLAGS += -I"$(abs_top_builddir)/src/language/expressions" \
+ -I"$(top_srcdir)/src/language/expressions"
EXTRA_DIST += src/language/expressions/TODO
#
## Process this file with automake to produce Makefile.in -*- makefile -*-
-AM_CPPFLAGS += -I$(top_srcdir)/src/language/stats
+AM_CPPFLAGS += -I"$(top_srcdir)/src/language/stats"
language_stats_sources = \
src/language/stats/aggregate.c \
dnl Check for a bug where the ranks were inappropriately allocated, when
dnl multiple variables were tested and MISSING=ANALYSIS chosen.
-cp $abs_srcdir/language/mann-whitney.txt .
+cp "$abs_srcdir/language/mann-whitney.txt" .
AT_DATA([npar-mann-whitney.sps], [dnl
SET FORMAT = F11.3
dir1=$here/original
dir2=$here/recovered
-mkdir -p $dir1
+mkdir -p "$dir1"
# Generate files of differing sizes with random data in them
names=""
s=1;
while test $s -le 8192 ; do
- name=$dir1/$s
- dd if=/dev/urandom of=$name count=1 bs=$s 2> /dev/null
+ name="$dir1/$s"
+ dd if=/dev/urandom of="$name" count=1 bs=$s 2> /dev/null
s=$(($s * 2));
- bn=`basename $name`;
+ bn=`basename "$name"`;
names="$names $bn";
done
-AT_CHECK([cd $dir1 && zip-test w foo.zip $names])
+AT_CHECK([cd "$dir1" && zip-test w foo.zip $names])
# If zipinfo is installed, make sure it can read the zipfile.
if (zipinfo -v) >/dev/null 2>&1; then
- AT_CHECK([zipinfo $dir1/foo.zip], [0], [ignore])
+ AT_CHECK([zipinfo "$dir1/foo.zip"], [0], [ignore])
fi
-mkdir -p $dir2
-cp $dir1/foo.zip $dir2
-cd $dir2
+mkdir -p "$dir2"
+cp "$dir1/foo.zip" "$dir2"
+cd "$dir2"
AT_CHECK([zip-test r foo.zip $names])
AT_CHECK([
# Compare the files to their originals
for f in $names; do
- diff $dir1/$f $dir2/$f;
+ diff "$dir1/$f" "$dir2/$f";
if test $? -ne 0 ; then exit 1; fi;
done
])
dir1=$here/original
dir2=$here/recovered
-mkdir -p $dir1
+mkdir -p "$dir1"
# Generate files of differing sizes with random data in them
names=""
s=1;
while test $s -le 8192 ; do
- name=$dir1/$s
- dd if=/dev/urandom of=$name count=1 bs=$s 2> /dev/null
+ name="$dir1/$s"
+ dd if=/dev/urandom of="$name" count=1 bs=$s 2> /dev/null
s=$(($s * 2));
- bn=`basename $name`;
+ bn=`basename "$name"`;
names="$names $bn";
done
# The pipe through "cat" below is essential because it makes the
# output file un-seekable.
-AT_CHECK([cd $dir1 && zip-test w - $names | cat > foo.zip])
+AT_CHECK([cd "$dir1" && zip-test w - $names | cat > foo.zip])
# If zipinfo is installed, make sure it can read the zipfile.
if (zipinfo -v) >/dev/null 2>&1; then
- AT_CHECK([zipinfo $dir1/foo.zip], [0], [ignore])
+ AT_CHECK([zipinfo "$dir1/foo.zip"], [0], [ignore])
fi
-mkdir -p $dir2
-cp $dir1/foo.zip $dir2
-cd $dir2
+mkdir -p "$dir2"
+cp "$dir1/foo.zip" "$dir2"
+cd "$dir2"
AT_CHECK([zip-test r foo.zip $names])
AT_CHECK([
# Compare the files to their originals
for f in $names; do
- diff $dir1/$f $dir2/$f;
+ diff "$dir1/$f" "$dir2/$f";
if test $? -ne 0 ; then exit 1; fi;
done
])
AT_SETUP([tex another example])
-AT_CHECK([pspp -O format=tex $abs_top_srcdir/examples/regress.sps], [0], [])
+AT_CHECK([pspp -O format=tex "$abs_top_srcdir/examples/regress.sps"], [0], [])
AT_CHECK([test $($GWC -L pspp.tex | awk '{print $1}') -le 80], [0], [ignore])
AT_SKIP_IF([test "$TEX" = no])
dnl PSPP - a program for statistical analysis.
-dnl Copyright (C) 2017, 2020 Free Software Foundation, Inc.
+dnl Copyright (C) 2017, 2020, 2021 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
m4_divert_push([PREPARE_TESTS])
# Find the Address Sanitizer library that PSPP is linked against, if any.
# If it exists, it needs to be preloaded when we run Perl.
-asan_lib=$($abs_top_builddir/libtool --mode=execute ldd \
- $abs_top_builddir/src/ui/terminal/pspp 2>/dev/null \
+asan_lib=$("$abs_top_builddir/libtool" --mode=execute ldd \
+ "$abs_top_builddir/src/ui/terminal/pspp" 2>/dev/null \
| grep asan \
| awk '{print $3}')
if test ! -e "$asan_lib"; then
dnl not need to be run with the perl-module build directory as the current
dnl working directory.
run_perl_module () {
- LD_PRELOAD=$asan_lib:$LD_PRELOAD \
- LD_LIBRARY_PATH=$abs_top_builddir/src/.libs \
- DYLD_LIBRARY_PATH=$abs_top_builddir/src/.libs \
+ LD_PRELOAD="$asan_lib":"$LD_PRELOAD" \
+ LD_LIBRARY_PATH="$abs_top_builddir/src/.libs" \
+ DYLD_LIBRARY_PATH="$abs_top_builddir/src/.libs" \
ASAN_OPTIONS="$ASAN_OPTIONS detect_leaks=false" \
- $PERL -I$abs_top_builddir/perl-module/blib/arch \
- -I$abs_top_builddir/perl-module/blib/lib "$@"
+ $PERL -I"$abs_top_builddir/perl-module/blib/arch" \
+ -I"$abs_top_builddir/perl-module/blib/lib" "$@"
}
m4_divert_pop([PREPARE_TESTS])
AT_CHECK([perl -MText::Diff -e '' || exit 77])
# Skip this test if Perl's Memory::Usage module is not installed.
AT_CHECK([perl -MMemory::Usage -e '' || exit 77])
-AT_CHECK([run_perl_module $abs_top_builddir/perl-module/t/Pspp.t], [0],
+AT_CHECK([run_perl_module "$abs_top_builddir/perl-module/t/Pspp.t"], [0],
[[1..38
ok 1 - use PSPP;
ok 2 - Dictionary Creation
AT_SETUP([Syntax Generation - printf like])
-AT_CHECK([$abs_top_builddir/tests/ui/syntax-gen-test],[0],[dnl
+AT_CHECK(["$abs_top_builddir/tests/ui/syntax-gen-test"],[0],[dnl
A simple string: Hello worldEND
A syntax string: "Hello world"END
A syntax string containing ": 'here"is the quote'END