Index: Makefile.in =================================================================== diff -u -r2892d433e290401493c7cb5bbdd873556149ba44 -r9a578692ecf2d05eb4da0de37c7e0bdca3819570 --- Makefile.in (.../Makefile.in) (revision 2892d433e290401493c7cb5bbdd873556149ba44) +++ Makefile.in (.../Makefile.in) (revision 9a578692ecf2d05eb4da0de37c7e0bdca3819570) @@ -237,7 +237,7 @@ if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ done; fi; -libraries: +libraries: libraries-pkgindex @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ for dir in $$dirs ; do \ if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ Index: TODO =================================================================== diff -u -r6edd8aa86d66687dcfa2c60460de6e9b41ee0051 -r9a578692ecf2d05eb4da0de37c7e0bdca3819570 --- TODO (.../TODO) (revision 6edd8aa86d66687dcfa2c60460de6e9b41ee0051) +++ TODO (.../TODO) (revision 9a578692ecf2d05eb4da0de37c7e0bdca3819570) @@ -1959,6 +1959,11 @@ - nx: added "-returns" to forwarder - added regression test for forwarder and returns +- rebuild pkgIndex.tcl more eagerly +- added error handler to pkg_mkIndex when called via "make libraries-pkgindex" + * just show warning and errors when rebuilding pkgIndex files + * stop make in case of errors in pkg_mkIndex + TODO: - "-returns" Index: library/lib/make.tcl =================================================================== diff -u -redb00d4c85a822b2a28eed052459c4933dabfd94 -r9a578692ecf2d05eb4da0de37c7e0bdca3819570 --- library/lib/make.tcl (.../make.tcl) (revision edb00d4c85a822b2a28eed052459c4933dabfd94) +++ library/lib/make.tcl (.../make.tcl) (revision 9a578692ecf2d05eb4da0de37c7e0bdca3819570) @@ -1,9 +1,12 @@ -### inEachDir changes now to each directory -### install clears tgarget directory before installing -### Object file added (for better -n processing) +### +### Utility for the build process. Main purpose currently: +### +### - Build the pkgIndex in each directory +### lappend auto_path .. package require nx +namespace eval ::nx {}; # make pkg_mkIndex happy namespace import -force ::nx::* ### @@ -41,15 +44,27 @@ } #puts stderr "callinglevel <[current callinglevel]> $fls" - set loads "-load nsf" + # + # redefine the logging behavior to show just error or warnings, + # preceded by the current directory + # + #set ::current [pwd] + proc ::tclLog msg { + if {[regexp {^(error|warning)} $msg]} { + if {[regexp -nocase error $msg]} { + error $msg + } + puts stderr "$msg ([pwd])" + } + } + + set flags "-verbose -direct -load nsf" if {$fls ne "nx.tcl"} { - append loads " -load nx" + append flags " -load nx" } - puts stderr "[pwd]:\n\tcall eval pkg_mkIndex -verbose -direct $loads . $fls" - if {[catch {pkg_mkIndex -verbose -direct {*}$loads . {*}$fls} errs]} { - puts stderr "*** $errs" - } - puts stderr "[pwd] done" + #puts stderr "[pwd]:\n\tcall pkg_mkIndex $flags . $fls" + pkg_mkIndex {*}$flags . {*}$fls + #puts stderr "[pwd] done" } foreach addFile [glob -nocomplain *.add] { @@ -74,7 +89,9 @@ } { set olddir [pwd] cd $path - make {*}$cmd $path + if {[catch {make {*}$cmd $path} errMsg]} { + error "$errMsg (in directory [pwd])" + } set files [glob -nocomplain *] cd $olddir foreach p $files { :inEachDir $path/$p $cmd } @@ -168,10 +185,15 @@ :public method target {path} {make eval [list set :target $path]} - :create main + if {[catch {:create main} errorMsg]} { + puts stderr "*** $errorMsg" + # Exit sliently, alltough we are leaving from an active stack + # frame. + ::nsf::configure debug 0 + exit -1 + } } #puts stderr "+++ make.tcl finished." -#if {[set ::tcl_platform(platform)] eq "windows"} { -# exit -#} + +#exit $::result \ No newline at end of file Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -r6f72c600280cddbd136b01371d331f2e55149465 -r9a578692ecf2d05eb4da0de37c7e0bdca3819570 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 6f72c600280cddbd136b01371d331f2e55149465) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 9a578692ecf2d05eb4da0de37c7e0bdca3819570) @@ -11,7 +11,7 @@ set ::xotcl::version 2.0 set ::xotcl::patchlevel .0 - namespace eval ::nsf {}; # make package indexer happy + namespace eval ::nsf {}; # make package indexer (pkg_mkIndex) happy set ::nsf::bootstrap ::xotcl #