Experiences with porting projects to tmake

polarssl

Project has plain Makefile and cmake support. Currently configuration is done by manually modifing Makefile and include/polarssl/config.h

  • Install autosetup and tmake
  • Create basic auto.def to allow configuration of some options and checking some basic compiler settings. Most settings are still hard-coded here.
  • Create settings.conf and include/polarssl/autoconf.h
  • Modify include/polarssl/config.h to include autoconf.h (to avoid overwriting current version)
  • tmake can build either static lib or shared lib
  • Created polarsslwrap based on axtlswrap
  • Test directory uses code generation. scripts/generate_code.pl was hard to work with because it wanted to generate output in the current dir. I changed it slightly to take the full path to the target on the command line.

→ polarsslwrap does not work on Windows because of the lack of fork, exec, poll
→ Need to add all possible options to auto.def, including dependencies

Build times:

  • About 2 seconds for tmake
  • About 4.5 seconds for cmake

libgit2

Was waf, now cmake

  • Installed autosetup and tmake

  • Converted autoconfig + user config from cmake to auto.def

  • Required addition of building libraries from libraries

  • Required addition of GlobRecursive (now Glob --recursive --exclude=...)

  • Added Template support as tmake module for .pc (pkg-config)

  • tests-clar/clar was awkward since it wouldn't generate sources out-of-tree. Needed to manually move them to the build tree. (Alternatively, could have modified clar).

  • Probably need PublishIncludes --dir=

  • Didn't do thread support
  • tmake currently doesn't support MSVC, but I left in as much support as possible
  • Now uses pkg-config support for zlib searching

fossil

  • A number of HostExecutable generators are used
  • Most of these could be easily replaced with Tcl commands or scripts

nethack4

  • Avoiding 'sudo tmake install' creating build files as root
  • There were some recursive dependencies that required subset libraries to be created
  • date.h was being recreated every time

Build times:

  • About 19 seconds for tmake (clean build), 0.3 seconds (do nothing build)
  • About 55 seconds for aimake (clean build), 5 seconds (do nothing build)

The results of the search are