diff options
| author | cashmere <cashmere@autistici.org> | 2026-09-04 09:05:24 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-09-04 09:05:24 +0200 |
| commit | 4f49b16079b27d7ce633619e4cddfdf2bffbc952 (patch) | |
| tree | c296c1e7f3c3e2f6859c6d3a1b1b208779b89679 /autosetup/tmake.auto | |
| download | relic-4f49b16079b27d7ce633619e4cddfdf2bffbc952.tar.gz | |
Diffstat (limited to 'autosetup/tmake.auto')
| -rw-r--r-- | autosetup/tmake.auto | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/autosetup/tmake.auto b/autosetup/tmake.auto new file mode 100644 index 0000000..448d317 --- /dev/null +++ b/autosetup/tmake.auto @@ -0,0 +1,73 @@ +# Copyright (c) 2016 WorkWare Systems http://www.workware.net.au/ +# All rights reserved + +# Auto-load module for 'tmake' build system integration + +use init + +autosetup_add_init_type tmake "Tcl-based tmake build system" { + autosetup_check_create auto.def \ +{# Initial auto.def created by 'autosetup --init=tmake' +# vim:set syntax=tcl: + +use cc cc-lib cc-db cc-shared +use tmake + +# Add any user options here +# Really want a --configure that takes over the rest of the command line +options { +} + +cc-check-tools ar ranlib + +set objdir [get-env BUILDDIR objdir] + +make-config-header $objdir/include/autoconf.h +make-tmake-settings $objdir/settings.conf {[A-Z]*} *dir lib_* +} + + autosetup_check_create project.spec \ +{# Initial project.spec created by 'autosetup --init=tmake' + +tmake-require-version 0.7.3 + +# vim:set syntax=tcl: +define? DESTDIR _install + +# XXX If configure creates additional/different files than include/autoconf.h +# that should be reflected here +Autosetup include/autoconf.h + +# e.g. for autoconf.h +IncludePaths include + +ifconfig !CONFIGURED { + # Not configured, so don't process subdirs + AutoSubDirs off + # And don't process this file any further + ifconfig false +} +} + + set configure [readfile configure] + # XXX Do we need also need to support a system install of tmake? + if {[string first {#@TMAKEUPDATED@} $configure] < 0} { + if {[regsub {#@@INITCHECK@@#} $configure \ + {test -z "$TMAKE" -a -x "$dir/tmake" \&\& exec "$dir/tmake" --force --configure "$@"; #@TMAKEUPDATED@} configure]} { + writefile configure $configure\n + exec chmod +x configure + puts "Updated configure to invoke local tmake." + if {![file exec autosetup/tmake]} { + puts "Warning: autosetup/tmake is missing." + puts " Install it with: tmake --install=autosetup" + } + } else { + puts "Warning: configure isn't created by a recent autosetup, not updating." + } + } else { + puts "I see configure for tmake already exists." + } + if {![file exists build.spec]} { + puts "Note: I don't see build.spec. Try running: tmake --genie" + } +} |
