Index: Makefile.in =================================================================== diff -u -r00e5f3c0e3a3b71eaa89f1a673292835bc0d7a56 -rb34996b24ea334963e83aadda66384680a6f8ce5 --- Makefile.in (.../Makefile.in) (revision 00e5f3c0e3a3b71eaa89f1a673292835bc0d7a56) +++ Makefile.in (.../Makefile.in) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -282,7 +282,7 @@ done; fi; libraries-pkgindex: pkgIndex.tcl - $(TCLSH) $(src_lib_dir_native)/lib/make.tcl -dir $(src_lib_dir_native) -all + $(TCLSH) $(src_lib_dir_native)/lib/mkIndex.tcl -dir $(src_lib_dir_native) full-doc: doc pdf example-doc Index: TODO =================================================================== diff -u -r3f34f07ea7f3fcee21a4b48d402dd4c20da2a6de -rb34996b24ea334963e83aadda66384680a6f8ce5 --- TODO (.../TODO) (revision 3f34f07ea7f3fcee21a4b48d402dd4c20da2a6de) +++ TODO (.../TODO) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -4959,6 +4959,18 @@ properties added later to superclasses. - extend regression test +nsf.c: +- remove redundant NULL tests +- improve safety mof macro ObjStr() + +build-process: +- replace make.tcl by the much simpler mkIndex.tcl: + * Does not use pkg_mkIndex + * Does not load binary files (problem for cross compiling) + * Requires package provide with constant in one line. + + + ======================================================================== TODO: Index: library/lib/mkIndex.tcl =================================================================== diff -u --- library/lib/mkIndex.tcl (revision 0) +++ library/lib/mkIndex.tcl (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -0,0 +1,81 @@ +### +### Utility for the build process. Main purpose currently: +### +### - Build the pkgIndex in each directory +### + +# adjust the paths; +# - auto_path is needed, when nx is loaded via good old pkgIndex.tcl +# - tcl::tm::roots is needed when nx is provided as a tcl module (.tm) +lappend auto_path .. +::tcl::tm::roots [pwd] + +set verbose 0 + +proc mkIndex {} { + if {$::verbose} {puts stderr "+++ mkIndex in [pwd]"} + set fls {} + foreach f [glob -nocomplain *tcl] { + if {![file isdirectory $f]} { + set F [open $f]; set c [read $F]; close $F + if {[string match "*package provide*" $c]} { + lappend fls $f + #puts "provide in $f" + foreach l [split $c \n] { + #puts stderr "check $l" + if {[regexp {^\s*package\s+provide\s+(\S+)\s+([0-9]\S+)\s*$} $l _ pkg version]} { + #puts stderr "found package $pkg $version in $f" + set pkg_file($pkg) $f + set pkg_version($pkg) $version + break + } + } + } + } + } + + set pkgIndex "" + foreach pkg [lsort [array names pkg_file]] { + append pkgIndex "package ifneeded $pkg $pkg_version($pkg) \[list source \[file join \$dir $pkg_file($pkg)\]\]\n" + } + + foreach addFile [glob -nocomplain *.add] { + if {[file exists $addFile]} { + puts stderr "Appending $addFile to pkgIndex.tcl in [pwd]" + set IN [open $addFile] + append pkgIndex [read $IN]\n + close $IN + } + } + + if {$pkgIndex ne ""} { + if {$::verbose} {puts stderr "Write [pwd]/pkgIndex.tcl"} + set OUT [open pkgIndex.tcl w] + puts -nonewline $OUT $pkgIndex + close $OUT + } + + #puts stderr "+++ mkIndex pwd=[pwd] DONE" +} + +proc inEachDir {path cmd} { + if {$::verbose} {puts stderr "[pwd] inEachDir $path (dir [file isdirectory $path]) $cmd"} + if { [file isdirectory $path] + && ![string match *CVS $path] + && ![string match *SCCS $path] + && ![string match *Attic $path] + && ![string match *dbm* $path] + } { + set olddir [pwd] + cd $path + if {[catch $cmd errMsg]} { + error "$errMsg (in directory [pwd])" + } + set files [glob -nocomplain *] + cd $olddir + foreach p $files { inEachDir $path/$p $cmd } + if {$::verbose} {puts stderr "+++ change back to $olddir"} + } +} + +inEachDir . mkIndex Index: library/mongodb/configure =================================================================== diff -u -rcef3de5c4f65e767d0c66389bacc77bc3c2e5a68 -rb34996b24ea334963e83aadda66384680a6f8ce5 --- library/mongodb/configure (.../configure) (revision cef3de5c4f65e767d0c66389bacc77bc3c2e5a68) +++ library/mongodb/configure (.../configure) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for nsfmongo 0.2. +# Generated by GNU Autoconf 2.69 for nsfmongo 0.3. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='nsfmongo' PACKAGE_TARNAME='nsfmongo' -PACKAGE_VERSION='0.2' -PACKAGE_STRING='nsfmongo 0.2' +PACKAGE_VERSION='0.3' +PACKAGE_STRING='nsfmongo 0.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1291,7 +1291,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nsfmongo 0.2 to adapt to many kinds of systems. +\`configure' configures nsfmongo 0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1352,7 +1352,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nsfmongo 0.2:";; + short | recursive ) echo "Configuration of nsfmongo 0.3:";; esac cat <<\_ACEOF @@ -1463,7 +1463,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nsfmongo configure 0.2 +nsfmongo configure 0.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1828,7 +1828,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nsfmongo $as_me 0.2, which was +It was created by nsfmongo $as_me 0.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -7706,7 +7706,7 @@ # which require substituting th AC variables in. Include these here. #-------------------------------------------------------------------- -ac_config_files="$ac_config_files Makefile" +ac_config_files="$ac_config_files Makefile pkgIndex.add" cat >confcache <<\_ACEOF @@ -8253,7 +8253,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nsfmongo $as_me 0.2, which was +This file was extended by nsfmongo $as_me 0.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8306,7 +8306,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nsfmongo config.status 0.2 +nsfmongo config.status 0.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -8418,6 +8418,7 @@ do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "pkgIndex.add") CONFIG_FILES="$CONFIG_FILES pkgIndex.add" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac Index: library/mongodb/configure.ac =================================================================== diff -u -r7543d1df847248f723f02fa1abc6645713b9d10f -rb34996b24ea334963e83aadda66384680a6f8ce5 --- library/mongodb/configure.ac (.../configure.ac) (revision 7543d1df847248f723f02fa1abc6645713b9d10f) +++ library/mongodb/configure.ac (.../configure.ac) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -271,7 +271,7 @@ # which require substituting th AC variables in. Include these here. #-------------------------------------------------------------------- -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile pkgIndex.add]) AC_OUTPUT Index: library/mongodb/pkgIndex.add.in =================================================================== diff -u --- library/mongodb/pkgIndex.add.in (revision 0) +++ library/mongodb/pkgIndex.add.in (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -0,0 +1 @@ +package ifneeded nsf @PACKAGE_VERSION@ [list load [file join $dir @PKG_LIB_FILE@] nsf] Index: library/nx/pkgIndex.tcl =================================================================== diff -u -reb758924a74f48512c98a40a539ab0c4e5a35de9 -rb34996b24ea334963e83aadda66384680a6f8ce5 --- library/nx/pkgIndex.tcl (.../pkgIndex.tcl) (revision eb758924a74f48512c98a40a539ab0c4e5a35de9) +++ library/nx/pkgIndex.tcl (.../pkgIndex.tcl) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -1,13 +1,3 @@ -# Tcl package index file, version 1.1 -# This file is generated by the "pkg_mkIndex -direct -load nsf -load nx" command -# and sourced either when an application starts up or -# by a "package unknown" script. It invokes the -# "package ifneeded" command to set up package-related -# information so that packages will be loaded automatically -# in response to "package require" commands. When this -# script is sourced, the variable $dir must contain the -# full path name of this file's directory. - package ifneeded nx 2.0b6 [list source [file join $dir nx.tcl]] package ifneeded nx::class-method 1.0 [list source [file join $dir class-method.tcl]] package ifneeded nx::plain-object-method 1.0 [list source [file join $dir plain-object-method.tcl]] Index: library/serialize/pkgIndex.tcl =================================================================== diff -u -r073177c8b1304443107efeeb0c334e9477346778 -rb34996b24ea334963e83aadda66384680a6f8ce5 --- library/serialize/pkgIndex.tcl (.../pkgIndex.tcl) (revision 073177c8b1304443107efeeb0c334e9477346778) +++ library/serialize/pkgIndex.tcl (.../pkgIndex.tcl) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -1,11 +1 @@ -# Tcl package index file, version 1.1 -# This file is generated by the "pkg_mkIndex -direct -load nsf -load nx" command -# and sourced either when an application starts up or -# by a "package unknown" script. It invokes the -# "package ifneeded" command to set up package-related -# information so that packages will be loaded automatically -# in response to "package require" commands. When this -# script is sourced, the variable $dir must contain the -# full path name of this file's directory. - package ifneeded nx::serializer 2.0 [list source [file join $dir serializer.tcl]] Index: library/xotcl/library/comm/Access.xotcl =================================================================== diff -u -r073177c8b1304443107efeeb0c334e9477346778 -rb34996b24ea334963e83aadda66384680a6f8ce5 --- library/xotcl/library/comm/Access.xotcl (.../Access.xotcl) (revision 073177c8b1304443107efeeb0c334e9477346778) +++ library/xotcl/library/comm/Access.xotcl (.../Access.xotcl) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -1,7 +1,7 @@ # -*- tcl -*- $ -set httpAccessVersion 2.0 -package provide xotcl::comm::httpAccess $httpAccessVersion +package provide xotcl::comm::httpAccess 2.0 +set httpAccessVersion [package present xotcl::comm::httpAccess] package require xotcl::comm::pcache package require xotcl::comm::mime Index: library/xotcl/library/comm/Httpd.xotcl =================================================================== diff -u -r073177c8b1304443107efeeb0c334e9477346778 -rb34996b24ea334963e83aadda66384680a6f8ce5 --- library/xotcl/library/comm/Httpd.xotcl (.../Httpd.xotcl) (revision 073177c8b1304443107efeeb0c334e9477346778) +++ library/xotcl/library/comm/Httpd.xotcl (.../Httpd.xotcl) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -5,8 +5,8 @@ # # Gustaf Neumann (neumann@wu-wien.ac.at) -set VERSION 2.0 -package provide xotcl::comm::httpd $VERSION +package provide xotcl::comm::httpd 2.0 +set VERSION [package present xotcl::comm::httpd] package require XOTcl 2.0 Index: library/xotcl/library/comm/pkgIndex.tcl =================================================================== diff -u -r073177c8b1304443107efeeb0c334e9477346778 -rb34996b24ea334963e83aadda66384680a6f8ce5 --- library/xotcl/library/comm/pkgIndex.tcl (.../pkgIndex.tcl) (revision 073177c8b1304443107efeeb0c334e9477346778) +++ library/xotcl/library/comm/pkgIndex.tcl (.../pkgIndex.tcl) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -1,13 +1,3 @@ -# Tcl package index file, version 1.1 -# This file is generated by the "pkg_mkIndex -direct -load nsf -load nx" command -# and sourced either when an application starts up or -# by a "package unknown" script. It invokes the -# "package ifneeded" command to set up package-related -# information so that packages will be loaded automatically -# in response to "package require" commands. When this -# script is sourced, the variable $dir must contain the -# full path name of this file's directory. - package ifneeded xotcl::comm::connection 2.0 [list source [file join $dir Connection.xotcl]] package ifneeded xotcl::comm::dav 2.0 [list source [file join $dir Dav.xotcl]] package ifneeded xotcl::comm::ftp 2.0 [list source [file join $dir Ftp.xotcl]] Index: library/xotcl/library/pkgIndex.tcl =================================================================== diff -u -reb758924a74f48512c98a40a539ab0c4e5a35de9 -rb34996b24ea334963e83aadda66384680a6f8ce5 --- library/xotcl/library/pkgIndex.tcl (.../pkgIndex.tcl) (revision eb758924a74f48512c98a40a539ab0c4e5a35de9) +++ library/xotcl/library/pkgIndex.tcl (.../pkgIndex.tcl) (revision b34996b24ea334963e83aadda66384680a6f8ce5) @@ -1,11 +1 @@ -# Tcl package index file, version 1.1 -# This file is generated by the "pkg_mkIndex -direct -load nsf -load nx" command -# and sourced either when an application starts up or -# by a "package unknown" script. It invokes the -# "package ifneeded" command to set up package-related -# information so that packages will be loaded automatically -# in response to "package require" commands. When this -# script is sourced, the variable $dir must contain the -# full path name of this file's directory. - package ifneeded XOTcl 2.0b6 [list source [file join $dir xotcl2.tcl]]