logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

practcl - The Practcl Module

Bugs, Ideas, Feedback

       This document, and the package it describes, will undoubtedly contain bugs and  other  problems.   Please
       report  such  in  the  category  practcl  of  the TcllibTrackers [http://core.tcl.tk/tcllib/reportlist].
       Please also report any ideas for enhancements you may have for either package and/or documentation.

       When proposing code changes, please provide unifieddiffs, i.e the output of diff-u.

       Note further that attachments are strongly preferred over inlined patches. Attachments  can  be  made  by
       going  to the Edit form of the ticket immediately after its creation, and then using the left-most button
       in the secondary navigation bar.

Category

       TclOO

Classes

CLASSPRACTCL::DOCTOOL
              { set authors {
                 {John Doe} {jdoe@illustrious.edu}
                 {Tom RichardHarry} {tomdickharry@illustrius.edu}
               }
               # Create the object
               ::practcl::doctool create AutoDoc
               set fout [open [file join $moddir module.tcl] w]
               foreach file [glob [file join $srcdir *.tcl]] {
                 set content [::practcl::cat [file join $srcdir $file]]
                  # Scan the file
                  AutoDoc scan_text $content
                  # Strip the comments from the distribution
                  puts $fout [::practcl::docstrip $content]
               }
               # Write out the manual page
               set manout [open [file join $moddir module.man] w]
               dict set args header [string map $modmap [::practcl::cat [file join $srcdir manual.txt]]]
               dict set args footer [string map $modmap [::practcl::cat [file join $srcdir footer.txt]]]
               dict set args authors $authors
               puts $manout [AutoDoc manpage {*}$args]
               close $manout

              }

       Tool for build scripts to dynamically generate manual files from comments in source code files

       Methods

       method constructor

       method argspecargspec
              Process an argument list into an informational dict.  This method also understands  non-positional
              arguments      expressed      in     the     notation     of     Tip     471     https://core.tcl-lang.org/tips/doc/trunk/tip/479.md.

              The output will be a dictionary of all of the  fields  and  whether  the  fields  are  positional,
              mandatory, and whether they have a default value.

              Example:

                 my argspec {a b {c 10}}

                 > a {positional 1 mandatory 1} b {positional 1 mandatory 1} c {positional 1 mandatory 0 default 10}

       method commentblock
              Convert  a block of comments into an informational dictionary.  If lines in the comment start with
              a single word ending in a colon, all subsequent lines are appended to a dictionary field  of  that
              name.  If no fields are given, all of the text is appended to the description field.

              Example:

               my comment {Does something cool}
               > description {Does something cool}

               my comment {
               title : Something really cool
               author : Sean Woods
               author : John Doe
               description :
               This does something really cool!
               }
               > description {This does something really cool!}
                 title {Something really cool}
                 author {Sean Woods
                 John Doe}

       method keyword.Annotationresultvarcommentblocktypenamebody

       method keyword.Classresultvarcommentblocknamebody
              Process an oo::objdefine call that modifies the class object itself

       method keyword.classresultvarcommentblocknamebody
              Process an oo::define, clay::define, etc statement.

       method keyword.Class_Methodresultvarcommentblockname ?args?
              Process a statement for a clay style class method

       method keyword.methodresultvarcommentblockname ?args?
              Process a statement for a tcloo style object method

       method keyword.proccommentblocknameargspec
              Process a proc statement

       method reset
              Reset the state of the object and its embedded coroutine

       method Main
              Main body of the embedded coroutine for the object

       method section.methodkeywordmethodminfo
              Generate the manual page text for a method or proc

       method section.annotationtypenameiinfo

       method section.classclass_nameclass_info
              Generate the manual page text for a class

       method section.commandprocinfo
              Generate the manual page text for the commands section

       method manpage ?headervalue? ?footervalue? ?authorslist?
              Generate the manual page. Returns the completed text suitable for saving in .man file.  The header
              argument  is  a  block of doctools text to go in before the machine generated section. footer is a
              block of doctools text to go in after  the  machine  generated  section.  authors  is  a  list  of
              individual authors and emails in the form of AUTHOR EMAIL ?AUTHOR EMAIL?...

       method scan_texttext
              Scan a block of text

       method scan_filefilename
              Scan a file of text

   CLASSPRACTCL::METACLASS
       The metaclass for all practcl objects

       Methods

       method _MorphPatterns

       method definesubmethod ?args?

       method graft ?args?

       method initialize

       method linkcommand ?args?

       method morphclassname

       method scriptscript

       method select

       method sourcefilenameCLASSPRACTCL::TOOLSET
       Ancestor-less  class  intended  to  be a mixin which defines a family of build related behaviors that are
       modified when targetting either gcc or msvc

       ClassMethods

       classmethod selectobject
              Perform the selection for the toolset mixin

       Methods

       method config.sh
              find or fake a key/value list describing this project

       method BuildDirPWD
              Compute the location where the product will be built

       method MakeDirsrcdir
              Return where the Makefile is located relative to srcdir.  For this implementation the  MakeDir  is
              always srcdir.

       method read_configuration
              Read  information  about  the  build  process  for this package.  For this implementation, data is
              sought in the following locations in the  following  order:  config.tcl  (generated  by  practcl.)
              PKGConfig.sh. The Makefile

              If the Makefile needs to be consulted, but does not exist, the Configure method is invoked

       method build-cflagsPROJECTDEFSnamevarversionvardefsvar
              method  DEFS  This  method  populates  4  variables:  name - The name of the package version - The
              version of the package defs - C flags passed to the compiler includedir - A list of paths to  feed
              to the compiler for finding headers

       method critcl ?args?
              Invoke critcl in an external process

   CLASSPRACTCL::TOOLSET.GCCancestors: practcl::toolsetMethods

       method Autoconf

       method BuildDirPWD

       method ConfigureOpts

       method MakeDirsrcdir
              Detect what directory contains the Makefile template

       method make{}autodetect

       method make{}clean

       method make{}compile

       method make{}installDEST

       method build-compile-sourcesPROJECTCOMPILECPPCOMPILEINCLUDES

       method build-MakefilepathPROJECT

       method build-libraryoutfilePROJECT
              Produce a static or dynamic library

       method build-tclshoutfilePROJECT ?pathauto?
              Produce a static executable

   CLASSPRACTCL::TOOLSET.MSVCancestors: practcl::toolsetMethods

       method BuildDirPWD
              MSVC always builds in the source directory

       method make{}autodetect
              Do nothing

       method make{}clean

       method make{}compile

       method make{}installDEST

       method MakeDirsrcdir
              Detect what directory contains the Makefile template

       method NmakeOptsCLASSPRACTCL::MAKE_OBJancestors: practcl::metaclass

       A  build  deliverable  object.  Normally  an object file, header, or tcl script which must be compiled or
       generated in some way

       Methods

       method constructormodule_objectnameinfo ?action_body ?

       method do

       method check

       method output

       method reset

       method triggersCLASSPRACTCL::OBJECTancestors: practcl::metaclass

       A generic Practcl object

       Methods

       method constructorparent ?args?

       method childmethod

       method goCLASSPRACTCL::DYNAMIC
       Dynamic blocks do not generate their own .c files, instead the contribute to the amalgamation of the main
       library file

       Methods

       method cstructurenamedefinition ?argdat ?
              Parser functions

       method includeheader

       method include_dir ?args?

       method include_directory ?args?

       method c_headerbody

       method c_codebody

       method c_functionheaderbody ?info ?

       method c_tcloomethodnamebody ?arginfo ?

       method cmethodnamebody ?arginfo ?
              Alias to classic name

       method c_tclproc_nspacenspace

       method c_tclcmdnamebody ?arginfo ?

       method c_tclproc_rawnamebody ?arginfo ?
              Alias to classic name

       method tcltypenameargdat

       method project-compile-products
              Module interactions

       method implementpath

       method initialize
              Practcl internals

       method linktype

       method generate-cfile-constant

       method generate-cfile-header

       method generate-cfile-tclapi
              Generate code that provides implements Tcl API calls

       method generate-loader-module
              Generate code that runs when the package/module is initialized into the interpreter

       method Collate_SourceCWD

       method select
              Once an object marks itself as some flavor of dynamic, stop trying to morph it into something else

   CLASSPRACTCL::PRODUCT
       A deliverable for the build system

       ClassMethods

       classmethod selectobjectMethods

       method codesectionbody

       method Collate_SourceCWD

       method project-compile-products

       method generate-debug ?spaces ?

       method generate-cfile-constant

       method generate-cfile-public-structure
              Populate const static data structures

       method generate-cfile-header

       method generate-cfile-global

       method generate-cfile-private-typedef

       method generate-cfile-private-structure

       method generate-cfile-functions
              Generate code that provides subroutines called by Tcl API methods

       method generate-cfile-tclapi
              Generate code that provides implements Tcl API calls

       method generate-hfile-public-define

       method generate-hfile-public-macro

       method generate-hfile-public-typedef

       method generate-hfile-public-structure

       method generate-hfile-public-headers

       method generate-hfile-public-function

       method generate-hfile-public-includes

       method generate-hfile-public-verbatim

       method generate-loader-external

       method generate-loader-module

       method generate-stub-function

       method IncludeAddheadervar ?args?

       method generate-tcl-loader

       method generate-tcl-pre
              This methods generates any Tcl script file which is required to pre-initialize the C library

       method generate-tcl-post

       method linktype

       method Ofilefilename

       method project-static-packages
              Methods called by the master project

       method toolset-include-directory
              Methods called by the toolset

       method targetmethod ?args?

   CLASSPRACTCL::PRODUCT.CHEADERancestors: practcl::product

       A product which generated from a C header file. Which is to say, nothing.

       Methods

       method project-compile-products

       method generate-loader-moduleCLASSPRACTCL::PRODUCT.CSOURCEancestors: practcl::product

       A product which generated from a C source file. Normally an object (.o) file.

       Methods

       method project-compile-productsCLASSPRACTCL::PRODUCT.CLIBRARYancestors: practcl::product

       A product which is generated from a compiled C library.  Usually a .a or a .dylib file,  but  in  complex
       cases may actually just be a conduit for one project to integrate the source code of another

       Methods

       method linker-productsconfigdictCLASSPRACTCL::PRODUCT.DYNAMICancestors: practcl::dynamicpractcl::product

       A  product which is generated from C code that itself is generated by practcl or some other means. This C
       file may or may not produce its own .o file, depending on whether it is eligible to  become  part  of  an
       amalgamation

       Methods

       method initializeCLASSPRACTCL::PRODUCT.CRITCLancestors: practcl::dynamicpractcl::product

       A  binary  product  produced  by  critcl.  Note:  The  implementation is not written yet, this class does
       nothing.

   CLASSPRACTCL::MODULEancestors: practcl::objectpractcl::product.dynamic

       In the end, all C code must be loaded into a module This will either  be  a  dynamically  loaded  library
       implementing a tcl extension, or a compiled in segment of a custom shell/app

       Variable

       variable make_objectMethods

       method _MorphPatterns

       method add ?args?

       method install-headers ?args?

       method make{}_preamble

       method make{}pkginfo

       method make{}objects
              Return a dictionary of all handles and associated objects

       method make{}objectname
              Return the object associated with handle name

       method make{}reset
              Reset all deputy objects

       method make{}trigger ?args?
              Exercise the triggers method for all handles listed

       method make{}depends ?args?
              Exercise the check method for all handles listed

       method make{}filenamename
              Return the file name of the build product for the listed handle

       method make{}targetnameInfobody

       method make{}todo
              Return a list of handles for object which return true for the do method

       method make{}do
              For  each  target  exercise the action specified in the action definition if the do method returns
              true

       method childwhich

       method generate-c
              This methods generates the contents of an amalgamated .c file which implements the  loader  for  a
              batch of tools

       method generate-h
              This  methods  generates  the contents of an amalgamated .h file which describes the public API of
              this module

       method generate-loader

       method initialize

       method implementpath

       method linktypeCLASSPRACTCL::PROJECTancestors: practcl::module

       A toplevel project that is a collection of other projects

       Methods

       method _MorphPatterns

       method constructor ?args?

       method add_objectobject

       method add_projectpkginfo ?oodefine ?

       method add_toolpkginfo ?oodefine ?

       method build-tclcore
              Compile the Tcl core. If the define tk is true, compile the Tk core as well

       method childwhich

       method linktype

       method projectpkg ?args?
              Exercise the methods of a sub-object

       method tclcore

       method tkcore

       method toolpkg ?args?

   CLASSPRACTCL::LIBRARYancestors: practcl::project

       A toplevel project that produces a library

       Methods

       method cleanPATH

       method project-compile-products

       method go

       method generate-declspkgnamepath

       method implementpath

       method generate-makepath
              Backward compadible call

       method linktype

       method package-ifneeded ?args?
              Create a "package ifneeded" Args are a list of aliases for which this package will answer to

       method shared_library ?filename ?

       method static_library ?filename ?

   CLASSPRACTCL::TCLKITancestors: practcl::library

       A toplevel project that produces a self-contained executable

       Methods

       method build-tclkit_mainPROJECTPKG_OBJS

       method Collate_SourceCWD

       method wrapPWDexenamevfspath ?args?
              Wrap an executable

   CLASSPRACTCL::DISTRIBUTION
       Standalone class to manage code distribution This class is intended to be mixed into another class  (Thus
       the lack of ancestors)

       ClassMethods

       classmethod Sandboxobject

       classmethod selectobject

       classmethod claim_option

       classmethod claim_objectobject

       classmethod claim_pathpathMethods

       method scm_info

       method DistroMixIn

       method Sandbox

       method SrcDir

       method ScmTag

       method ScmClone

       method ScmUnpack

       method ScmUpdate

       method UnpackCLASSPRACTCL::DISTRIBUTION.SNAPSHOTancestors: practcl::distribution

       A file distribution from zip, tarball, or other non-scm archive format

       ClassMethods

       classmethod claim_objectobject

       classmethod claim_option

       classmethod claim_pathpathMethods

       method ScmUnpackCLASSPRACTCL::DISTRIBUTION.FOSSILancestors: practcl::distribution

       A file distribution based on fossil

       ClassMethods

       classmethod claim_objectobj
              Check for markers in the metadata

       classmethod claim_option

       classmethod claim_pathpath
              Check for markers in the source root

       Methods

       method scm_info

       method ScmClone
              Clone the source

       method ScmTag

       method ScmUnpack

       method ScmUpdateCLASSPRACTCL::DISTRIBUTION.GITancestors: practcl::distribution

       A file distribution based on git

       ClassMethods

       classmethod claim_objectobj

       classmethod claim_option

       classmethod claim_pathpathMethods

       method ScmTag

       method ScmUnpack

       method ScmUpdateCLASSPRACTCL::SUBPROJECTancestors: practcl::module

       A subordinate project

       Methods

       method _MorphPatterns

       method BuildDirPWD

       method childwhich

       method compile

       method go

       method install ?args?
              Install project into the local build system

       method linktype

       method linker-productsconfigdict

       method linker-externalconfigdict

       method linker-extraconfigdict

       method env-bootstrap
              Methods  for  packages/tools  that  can  be  downloaded possibly built and used internally by this
              Practcl process Load the facility into the interpreter

       method env-exec
              Return a file path that exec can call

       method env-install
              Install the tool into the local environment

       method env-load
              Do whatever is necessary to get the tool into the local environment

       method env-present
              Check if tool is available for load/already loaded

       method sources

       method update

       method unpackCLASSPRACTCL::SUBPROJECT.SOURCEancestors: practcl::subprojectpractcl::library

       A project which the kit compiles and integrates the source for itself

       Methods

       method env-bootstrap

       method env-present

       method linktypeCLASSPRACTCL::SUBPROJECT.TEAPOTancestors: practcl::subproject

       a copy from the teapot

       Methods

       method env-bootstrap

       method env-install

       method env-present

       method installDESTCLASSPRACTCL::SUBPROJECT.KETTLEancestors: practcl::subprojectMethods

       method kettlepath ?args?

       method installDESTCLASSPRACTCL::SUBPROJECT.CRITCLancestors: practcl::subprojectMethods

       method installDESTCLASSPRACTCL::SUBPROJECT.SAKancestors: practcl::subprojectMethods

       method env-bootstrap

       method env-install

       method env-present

       method installDEST

       method install-moduleDEST ?args?

   CLASSPRACTCL::SUBPROJECT.PRACTCLancestors: practcl::subprojectMethods

       method env-bootstrap

       method env-install

       method installDEST

       method install-moduleDEST ?args?

   CLASSPRACTCL::SUBPROJECT.BINARYancestors: practcl::subproject

       A subordinate binary package

       Methods

       method clean

       method env-install

       method project-compile-products

       method ComputeInstall

       method go

       method linker-productsconfigdict

       method project-static-packages

       method BuildDirPWD

       method compile

       method Configure

       method installDESTCLASSPRACTCL::SUBPROJECT.TEAancestors: practcl::subproject.binary

       A subordinate TEA based binary package

   CLASSPRACTCL::SUBPROJECT.LIBRARYancestors: practcl::subproject.binarypractcl::library

       A subordinate C library built by this project

       Methods

       method installDESTCLASSPRACTCL::SUBPROJECT.EXTERNALancestors: practcl::subproject.binary

       A subordinate external C library

       Methods

       method installDESTCLASSPRACTCL::SUBPROJECT.COREancestors: practcl::subproject.binaryMethods

       method env-bootstrap

       method env-present

       method env-install

       method go

       method linktype

Commands

       proc practcl::catfname
              Concatenate a file

       proc practcl::docstriptext
              Strip  the  global  comments from tcl code. Used to prevent the documentation markup comments from
              clogging up files intended for distribution in machine readable format.

       proc putb ?map? text
              Append a line of text to a variable. Optionally apply a string mapping.

       proc Procnamearglistbody
              Generate a proc if no command already exists by that name

       proc noop ?args?
              A command to do nothing. A handy way of negating an  instruction  without  having  to  comment  it
              completely out.  It's also a handy attachment point for an object to be named later

       proc practcl::debug ?args?

       proc practcl::doexec ?args?
              Drop in a static copy of Tcl

       proc practcl::doexec_inpath ?args?

       proc practcl::dotclexec ?args?

       proc practcl::domakepath ?args?

       proc practcl::domake.tclpath ?args?

       proc practcl::fossilpath ?args?

       proc practcl::fossil_statusdir

       proc practcl::os

       proc practcl::mkzipexenamebarekitvfspath
              Build  a  zipfile. On tcl8.6 this invokes the native Zip implementation on older interpreters this
              invokes zip via exec

       proc practcl::sort_dictlist
              Dictionary sort a key/value list. Needed because pre tcl8.6 does not have lsort-stride2

       proc practcl::local_os
              Returns a dictionary describing the local operating system.  Fields return include:

              •      download - Filesystem path where fossil repositories and source tarballs are downloaded for
                     the current user

              •      EXEEXT - The extension to give to executables. (i.e. .exe on windows)

              •      fossil_mirror - A URI for a local network web server who acts as a fossil repository mirror

              •      local_install - Filesystem path where packages for local consumption by  the  current  user
                     are installed

              •      prefix  -  The  prefix  as  given  to the Tcl core/TEA for installation to local_install in
                     ./configure

              •      sandbox - The file location where this project unpacks external projects

              •      TEACUP_PROFILE - The ActiveState/Teacup canonical name for this platform  (i.e.  win32-ix86
                     macosx10.5-i386-x86_84)

              •      TEACUP_OS  -  The  local  operating  system (windows, macosx, openbsd, etc). Gives the same
                     answer as tcl.m4, except that macosx is given as macosx instead of Darwin.

              •      TEA_PLATFORM - The platform returned by uname  -s-uname  -r  (on  Unix),  or  "windows"  on
                     Windows

              •      TEACUP_ARCH - The processor architecture for the local os (i.e. ix86, x86_64)

              •      TEACUP_ARCH - The processor architecture for the local os (i.e. ix86, x86_64)

              •      teapot - Filesystem path where teapot package files are downloaded for the current user

              •      userhome  -  File  path  to  store localized preferences, cache download files, etc for the
                     current user

              This command uses a combination of local checks with Exec, any tclConfig.sh file that is resident,
              autoconf data where already computed, and data gleaned from a file named practcl.rc  in  userhome.
              The location for userhome varies by platform and operating system:

              •      Windows: ::env(LOCALAPPDATA)/Tcl

              •      Macos: ~/Library/Application Support/Tcl

              •      Other: ~/tcl

       proc practcl::config.tclpath
              A  transparent call to ::practcl::read_configuration to preserve backward compadibility with older
              copies of Practcl

       proc practcl::read_configurationpath
              Detect local platform. This command looks for data gleaned by autoconf or autosetup  in  the  path
              specified,  or  perform  its  own  logic  tests if neither has been run.  A file named config.site
              present in the location indicates that this project is cross compiling, and  the  data  stored  in
              that file is used for the compiler and linker.

              This command looks for information from the following files, in the following order:

              •      config.tcl  - A file generated by autoconf/configure in newer editions of TEA, encoded as a
                     Tcl script.

              •      config.site - A file containing cross compiler information, encoded as a SH script

              •      ::env(VisualStudioVersion) - On Windows, and environmental value that indicates  MS  Visual
                     Studio is installed

       This  command  returns  a  dictionary  containing all of the data cleaned from the sources above.  In the
       absence of any guidance this command returns the same output as ::practcl::local_os.  In  this  mode,  if
       the  environmental  variable  VisualStudioVersion  exists, this command will provide a template of fields
       that are appropriate for compiling on Windows under Microsoft Visual Studio.  The  USEMSVC  flag  in  the
       dictionary is a boolean flag to indicate if this is indeed the case.

       proc practcl::tcllib_requirepkg ?args?
              Try to load  a package, and failing that retrieve tcllib

       proc practcl::platform::tcl_core_optionsos
              Return the string to pass to ./configure to compile the Tcl core for the given OS.

              •      windows: --with-tzdata --with-encoding utf-8

              •      macosx:  --enable-corefoundation=yes   --enable-framework=no  --with-tzdata --with-encoding
                     utf-8

              •      other: --with-tzdata --with-encoding utf-8

       proc practcl::platform::tk_core_optionsos

       proc practcl::read_rc_filefilename ?localdat ?
              Read a stylized key/value list stored in a file

       proc practcl::read_sh_substlineinfo
              Converts a XXX.sh file into a series of Tcl variables

       proc practcl::read_sh_filefilename ?localdat ?

       proc practcl::read_Config.shfilename
              A simpler form of read_sh_file tailored to pulling data from (tcl|tk)Config.sh

       proc practcl::read_Makefilefilename
              A simpler form of read_sh_file tailored to pulling data from a Makefile

       proc practcl::cputsvarname ?args?
              Append arguments to a buffer The command works like puts in that each call will also insert a line
              feed. Unlike puts, blank links in the interstitial are suppressed

       proc practcl::tcl_to_cbody

       proc practcl::_tagblocktext ?styletcl? ?note ?

       proc practcl::de_shelldata

       proc practcl::greppattern ?files ?
              Search for the pattern pattern amongst $files

       proc practcl::file_lexnormalizesp

       proc practcl::file_relativebasedst
              Calculate a relative path between base and dst

              Example:

                ::practcl::file_relative ~/build/tcl/unix~/build/tcl/library
                > ../library

       proc practcl::findByPatternbasedirpatterns

       proc practcl::logfnamecomment
              Record an event in the practcl log

       proc practcl::_pkgindex_simpleIndexpath

       proc practcl::_pkgindex_directorypath
              Return true if the pkgindex file contains any statement other than "package  ifneeded"  and/or  if
              any package ifneeded loads a DLL

       proc practcl::_pkgindex_path_subdirpath
              Helper function for ::practcl::pkgindex_path

       proc practcl::pkgindex_path ?args?
              Index all paths given as though they will end up in the same virtual file system

       proc practcl::installDird1d2
              Delete the contents of d2, and then recusively Ccopy the contents of d1 to d2.

       proc practcl::copyDird1d2 ?toplevel1?
              Recursively copy the contents of d1 to d2

       proc practcl::buildModulemodpath

       proc practcl::installModulemodpathDEST
              Install  a  module  from  MODPATH  to  the  directory specified.  dpath is assumed to be the fully
              qualified path where module is to be placed.  Any existing files will be deleted at that path.  If
              the path is symlink the process will return with no error  and  no  action.   If  the  module  has
              contents  in  the  build/  directory  that  are  newer  than  the  .tcl files in the module source
              directory, and a build/build.tcl file exists, the build/build.tcl file  is  run.   If  the  source
              directory  includes  a  file  named  index.tcl, the directory is assumed to be in the tao style of
              modules, and the entire directory (and all subdirectories) are copied verbatim.  If  no  index.tcl
              file  is  present,  all .tcl files are copied from the module source directory, and a pkgIndex.tcl
              file is generated if non yet exists.  I a folder named htdocs exists in the source directory, that
              directory is copied verbatim to the destination.

       proc practcl::trigger ?args?
              Trigger build targets, and recompute dependencies

              Internals:

                ::practcl::LOCAL make trigger {*}$args
                foreach {name obj} [::practcl::LOCAL make objects] {
                  set ::make($name) [$obj do]
                }

       proc practcl::depends ?args?
              Calculate if a dependency for any of the arguments needs to be fulfilled or rebuilt.

              Internals:

                ::practcl::LOCAL make depends {*}$args

       proc practcl::targetnameinfo ?action ?
              Declare a build product. This proc is just a shorthand for ::practcl::LOCALmaketask$name$info$action

              Registering  a  build  product  with  this  command will create an entry in the global  array, and
              populate a value in the global  array.

              Internals:

                set obj [::practcl::LOCAL make task $name $info $action]
                set ::make($name) 0
                set filename [$obj define get filename]
                if {$filename ne {}} {
                  set ::target($name) $filename
                }

Description

       The  Practcl  module  is a tool for integrating large modules for C API Tcl code that requires custom Tcl
       types and TclOO objects.

       The concept with Practcl is that is a single file package that can assist  any  tcl  based  project  with
       distribution,  compilation, linking, VFS preparation, executable assembly, and installation. Practcl also
       allows one project to invoke the build system from another project, allowing complex projects such  as  a
       statically linked basekit to be assembled with relative ease.

       Practcl ships as a single file, and aside from a Tcl 8.6 interpreter, has no external dependencies.

       Making a practcl project

Keywords

       practcl

Name

       practcl - The Practcl Module

Synopsis

       package require TclOO1.0

       proc practcl::catfname

       proc practcl::docstriptext

       proc putb ?map? text

       proc Procnamearglistbody

       proc noop ?args?

       proc practcl::debug ?args?

       proc practcl::doexec ?args?

       proc practcl::doexec_inpath ?args?

       proc practcl::dotclexec ?args?

       proc practcl::domakepath ?args?

       proc practcl::domake.tclpath ?args?

       proc practcl::fossilpath ?args?

       proc practcl::fossil_statusdir

       proc practcl::os

       proc practcl::mkzipexenamebarekitvfspath

       proc practcl::sort_dictlist

       proc practcl::local_os

       proc practcl::config.tclpath

       proc practcl::read_configurationpath

       proc practcl::tcllib_requirepkg ?args?

       proc practcl::platform::tcl_core_optionsos

       proc practcl::platform::tk_core_optionsos

       proc practcl::read_rc_filefilename ?localdat ?

       proc practcl::read_sh_substlineinfo

       proc practcl::read_sh_filefilename ?localdat ?

       proc practcl::read_Config.shfilename

       proc practcl::read_Makefilefilename

       proc practcl::cputsvarname ?args?

       proc practcl::tcl_to_cbody

       proc practcl::_tagblocktext ?styletcl? ?note ?

       proc practcl::de_shelldata

       proc practcl::greppattern ?files ?

       proc practcl::file_lexnormalizesp

       proc practcl::file_relativebasedst

       proc practcl::findByPatternbasedirpatterns

       proc practcl::logfnamecomment

       proc practcl::_pkgindex_simpleIndexpath

       proc practcl::_pkgindex_directorypath

       proc practcl::_pkgindex_path_subdirpath

       proc practcl::pkgindex_path ?args?

       proc practcl::installDird1d2

       proc practcl::copyDird1d2 ?toplevel1?

       proc practcl::buildModulemodpath

       proc practcl::installModulemodpathDEST

       proc practcl::trigger ?args?

       proc practcl::depends ?args?

       proc practcl::targetnameinfo ?action ?

       method constructor

       method argspecargspec

       method commentblock

       method keyword.Annotationresultvarcommentblocktypenamebody

       method keyword.Classresultvarcommentblocknamebody

       method keyword.classresultvarcommentblocknamebody

       method keyword.Class_Methodresultvarcommentblockname ?args?

       method keyword.methodresultvarcommentblockname ?args?

       method keyword.proccommentblocknameargspec

       method reset

       method Main

       method section.methodkeywordmethodminfo

       method section.annotationtypenameiinfo

       method section.classclass_nameclass_info

       method section.commandprocinfo

       method manpage ?headervalue? ?footervalue? ?authorslist?

       method scan_texttext

       method scan_filefilename

       method _MorphPatterns

       method definesubmethod ?args?

       method graft ?args?

       method initialize

       method linkcommand ?args?

       method morphclassname

       method scriptscript

       method select

       method sourcefilename

       classmethod selectobject

       method config.sh

       method BuildDirPWD

       method MakeDirsrcdir

       method read_configuration

       method build-cflagsPROJECTDEFSnamevarversionvardefsvar

       method critcl ?args?

       method Autoconf

       method BuildDirPWD

       method ConfigureOpts

       method MakeDirsrcdir

       method make{}autodetect

       method make{}clean

       method make{}compile

       method make{}installDEST

       method build-compile-sourcesPROJECTCOMPILECPPCOMPILEINCLUDES

       method build-MakefilepathPROJECT

       method build-libraryoutfilePROJECT

       method build-tclshoutfilePROJECT ?pathauto?

       method BuildDirPWD

       method make{}autodetect

       method make{}clean

       method make{}compile

       method make{}installDEST

       method MakeDirsrcdir

       method NmakeOpts

       method constructormodule_objectnameinfo ?action_body ?

       method do

       method check

       method output

       method reset

       method triggers

       method constructorparent ?args?

       method childmethod

       method go

       method cstructurenamedefinition ?argdat ?

       method includeheader

       method include_dir ?args?

       method include_directory ?args?

       method c_headerbody

       method c_codebody

       method c_functionheaderbody ?info ?

       method c_tcloomethodnamebody ?arginfo ?

       method cmethodnamebody ?arginfo ?

       method c_tclproc_nspacenspace

       method c_tclcmdnamebody ?arginfo ?

       method c_tclproc_rawnamebody ?arginfo ?

       method tcltypenameargdat

       method project-compile-products

       method implementpath

       method initialize

       method linktype

       method generate-cfile-constant

       method generate-cfile-header

       method generate-cfile-tclapi

       method generate-loader-module

       method Collate_SourceCWD

       method select

       classmethod selectobject

       method codesectionbody

       method Collate_SourceCWD

       method project-compile-products

       method generate-debug ?spaces ?

       method generate-cfile-constant

       method generate-cfile-public-structure

       method generate-cfile-header

       method generate-cfile-global

       method generate-cfile-private-typedef

       method generate-cfile-private-structure

       method generate-cfile-functions

       method generate-cfile-tclapi

       method generate-hfile-public-define

       method generate-hfile-public-macro

       method generate-hfile-public-typedef

       method generate-hfile-public-structure

       method generate-hfile-public-headers

       method generate-hfile-public-function

       method generate-hfile-public-includes

       method generate-hfile-public-verbatim

       method generate-loader-external

       method generate-loader-module

       method generate-stub-function

       method IncludeAddheadervar ?args?

       method generate-tcl-loader

       method generate-tcl-pre

       method generate-tcl-post

       method linktype

       method Ofilefilename

       method project-static-packages

       method toolset-include-directory

       method targetmethod ?args?

       method project-compile-products

       method generate-loader-module

       method project-compile-products

       method linker-productsconfigdict

       method initialize

       variable make_object

       method _MorphPatterns

       method add ?args?

       method install-headers ?args?

       method make{}_preamble

       method make{}pkginfo

       method make{}objects

       method make{}objectname

       method make{}reset

       method make{}trigger ?args?

       method make{}depends ?args?

       method make{}filenamename

       method make{}targetnameInfobody

       method make{}todo

       method make{}do

       method childwhich

       method generate-c

       method generate-h

       method generate-loader

       method initialize

       method implementpath

       method linktype

       method _MorphPatterns

       method constructor ?args?

       method add_objectobject

       method add_projectpkginfo ?oodefine ?

       method add_toolpkginfo ?oodefine ?

       method build-tclcore

       method childwhich

       method linktype

       method projectpkg ?args?

       method tclcore

       method tkcore

       method toolpkg ?args?

       method cleanPATH

       method project-compile-products

       method go

       method generate-declspkgnamepath

       method implementpath

       method generate-makepath

       method linktype

       method package-ifneeded ?args?

       method shared_library ?filename ?

       method static_library ?filename ?

       method build-tclkit_mainPROJECTPKG_OBJS

       method Collate_SourceCWD

       method wrapPWDexenamevfspath ?args?

       classmethod Sandboxobject

       classmethod selectobject

       classmethod claim_option

       classmethod claim_objectobject

       classmethod claim_pathpath

       method scm_info

       method DistroMixIn

       method Sandbox

       method SrcDir

       method ScmTag

       method ScmClone

       method ScmUnpack

       method ScmUpdate

       method Unpack

       classmethod claim_objectobject

       classmethod claim_option

       classmethod claim_pathpath

       method ScmUnpack

       classmethod claim_objectobj

       classmethod claim_option

       classmethod claim_pathpath

       method scm_info

       method ScmClone

       method ScmTag

       method ScmUnpack

       method ScmUpdate

       classmethod claim_objectobj

       classmethod claim_option

       classmethod claim_pathpath

       method ScmTag

       method ScmUnpack

       method ScmUpdate

       method _MorphPatterns

       method BuildDirPWD

       method childwhich

       method compile

       method go

       method install ?args?

       method linktype

       method linker-productsconfigdict

       method linker-externalconfigdict

       method linker-extraconfigdict

       method env-bootstrap

       method env-exec

       method env-install

       method env-load

       method env-present

       method sources

       method update

       method unpack

       method env-bootstrap

       method env-present

       method linktype

       method env-bootstrap

       method env-install

       method env-present

       method installDEST

       method kettlepath ?args?

       method installDEST

       method installDEST

       method env-bootstrap

       method env-install

       method env-present

       method installDEST

       method install-moduleDEST ?args?

       method env-bootstrap

       method env-install

       method installDEST

       method install-moduleDEST ?args?

       method clean

       method env-install

       method project-compile-products

       method ComputeInstall

       method go

       method linker-productsconfigdict

       method project-static-packages

       method BuildDirPWD

       method compile

       method Configure

       method installDEST

       method installDEST

       method installDEST

       method env-bootstrap

       method env-present

       method env-install

       method go

       method linktype

________________________________________________________________________________________________________________

See Also