Mercurial > pytave
changeset 388:ce61206a61f8
build: make distcheck pass again
* Makefile.am (EXTRA_DIST): Include $(M_FILES). (PKG_ADD, PKG_DEL): Use
$(srcdir) as needed. (check-local): Use $(srcdir) to run the test script.
* __py_tests__.m: Suppress warnings about opening files on the load path.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Mon, 03 Apr 2017 11:51:01 -0700 |
parents | 1af368713379 |
children | d4061763a56b |
files | Makefile.am __py_tests__.m |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.am Mon Apr 03 11:25:53 2017 -0700 +++ b/Makefile.am Mon Apr 03 11:51:01 2017 -0700 @@ -75,7 +75,7 @@ TST_FILES = $(addsuffix -tst,$(OCT_SOURCE_FILES)) -EXTRA_DIST = $(DOC_FILES) $(OCT_SOURCE_FILES) +EXTRA_DIST = $(DOC_FILES) $(M_FILES) $(OCT_SOURCE_FILES) EXTRA_libdir = $(PYTAVE_MODULE_INSTALL_PATH) EXTRA_lib_LTLIBRARIES = _pytave.la @@ -115,7 +115,8 @@ PKG_ADD: $(OCT_SOURCE_FILES) $(AM_V_GEN)for f in $(OCT_SOURCE_FILES); do \ b=$${f%.cc}; \ - funcs=`$(SED) -n 's/^DEFUN.*(\(\w\+\),.*/\1/p' $$f | grep -v $$b`; \ + if test -f $$f; then d=.; else d=$(srcdir); fi; \ + funcs=`$(SED) -n 's/^DEFUN.*(\(\w\+\),.*/\1/p' $$d/$$f | grep -v $$b`; \ if test -n "$$funcs"; then \ echo "$$funcs" | $(SED) "s/.*/autoload (\"&\", \"$$b.oct\");/" > $@-t && \ mv $@-t $@ || exit $?; \ @@ -125,7 +126,8 @@ PKG_DEL: $(OCT_SOURCE_FILES) $(AM_V_GEN)for f in $(OCT_SOURCE_FILES); do \ b=$${f%.cc}; \ - funcs=`$(SED) -n 's/^DEFUN.*(\(\w\+\),.*/\1/p' $$f | grep -v $$b`; \ + if test -f $$f; then d=.; else d=$(srcdir); fi; \ + funcs=`$(SED) -n 's/^DEFUN.*(\(\w\+\),.*/\1/p' $$d/$$f | grep -v $$b`; \ if test -n "$$funcs"; then \ echo "$$funcs" | $(SED) "s/.*/autoload (\"&\", which (\"&\"), \"remove\");/" > $@-t && \ mv $@-t $@ || exit $?; \ @@ -146,4 +148,4 @@ check-local: $(M_FILES) $(TST_FILES) $(OCTAVE) --no-gui-libs --no-history --no-window-system --norc \ --path="$(abs_builddir)" --path="$(abs_srcdir)" \ - __py_tests__.m $(M_FILES) $(TST_FILES) + $(srcdir)/__py_tests__.m $(M_FILES) $(TST_FILES)
--- a/__py_tests__.m Mon Apr 03 11:25:53 2017 -0700 +++ b/__py_tests__.m Mon Apr 03 11:51:01 2017 -0700 @@ -26,10 +26,12 @@ files_with_tests = {}; pso = page_screen_output (); + orig_wstate = warning (); logfile = make_absolute_filename ("fntests.log"); unwind_protect page_screen_output (false); + warning ("off", "Octave:data-file-in-path"); try fid = fopen (logfile, "wt"); if (fid < 0) @@ -104,6 +106,8 @@ disp (lasterr ()); end_try_catch unwind_protect_cleanup + warning ("off", "all"); + warning (orig_wstate); page_screen_output (pso); end_unwind_protect retval = (nfail != 0);