diff options
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 12 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/Makefile.am | 5 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/Makefile.in | 118 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/access.c | 6 | ||||
-rwxr-xr-x | Build/source/texk/kpathsea/configure | 32 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/configure.ac | 2 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/doc/Makefile.in | 1 | ||||
-rwxr-xr-x | Build/source/texk/kpathsea/kpseaccess.test | 27 | ||||
-rwxr-xr-x | Build/source/texk/kpathsea/kpsereadlink.test | 13 | ||||
-rwxr-xr-x | Build/source/texk/kpathsea/kpsestat.test | 19 | ||||
-rwxr-xr-x | Build/source/texk/kpathsea/kpsewhich.test | 18 |
11 files changed, 226 insertions, 27 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 7029c47b081..6c52b98edcf 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,8 @@ +2010-05-16 Peter Breitenlohner <peb@mppmu.mpg.de> + + * access.c: Adapt comment to facts. + * man/kpseaccess.man: Adapt to facts. + 2010-05-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp> *absolute.c, c-fopen.h, c-stat.h, config.h, debug.h, dir.c, @@ -7,6 +12,13 @@ strtol.c, tex-file.c, tex-glyph.h, types.h, win32lib.h: untabify. +2010-05-15 Peter Breitenlohner <peb@mppmu.mpg.de> + + * kpseaccess.test, kpsereadlink.test, kpsestat.test, + kpsewhich.test: New shell scripts to test the programs. + * configure.ac (LT_OBJDIR): AC_SUBST for kpsereadlink.test. + * Makefile.am (TESTS, TESTS_ENVIRONMENT): Add the tests. + 2010-05-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp> *absolute.c: avoid late declaration. add support of UNC names (WIN32). diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am index 7c950ffe169..d23943f6fb3 100644 --- a/Build/source/texk/kpathsea/Makefile.am +++ b/Build/source/texk/kpathsea/Makefile.am @@ -309,6 +309,11 @@ uninstall-hook: else :; fi; \ done +## The tests +TESTS = kpseaccess.test kpsereadlink.test kpsestat.test kpsewhich.test +TESTS_ENVIRONMENT = LN_S='$(LN_S)' LT_OBJDIR='$(LT_OBJDIR)' +EXTRA_DIST += $(TESTS) + ## Not used ## EXTRA_DIST += mktex.cnf diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in index f077fa3fd7d..68df89042c6 100644 --- a/Build/source/texk/kpathsea/Makefile.in +++ b/Build/source/texk/kpathsea/Makefile.in @@ -196,6 +196,8 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -274,6 +276,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_OBJDIR = @LT_OBJDIR@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -353,7 +356,7 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 SUBDIRS = . doc man EXTRA_DIST = BUGS PROJECTS putenv.c strcasecmp.c strtol.c strstr.c \ - bsnl.awk mktex.cnf Makefile.in.orig common.ac.orig \ + bsnl.awk $(TESTS) mktex.cnf Makefile.in.orig common.ac.orig \ withenable.ac INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir)/.. AM_CFLAGS = $(WARNING_CFLAGS) @@ -445,6 +448,8 @@ dist_noinst_DATA = texmf.cnf bin_links = \ mktexlsr:texhash +TESTS = kpseaccess.test kpsereadlink.test kpsestat.test kpsewhich.test +TESTS_ENVIRONMENT = LN_S='$(LN_S)' LT_OBJDIR='$(LT_OBJDIR)' all: $(BUILT_SOURCES) c-auto.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -1320,6 +1325,98 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @@ -1496,6 +1593,7 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ @@ -1616,18 +1714,18 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_web2cDATA \ @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - ctags-recursive install install-am install-data-am \ + check-am ctags-recursive install install-am install-data-am \ install-exec-am install-strip tags-recursive uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzma \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ + all all-am am--refresh check check-TESTS check-am clean \ + clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS install-data \ install-data-am install-data-hook install-dist_web2cDATA \ install-dist_web2cSCRIPTS install-dvi install-dvi-am \ install-exec install-exec-am install-exec-hook install-html \ diff --git a/Build/source/texk/kpathsea/access.c b/Build/source/texk/kpathsea/access.c index c1b7cf24f2e..e6fb91174d2 100644 --- a/Build/source/texk/kpathsea/access.c +++ b/Build/source/texk/kpathsea/access.c @@ -61,9 +61,9 @@ Try `%s --help' for more information.\n", argv[0], argv[0]); exit(1); } - /* The option parsing is somewhat primitive: '-' need not be the first - * character of the mode. The mode must be specified in a single - * option. Both of these may change. + /* The option parsing is somewhat primitive. The mode must be + * specified as a single parameter: an optional '-' followed by + * zero or more letters 'r', 'w', or 'x'. This may change. */ mode = 0; i = argv[1]; diff --git a/Build/source/texk/kpathsea/configure b/Build/source/texk/kpathsea/configure index ab99bd63b19..697a1c4dfdf 100755 --- a/Build/source/texk/kpathsea/configure +++ b/Build/source/texk/kpathsea/configure @@ -746,6 +746,7 @@ ac_includes_default="\ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +LT_OBJDIR MINGW32_FALSE MINGW32_TRUE WIN32_FALSE @@ -4597,13 +4598,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4600: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4601: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4603: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4604: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4606: output\"" >&5) + (eval echo "\"\$as_me:4607: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5806,7 +5807,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5809 "configure"' > conftest.$ac_ext + echo '#line 5810 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7736,11 +7737,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7739: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7740: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7743: \$? = $ac_status" >&5 + echo "$as_me:7744: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8075,11 +8076,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8078: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8079: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8082: \$? = $ac_status" >&5 + echo "$as_me:8083: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8180,11 +8181,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8183: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8184: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8187: \$? = $ac_status" >&5 + echo "$as_me:8188: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8235,11 +8236,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8238: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8239: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8242: \$? = $ac_status" >&5 + echo "$as_me:8243: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10602,7 +10603,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10605 "configure" +#line 10606 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10698,7 +10699,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10701 "configure" +#line 10702 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12083,6 +12084,9 @@ else fi +LT_OBJDIR="$lt_cv_objdir" + + ac_config_headers="$ac_config_headers c-auto.h:c-auto.in" diff --git a/Build/source/texk/kpathsea/configure.ac b/Build/source/texk/kpathsea/configure.ac index 4053aaad216..e3a641214fe 100644 --- a/Build/source/texk/kpathsea/configure.ac +++ b/Build/source/texk/kpathsea/configure.ac @@ -75,6 +75,8 @@ KPSE_CHECK_WIN32 AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno]) AM_CONDITIONAL([MINGW32], [test "x$kpse_cv_have_win32" = xmingw32]) +AC_SUBST([LT_OBJDIR], ["$lt_cv_objdir"]) + dnl Write output here, instead of putting a zillion -D's on the command line. AC_CONFIG_HEADERS([c-auto.h:c-auto.in], [sed -e 's/^#define PACKAGE/#define KPSE_PACKAGE/' \ diff --git a/Build/source/texk/kpathsea/doc/Makefile.in b/Build/source/texk/kpathsea/doc/Makefile.in index 7781eb0bc23..8d1543b2aff 100644 --- a/Build/source/texk/kpathsea/doc/Makefile.in +++ b/Build/source/texk/kpathsea/doc/Makefile.in @@ -132,6 +132,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_OBJDIR = @LT_OBJDIR@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ diff --git a/Build/source/texk/kpathsea/kpseaccess.test b/Build/source/texk/kpathsea/kpseaccess.test new file mode 100755 index 00000000000..ffe2b56f312 --- /dev/null +++ b/Build/source/texk/kpathsea/kpseaccess.test @@ -0,0 +1,27 @@ +#! /bin/sh + +# Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +./kpseaccess '' nonesuch && exit 1 +./kpseaccess - nonesuch && exit 1 +./kpseaccess r nonesuch && exit 1 +./kpseaccess w nonesuch && exit 1 +./kpseaccess x nonesuch && exit 1 + +./kpseaccess '' access.o || exit 1 +./kpseaccess - access.o || exit 1 +./kpseaccess rw access.o || exit 1 +./kpseaccess x access.o && exit 1 + +./kpseaccess rwx kpseaccess || exit 1 + +./kpseaccess r $srcdir/access.c || exit 1 +./kpseaccess x $srcdir/access.c && exit 1 + +if ./kpseaccess w $srcdir/access.c; then + echo 'file "$srcdir/access.c" is writable' +else + echo 'file "$srcdir/access.c" is not writable' +fi + diff --git a/Build/source/texk/kpathsea/kpsereadlink.test b/Build/source/texk/kpathsea/kpsereadlink.test new file mode 100755 index 00000000000..7770a00bd03 --- /dev/null +++ b/Build/source/texk/kpathsea/kpsereadlink.test @@ -0,0 +1,13 @@ +#! /bin/sh + +# Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +test "x$LN_S" = 'xln -s' || exit 77 + +./kpsereadlink $LT_OBJDIR/libkpathsea.lai && exit 1 + +link=`./kpsereadlink $LT_OBJDIR/libkpathsea.la` || exit 1 + +test "x$link" = x../libkpathsea.la || exit 1 + diff --git a/Build/source/texk/kpathsea/kpsestat.test b/Build/source/texk/kpathsea/kpsestat.test new file mode 100755 index 00000000000..8e1cf8526a4 --- /dev/null +++ b/Build/source/texk/kpathsea/kpsestat.test @@ -0,0 +1,19 @@ +#! /bin/sh + +# Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +./kpsestat = nonesuch 2>/dev/null && exit 1 + +for f in . kpsestat kpsestat.o; do + echo "kpsestat = $f => `./kpsestat = $f`" +done + +for m in -rw g-r u-w o+x -rw,u+s -rw,g+s -rw,o+t; do + echo "kpsestat $m kpsestat.o => `./kpsestat $m kpsestat.o`" +done + +echo "kpsestat = \$srcdir => `./kpsestat = $srcdir`" +echo "kpsestat = \$srcdir/ => `./kpsestat = $srcdir/`" +echo "kpsestat = \$srcdir/kpsestat.c => `./kpsestat = $srcdir/kpsestat.c`" + diff --git a/Build/source/texk/kpathsea/kpsewhich.test b/Build/source/texk/kpathsea/kpsewhich.test new file mode 100755 index 00000000000..813f6dc8a55 --- /dev/null +++ b/Build/source/texk/kpathsea/kpsewhich.test @@ -0,0 +1,18 @@ +#! /bin/sh + +# Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +TEXMFCNF=$srcdir +export TEXMFCNF + +./kpsewhich --var-value=TEXMFMAIN || exit 1 + +./kpsewhich --expand-var=\$TEXMFMAIN || exit 1 + +BSTINPUTS=$srcdir/../tests/texmf \ + ./kpsewhich plain.bst || exit 1 + +AFMFONTS=$srcdir/../tests/texmf \ + ./kpsewhich afmtest.afm || exit 1 + |