From d84809538f37f4b323a1f58fbdb7e613174e9c78 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Jun 2025 07:35:48 +0000 Subject: [ef7042075c]: tcl::build-info not documented --- doc/tclbuildinfo.n | 196 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 doc/tclbuildinfo.n diff --git a/doc/tclbuildinfo.n b/doc/tclbuildinfo.n new file mode 100644 index 0000000..f2243b0 --- /dev/null +++ b/doc/tclbuildinfo.n @@ -0,0 +1,196 @@ +'\" +'\" Copyright (c) 2025 Jan Nijtmans. +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +.TH build-info n 9.0 Tcl "Tcl Built-In Commands" +.so man.macros +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +tcl::build-info \- Build info +.SH SYNOPSIS +\fB::tcl::build-info\fR? +\fB::tcl::build-info clang\fR? +\fB::tcl::build-info commit\fR? +\fB::tcl::build-info compiledebug\fR? +\fB::tcl::build-info compiler\fR? +\fB::tcl::build-info compilestats\fR? +\fB::tcl::build-info cplusplus\fR? +\fB::tcl::build-info debug\fR? +\fB::tcl::build-info gcc\fR? +\fB::tcl::build-info icc\fR? +\fB::tcl::build-info ipl32\fR? +\fB::tcl::build-info memdebug\fR? +\fB::tcl::build-info msvc\fR? +\fB::tcl::build-info nmake\fR? +\fB::tcl::build-info no-deprecate\fR? +\fB::tcl::build-info no-thread\fR? +\fB::tcl::build-info no-optimize\fR? +\fB::tcl::build-info objective-c\fR? +\fB::tcl::build-info objective-cplusplus\fR? +\fB::tcl::build-info patchlevel\fR? +\fB::tcl::build-info profile\fR? +\fB::tcl::build-info purify\fR? +\fB::tcl::build-info static\fR? +\fB::tcl::build-info tommath\fR? +\fB::tcl::build-info version\fR? +\fB::tcl::build-info zlib\fR? +.BE +.SH DESCRIPTION +.PP +This command provides a way to retrieve information about how Tcl was built. +Without any options, the command returns the Tcl patchlevel, followed +by the '+'-sign, followed by the fossil commit-id followed by a list of +dot-separated tags. The \fIoptions\fR for official Tcl releases are: +.\" METHOD: clang +.TP +\fB::tcl::build-info clang\fR +. +Returns the clang version number (as 4 digits) if Tcl is compiled with clang, 0 otherwise. +.\" METHOD: commit +.TP +\fB::tcl::build-info commit\fR +. +Returns the fossil commit-id where Tcl was built from. +.\" METHOD: compiledebug +.TP +\fB::tcl::build-info compiledebug\fR +. +Returns 1 if Tcl is compiled with \fB\-DTCL_COMPILE_DEBUG\fR, 0 otherwise. +.\" METHOD: compiler +.TP +\fB::tcl::build-info compiler\fR +. +Returns the compiler name (either clang, gcc, icc or msvc), followed by a dash and a (4-digit) version number. +.\" METHOD: compilestats +.TP +\fB::tcl::build-info compilestats\fR +. +Returns 1 if Tcl is compiled with \fB\-DTCL_COMPILE_STATS\fR, 0 otherwise. +.\" METHOD: cplusplus +.TP +\fB::tcl::build-info cplusplus\fR +. +Returns 1 if Tcl is compiled with a C++ compiler, 0 otherwise. +.\" METHOD: debug +.TP +\fB::tcl::build-info debug\fR +. +Returns 1 if Tcl is not compiled with \fB\-DNDEBUG\fR, 0 otherwise. +.\" METHOD: gcc +.TP +\fB::tcl::build-info gcc\fR +. +Returns the gcc version number (as 4 digits) if Tcl is compiled with gcc, 0 otherwise. +.\" METHOD: icc +.TP +\fB::tcl::build-info icc\fR +. +Returns the icc version number (as 4 digits) if Tcl is compiled with icc, 0 otherwise. +.\" METHOD: ilp32 +.TP +\fB::tcl::build-info ilp32\fR +. +Returns 1 if Tcl is compiled such that integers, longs and pointers are all 32-bit, 0 otherwise. +.\" METHOD: memdebug +.TP +\fB::tcl::build-info memdebug\fR +. +Returns 1 if Tcl is compiled with \fB\-DTCL_MEM_DEBUG\fR, 0 otherwise. +.\" METHOD: msvc +.TP +\fB::tcl::build-info msvc\fR +. +Returns the msvc version number (as 4 digits) if Tcl is compiled with msvc, 0 otherwise. +.\" METHOD: nmake +.TP +\fB::tcl::build-info nmake\fR +. +Returns 1 if Tcl is built using nmake, 0 otherwise. +.\" METHOD: no-deprecate +.TP +\fB::tcl::build-info no-deprecate\fR +. +Returns 1 if Tcl is compiled with \fB\-DTCL_NO_DEPRECATED\fR, 0 otherwise. +.\" METHOD: no-thread +.TP +\fB::tcl::build-info no-thread\fR +. +Returns 1 if Tcl is compiled with \fB\-DTCL_THREADS=0\fR, 0 otherwise. +.\" METHOD: no-optimize +.TP +\fB::tcl::build-info no-optimize\fR +. +Returns 1 if Tcl is not compiled with \fB\-DTCL_CFG_OPTIMIZED\fR, 0 otherwise. +.\" METHOD: objective-c +.TP +\fB::tcl::build-info objective-c\fR +. +Returns 1 if Tcl is compiled with an objective-c compiler, 0 otherwise. +.\" METHOD: objective-cplusplus +.TP +\fB::tcl::build-info objective-cplusplus\fR +. +Returns 1 if Tcl is compiled with an objective-c++ compiler, 0 otherwise. +.\" METHOD: patchlevel +.TP +\fB::tcl::build-info patchlevel\fR +. +Returns the Tcl patchlevel, same as \fBinfo patchlevel\fR. +.\" METHOD: profile +.TP +\fB::tcl::build-info profile\fR +. +Returns 1 if Tcl is compiled with \fB\-DTCL_CFG_PROFILED\fR, 0 otherwise. +.\" METHOD: purify +.TP +\fB::tcl::build-info purify\fR +. +Returns 1 if Tcl is compiled with \fB\-DPURIFY\fR, 0 otherwise. +.\" METHOD: static +.TP +\fB::tcl::build-info static\fR +. +Returns 1 if Tcl is compiled as a static library, 0 otherwise. +.\" METHOD: tommath +.TP +\fB::tcl::build-info tommath\fR +. +Returns the libtommath version number (as 4 digits) if libtommath is built into Tcl, 0 otherwise. +.\" METHOD: version +.TP +\fB::tcl::build-info version\fR +. +Returns the Tcl version, same as \fBinfo tclversion\fR. +.\" METHOD: zlib +.TP +\fB::tcl::build-info zlib\fR +. +Returns the zlib version number (as 4 digits) if zlib is built into Tcl, 0 otherwise. +.SH "EXAMPLES" +.PP +These show the use of \fB::tcl::build-info\fR. +.PP +.CS +\fB::tcl::build-info\fR + \fI\(-> 9.0.2+af16c07b81655fabde8028374161ad54b84ef9956843c63f49976b4ef601b611.gcc-1204\fR +\fB::tcl::build-info commit\fR + \fI\(-> af16c07b81655fabde8028374161ad54b84ef9956843c63f49976b4ef601b611\fR +\fB::tcl::build-info compiler\fR + \fI\(-> gcc-1204\fR +\fB::tcl::build-info gcc\fR + \fI\(-> 1204\fR +\fB::tcl::build-info version\fR + \fI\(-> 9.0\fR +\fB::tcl::build-info patchlevel\fR + \fI\(-> 9.0.2\fR +.CE +.SH "SEE ALSO" +info(n) +.SH "KEYWORDS" +build-info +'\" Local Variables: +'\" mode: nroff +'\" End: -- cgit v0.12 From bc62e73bb841535e18e9db62d6d999c4e8fd791f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Jun 2025 08:48:02 +0000 Subject: @dkf's review comments (Thanks!) --- doc/tclbuildinfo.n | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/doc/tclbuildinfo.n b/doc/tclbuildinfo.n index f2243b0..eb5fd16 100644 --- a/doc/tclbuildinfo.n +++ b/doc/tclbuildinfo.n @@ -11,39 +11,15 @@ .SH NAME tcl::build-info \- Build info .SH SYNOPSIS -\fB::tcl::build-info\fR? -\fB::tcl::build-info clang\fR? -\fB::tcl::build-info commit\fR? -\fB::tcl::build-info compiledebug\fR? -\fB::tcl::build-info compiler\fR? -\fB::tcl::build-info compilestats\fR? -\fB::tcl::build-info cplusplus\fR? -\fB::tcl::build-info debug\fR? -\fB::tcl::build-info gcc\fR? -\fB::tcl::build-info icc\fR? -\fB::tcl::build-info ipl32\fR? -\fB::tcl::build-info memdebug\fR? -\fB::tcl::build-info msvc\fR? -\fB::tcl::build-info nmake\fR? -\fB::tcl::build-info no-deprecate\fR? -\fB::tcl::build-info no-thread\fR? -\fB::tcl::build-info no-optimize\fR? -\fB::tcl::build-info objective-c\fR? -\fB::tcl::build-info objective-cplusplus\fR? -\fB::tcl::build-info patchlevel\fR? -\fB::tcl::build-info profile\fR? -\fB::tcl::build-info purify\fR? -\fB::tcl::build-info static\fR? -\fB::tcl::build-info tommath\fR? -\fB::tcl::build-info version\fR? -\fB::tcl::build-info zlib\fR? +\fB::tcl::build-info\fR ?\fIfield\fR? .BE .SH DESCRIPTION .PP This command provides a way to retrieve information about how Tcl was built. Without any options, the command returns the Tcl patchlevel, followed by the '+'-sign, followed by the fossil commit-id followed by a list of -dot-separated tags. The \fIoptions\fR for official Tcl releases are: +dot-separated tags. If a \fIfield\fR is given, this command extracts that +field as described below. For official Tcl releases, the \fIfield\fRs are: .\" METHOD: clang .TP \fB::tcl::build-info clang\fR -- cgit v0.12 From af368b90499cd1842aaa79aed6a39900ea58834e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Jun 2025 13:38:36 +0000 Subject: Document what happens for non-documented field values --- doc/tclbuildinfo.n | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/tclbuildinfo.n b/doc/tclbuildinfo.n index eb5fd16..8ff2933 100644 --- a/doc/tclbuildinfo.n +++ b/doc/tclbuildinfo.n @@ -19,7 +19,8 @@ This command provides a way to retrieve information about how Tcl was built. Without any options, the command returns the Tcl patchlevel, followed by the '+'-sign, followed by the fossil commit-id followed by a list of dot-separated tags. If a \fIfield\fR is given, this command extracts that -field as described below. For official Tcl releases, the \fIfield\fRs are: +field as described below. Any other \fIfield\fR value not mentioned +below will always return "0". For official Tcl releases, the \fIfield\fRs are: .\" METHOD: clang .TP \fB::tcl::build-info clang\fR -- cgit v0.12