[home] [description] [documentation] [download] [mailing lists] [contact tmk]




Why tmk?

tmk has proved to be a useful and effective automation tool. Its most important application areas are software development and systems administration. There are several reasons why tmk could be attractive to you:

You can use tmk just like make

Firstly, you may use tmk in a way very similar to make or GNU make. This means that you can define rules that tell how to generate target files from source files whenever these source files have changed, e.g.
# my first Makefile in Tcl
target foo.o foo.cc {
  $CC $CCFLAGS -o $TARGET $SRC
}
If you know make and/or Tcl, the above example should look familiar. It defines that the file foo.o can be created from foo.C by calling a C++ compiler (stored in the variable $CC) with some flags.

Modules - a higher abstraction level

But have you ever tried to write a Makefile for a large project distibuted over many directories? And tried to support such things such as different code variants, versions, multi-platform support, and compiling the project on different sites?

A typical TMakefile in a large project looks like this:

# using modules in a project
module {cxx qt math}
lappend PROGRAMS testA testB
lappend PROJLIBS otherProj1/xy/abc otherProj2/aa/bb
This example would search for all C++ source files, compile them, search for all header files using QT and precompile them using moc, put all but testA.o and testB.o into a library, create the executables testA and testB, and link them with the local lib as well as with the specified libraries from other project directories. These other project are located either in the same project root directory as the current project, or they may reside in completely different locations specified in a project location path variable.

And what's even more important: this works exactly this way on many platforms (e.g. Linux, IRIX, SunOS, Windows), and you can even compile on many platforms at the same time. tmk will put all generated files into an architecture-dependent target directory. All platform- and site specific detail is hidden from the actual TMakefile, and handled by a central configuration subsystem.

tmk provides an advanced scripting environment

Since tmk is fully embedded in the platform-independent scripting language Tcl, you can use this powerful combination for all kinds of high-level, multi-purpose scripting tasks. You no longer have to worry about the communication between your Makefiles and you scripts, since with tmk they become one.

Back to the description page...



[home] [description] [documentation] [download] [mailing lists] [contact tmk]

tmk-home