pkg_mkIndex(3tcl) Tcl Built-In Commands pkg_mkIndex(3tcl) ______________________________________________________________________________ NAME pkg_mkIndex - SYNOPSIS pkg_mkIndex ?-direct? ?-lazy? ?-load pkgPat? ?-verbose? dir ?pattern pattern ...?| ______________________________________________________________________________ DESCRIPTION Pkg_mkIndex Tcl package require pkg_mkIndex: [1] Tcl load test.so load test.so package provide Tcl_PkgProvide [2] pkg_mkIndex dir pattern dir *.tcl *.[info sharedlibextension] | Pkg_mkIndex dir pkgIndex.tcl pattern ( package provide Tcl_PkgProvide ) -load pkg_mkIndex COMPLEX CASES [3] tcl_pkgPath $tcl_pkgPath ()( Tcl )/ pkgIndex.tcl $tcl_pkgPath package require auto_path auto_path (immediate)Auto_path $tcl_pkgPath auto_path auto_path TCLLIBPATH : Tcl auto_path [4] package require Test 2.12.3 3.1 pkg_mkIndex package require Test 3.1 package require -exact Test 2.1 2.1 auto_path package require OPTIONS : -direct The generated index will implement direct loading of the package upon package require. This is the default. -lazy package require -load pkgPat pkgPat COMPLEX CASES -verbose tclLog stderr -- dir PACKAGES AND THE AUTO-LOADER (on- demand)pkg_mkIndex auto_mkindex : package require auto_mkindex pkg_mkIndex auto_mkindex pkg_mkIndex package require auto_mkindex HOW IT WORKS Pkg_mkIndex package unknown package ifneeded package require package unknown Tcl auto_path pkgIndex.tcl pkgIndex.tcl package ifneeded package provide pkgIndex.tcl -lazy | package require DIRECT LOADING | | package require | | -lazy (override) COMPLEX CASES pkg_mkIndex package require (stubbed out)(stub) unknown C- API Tcl_PkgRequire API BLT Tk Blt_Init Tcl_PkgRequire Tk pkg_mkIndex -load pkgPatpkg_mkIndex info loaded pkgPat Tcl_PkgRequire -load -load -load SEE ALSO package(n) KEYWORDS auto-load, index, package, version [] [] 2001/09/01 Linux man : http://cmpp.linuxforum.net man man https://github.com/man-pages-zh/manpages- zh Tcl 8.3 pkg_mkIndex(3tcl)