tmk manual (tmk version 1.0beta) draft

Yamauchi Hitoshi


Contents


Overview


Descriptions

Syntax: tmk ?options...? ?-? ?targets...?


Command Line Options

Command line options are for temporarily changing the command behavior. Tmk's command line option is also not the exceptions. If you want to change the tmk behavior more persistently, use TMakefile, TMakefile.proj, TMakefile.priv, or Environment variables.

Command line option is usually has highest priority and you can override other methods, e.g., override the Environment variables' effect.

flow control / action


-h/-help:

Output help text.


-rules:

Output tmk rule database.


-sysinfo:

Output system/config information.e


-reconfig:

Reconfigure tmk, rebuild local cache files. Accorindg to tmk runmode system configuration and run mode, the local cache files are created usually under  /.tmk/cache. (see also -setrunmode)


-pretend:

Only display TCL commands that would be executed.


-par [n]:

Switch on parallel processing, uses [n] threads on systems where tclsh supports threading. This overrides the TMK_THREADS environment variable. (see also Environment Variable TMK_THREADS)


Code generation level and output directory


-prf:

profiling code.


-dbg:

debug code (default).


-std:

standard (simple optimizations).


-opt:

optimized code (normal level).


-max:

optimized code (high level, cpu specific).


-arch [str]:

set architecture name to [str] and switch on architecture-dependent target directory.


-noarch:

switch off architecture-dependent target directory.


File options


-f [file]:

read [file] instead of TMakefile ("-" for stdin)


-proj [file]:

read [file] instead of TMakefile.proj


-priv [file]:

read [file] instead of TMakefile.priv


-nomakef:

do not read TMakefile. The example of this usage is
#!/bin/bash 
# use tmk as architecture detection.
ARCH=`tmk -nomakef -silent -cmd 'puts $ARCH'`


-noproj:

do not read TMakefile.proj


-nopriv:

do not read TMakefile.priv


Target modification options


-force:

build all specified targets unconditionally.


-mfdepend:

include TMakefile as prerequisite for every target.


-up ?targets...?:

pretend that these targets have been freshly updated


-nup ?targets...?:

pretend that these targets are old and remain untouched


Debugging, tracing, logging


-verbose:

echo currently executed command (default behaviour)


silent

no echo of currently executed command


-debug:

increase debugging level (may be spec'd multiple times)


-nodebug:

no debugging messages


-vtrace [var] :

trace all write accesses to the specified variable


-ptrace [proc]:

trace all calls of the specified procedure


Misc options


-local:

switch off subdirectory processing


-mod [name]:

load module [name] after parsing the TMakefile


-D [var]=[value] :

set variable [var] to [value] before reading the TMakefiles. Set to 1 if the '=[value]' part is omitted.


-cmd [code]:

executes [code] after reading the default module and before reading the TMakefiles


-init [code]:

executes [code] before reading the default module, right after command line processing


-prefix [p]:

print [p] before every line of output [default is "tmk:"]


-setrunmode [modekey=modevalue] :

tmk runs under some mode. All default values are ``default''.

(see also TMK_RUNMODE.)


Environment Variables

Overview

You can set up some default behavior of tmk via Environment variables. For example, which tclsh you want to use, what run mode you usually want to use.

Path and Directories.


TMK_HOME

Set the tmk HOME directory. When you have several copy of tmk, you can set one of the directory. When this is not set, invoked tmk directory is looked up. You should care the consistency with TMK_TCLSH. Usually you should not change this.


TMK_TCLSH

Which tclsh is used to run tmk. You can specify this with absolute path. Default value is tclsh.

#! /bin/sh
#
# Example: I want to use my own tmk for developing.
# 
export TMK_TCLSH=/my/local/tmk/path


TMK_MODULE_PATH

User specified space separated additional tmk module path.

#! /bin/sh
#
# Example: my own modules
# 
export TMK_MODULE_PATH='/my/modules /other/module/path'

Runtime behaviors.


TMK_RUNMODE

Default run mode. The value is colon separated modekey=modevar entries. (see option -setrunmode)

#! /bin/sh
#
# Example: I always use 64 bit machine...
#
export TMK_RUNMODE="addressmode=64bit"


TMK_THREADS

Number of threads for parallel compiling. The value should be a positive integer. (see option -par)

#! /bin/sh
#
# Example: on multi-CPU machine
#
export TMK_THREADS=4


Internal Variables

Overview

tmk internal variables are used for changing tmk behavior. Some of them are automatically set. Please take care that changing these variables may cause some trouble.


USE_ARCH

When this is set to 1, architecture depended directory is created while compiling.


::tmk::MODULE_PATH

Space separated additional module path (string).
  #
  # look up module path example.
  #   This variable is a string, not a list. so use append with a space.
  #
  append ::tmk::MODULE_PATH " ${PROJROOT}/gmu/GEX "
  module { gex }



Index

Command Line Options
-arch
no title
-cmd
no title
-D
no title
-dbg
no title
-debug
no title
-f
no title
-force
no title
-h
no title
-help
no title
-init
no title
-local
no title
-max
no title
-mfdepend
no title
-mod
no title
-noarch
no title
-nodebug
no title
-nomakef
no title
-nopriv
no title
-noproj
no title
-nup
no title
-opt
no title
-par
no title
-prefix
no title
-pretend
no title
-prf
no title
-priv
no title
-proj
no title
-ptrace
no title
-reconfig
no title
-rules
no title
-setrunmode
no title
-silent :
no title
-std
no title
-sysinfo
no title
-up
no title
-verbose
no title
-vtrace
no title
Environment Variable
TMK_HOME
no title
TMK_MODULE_PATH
no title
TMK_RUNMODE
no title
TMK_TCLSH
no title
TMK_THREADS
no title
Internal Variables
::tmk::MODULE_PATH
no title
USE_ARCH
no title

About this document ...

tmk manual (tmk version 1.0beta) draft

This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.70)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 0 -toc_depth 5 tmk-man.tex

The translation was initiated by Hitoshi Yamauchi on 2005-11-27

Hitoshi Yamauchi 2005-11-27