summaryrefslogtreecommitdiffstats
path: root/tmake
diff options
context:
space:
mode:
authormueller <mueller@afe2bf4a-e733-0410-8a33-86f594647bc7>1999-12-15 19:34:06 (GMT)
committermueller <mueller@afe2bf4a-e733-0410-8a33-86f594647bc7>1999-12-15 19:34:06 (GMT)
commitf18128845407f8612668950e112c2d5c3e0ff5be (patch)
tree43e0b215b5d3d2b436509cbb1cd22102aef61b1d /tmake
parentdaf91dc906e217e81f77f491e0abf505a91289b8 (diff)
downloadDoxygen-f18128845407f8612668950e112c2d5c3e0ff5be.zip
Doxygen-f18128845407f8612668950e112c2d5c3e0ff5be.tar.gz
Doxygen-f18128845407f8612668950e112c2d5c3e0ff5be.tar.bz2
mods for doxygen-0.49-990829
Diffstat (limited to 'tmake')
-rw-r--r--tmake/CHANGES10
-rw-r--r--tmake/LICENSE2
-rw-r--r--tmake/README9
-rw-r--r--tmake/bin/progen.bat266
-rwxr-xr-xtmake/bin/tmake415
-rw-r--r--tmake/bin/tmake.bat1093
-rw-r--r--tmake/doc/tmake.html219
-rw-r--r--tmake/doc/tmake_ref.html117
-rwxr-xr-xtmake/lib/aix-g++/tmake.conf8
-rwxr-xr-xtmake/lib/aix-xlc/tmake.conf4
-rwxr-xr-xtmake/lib/bsdi-g++/app.t2
-rwxr-xr-xtmake/lib/bsdi-g++/lib.t2
-rwxr-xr-xtmake/lib/bsdi-g++/subdirs.t2
-rwxr-xr-xtmake/lib/bsdi-g++/tmake.conf60
-rwxr-xr-xtmake/lib/dgux-g++/tmake.conf6
-rwxr-xr-xtmake/lib/freebsd-g++/tmake.conf6
-rwxr-xr-xtmake/lib/gnu-g++/tmake.conf6
-rwxr-xr-xtmake/lib/hpux-acc/tmake.conf6
-rwxr-xr-xtmake/lib/hpux-cc/tmake.conf6
-rwxr-xr-xtmake/lib/hpux-g++/tmake.conf8
-rwxr-xr-xtmake/lib/irix-64/tmake.conf8
-rwxr-xr-xtmake/lib/irix-dcc/tmake.conf2
-rwxr-xr-xtmake/lib/irix-g++/tmake.conf4
-rwxr-xr-xtmake/lib/irix-n32/tmake.conf12
-rwxr-xr-xtmake/lib/irix-o32/app.t2
-rwxr-xr-xtmake/lib/irix-o32/lib.t2
-rwxr-xr-xtmake/lib/irix-o32/subdirs.t2
-rwxr-xr-xtmake/lib/irix-o32/tmake.conf59
-rwxr-xr-xtmake/lib/linux-g++/tmake.conf7
-rwxr-xr-xtmake/lib/netbsd-g++/tmake.conf6
-rwxr-xr-xtmake/lib/openbsd-g++/tmake.conf6
-rwxr-xr-xtmake/lib/osf1-cxx/tmake.conf14
-rwxr-xr-xtmake/lib/osf1-g++/tmake.conf6
-rwxr-xr-xtmake/lib/qnx-g++/tmake.conf4
-rwxr-xr-xtmake/lib/sco-g++/tmake.conf8
-rwxr-xr-xtmake/lib/solaris-cc-gcc/app.t2
-rwxr-xr-xtmake/lib/solaris-cc-gcc/lib.t2
-rwxr-xr-xtmake/lib/solaris-cc-gcc/subdirs.t2
-rwxr-xr-xtmake/lib/solaris-cc-gcc/tmake.conf61
-rwxr-xr-xtmake/lib/solaris-cc/tmake.conf16
-rwxr-xr-xtmake/lib/solaris-g++/tmake.conf7
-rwxr-xr-xtmake/lib/sunos-g++/tmake.conf4
-rwxr-xr-xtmake/lib/ultrix-g++/tmake.conf6
-rwxr-xr-xtmake/lib/unix/generic.t19
-rwxr-xr-xtmake/lib/unix/subdirs.t4
-rwxr-xr-xtmake/lib/unixware-g++/tmake.conf10
-rwxr-xr-xtmake/lib/unixware7-cc/app.t2
-rwxr-xr-xtmake/lib/unixware7-cc/lib.t2
-rwxr-xr-xtmake/lib/unixware7-cc/subdirs.t2
-rwxr-xr-xtmake/lib/unixware7-cc/tmake.conf59
-rwxr-xr-xtmake/lib/unixware7-g++/app.t2
-rwxr-xr-xtmake/lib/unixware7-g++/lib.t2
-rwxr-xr-xtmake/lib/unixware7-g++/subdirs.t2
-rwxr-xr-xtmake/lib/unixware7-g++/tmake.conf59
-rwxr-xr-xtmake/lib/win32-borland/generic.t16
-rwxr-xr-xtmake/lib/win32-borland/subdirs.t36
-rwxr-xr-xtmake/lib/win32-borland/tmake.conf2
-rwxr-xr-xtmake/lib/win32-g++/generic.t83
-rwxr-xr-xtmake/lib/win32-g++/tmake.conf6
-rwxr-xr-xtmake/lib/win32-msvc/generic.t16
-rwxr-xr-xtmake/lib/win32-msvc/tmake.conf5
-rwxr-xr-xtmake/lib/win32-msvc/vcapp.t44
-rwxr-xr-xtmake/lib/win32-msvc/vclib.t2
-rwxr-xr-xtmake/lib/win32-symantec/generic.t3
-rwxr-xr-xtmake/lib/win32-symantec/tmake.conf2
-rwxr-xr-xtmake/lib/win32-visage/generic.t3
-rwxr-xr-xtmake/lib/win32-visage/tmake.conf2
-rwxr-xr-xtmake/lib/win32-watcom/generic.t3
-rwxr-xr-xtmake/lib/win32/subdirs.t23
69 files changed, 1072 insertions, 1826 deletions
diff --git a/tmake/CHANGES b/tmake/CHANGES
index 000ac7d..ce686e9 100644
--- a/tmake/CHANGES
+++ b/tmake/CHANGES
@@ -1,3 +1,13 @@
+ Changes from version 1.2 to 1.3
+
+* Improved Qt 2.0 support.
+
+* INCLUDEPATH can have directories containing whitespace (use semicolon)
+ as separator.
+
+* Many, many code fixes and doc improvements.
+
+
Changes from version 1.1 to 1.2
* tmake is no longer restricted to C++ only. You can now use both C++
diff --git a/tmake/LICENSE b/tmake/LICENSE
index 2836b6a..7262d5a 100644
--- a/tmake/LICENSE
+++ b/tmake/LICENSE
@@ -1,6 +1,6 @@
License Statement for tmake
-Copyright (C) 1996-1998 by Troll Tech AS. All rights reserved.
+Copyright (C) 1996-1999 by Troll Tech AS. All rights reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided
diff --git a/tmake/README b/tmake/README
index defb697..b049d32 100644
--- a/tmake/README
+++ b/tmake/README
@@ -1,7 +1,10 @@
- tmake version 1.2
+ tmake version 1.3
tmake is an easy-to-use tool for creating and maintaining makefiles across
-many platforms and compilers. The tmake manual (doc/tmake.html) explains
-how to install and use tmake.
+many platforms and compilers. For information about installing and using
+tmake, see:
+
+ doc/tmake.html -- User's Guide
+ doc/tmake_ref.html -- Reference Manual
Download the latest version from: <ftp://ftp.troll.no/freebies/tmake>
diff --git a/tmake/bin/progen.bat b/tmake/bin/progen.bat
deleted file mode 100644
index 54475ee..0000000
--- a/tmake/bin/progen.bat
+++ /dev/null
@@ -1,266 +0,0 @@
-@rem = '--*-PERL-*--';
-@rem = '
-@echo off
-rem setlocal
-set ARGS=
-:loop
-if .%1==. goto endloop
-set ARGS=%ARGS% %1
-shift
-goto loop
-:endloop
-rem ***** This assumes PERL is in the PATH *****
-perl.exe -S progen.bat %ARGS%
-goto endofperl
-@rem ';
-#!/usr/bin/perl
-############################################################################
-# $Id$
-#
-# Generates a tmake project file.
-#
-# Copyright (C) 1996-1998 by Troll Tech AS. All rights reserved.
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted, provided
-# that this copyright notice appears in all copies.
-# No representations are made about the suitability of this software for any
-# purpose. It is provided "as is" without express or implied warranty.
-#
-############################################################################
-
-# Default project settings
-$project{"TEMPLATE"} = "app";
-$project{"CONFIG"} = "qt warn_on release";
-
-@project_extra = ();
-
-while ( @ARGV ) { # parse command line args
- $_ = shift @ARGV;
- if ( s/^-// ) {
- if ( /^o(.*)/ ) {
- $outfile = ($1 eq "") ? shift @ARGV : $1;
- ($outfile eq "-") && ($outfile = "");
- } elsif ( /^n(.*)/ ) {
- $project{"TARGET"} = ($1 eq "") ? shift @ARGV : $1;
- } elsif ( /^t(.*)/ ) {
- $project{"TEMPLATE"} = ($1 eq "") ? shift @ARGV : $1;
- $project{"TEMPLATE"} =~ s/\.t$//i;
- } elsif ( /lower/ ) {
- $tolower = 1;
- } else {
- &progen_usage;
- }
- } elsif ( /^\s*(?:[\w\-]+:)?\w+\s*[\+\-\*\/]?=/ ) { # project override
- push( @project_extra, $_ );
- } else {
- push (@files, $_ );
- }
-}
-
-$outfile eq "" || open(STDOUT,">" . $outfile) ||
- &progen_error("Can't create \"$outfile\"");
-
-if ( ! @files ) {
- @files = &find_files(".",".*",1);
-}
-
-if ( $tolower ) {
- foreach $f ( @files ) {
- $f =~ tr/A-Z/a-z/;
- }
-}
-
-@hdr = sort grep(/\.(h|hh|hpp|hxx)$/i,@files);
-@src = sort grep(/\.(c|cpp|cc|cxx)$/i && ! /moc_/i,@files);
-
-# Remove source files that are included by other source files
-foreach $f ( @src ) {
- $srcdict{$f} = 1;
-}
-foreach $f ( @src ) {
- if ( open(F,"< $f") ) {
- while ( <F> ) {
- if ( /^\s*#\s*include\s+\"([^\"]*)\"/ ) {
- $srcdict{$1} = 0;
- }
- }
- }
-}
-foreach $f( @src ) {
- $srcdict{$f} && (push(@src2,$f));
-}
-@src = @src2;
-
-$project{"HEADERS"} = join(" ",sort @hdr);
-$project{"SOURCES"} = join(" ",sort @src);
-
-foreach $p ( @project_extra ) {
- if ( $p =~ /^\s*((?:[\w\-]+:)?\w+)\s*([\+\-\*\/])?=\s*(.*)/ ) {
- if ( $project{$1} ne "" ) {
- Project($p);
- }
- }
-}
-
-$project{"HEADERS"} =~ s/\s+/ \\\n\t\t /g;
-$project{"SOURCES"} =~ s/\s+/ \\\n\t\t /g;
-
-print "TEMPLATE\t= " . $project{"TEMPLATE"} . "\n";
-print "CONFIG\t\t= " . $project{"CONFIG"} . "\n";
-print "HEADERS\t\t= " . $project{"HEADERS"} . "\n";
-print "SOURCES\t\t= " . $project{"SOURCES"} . "\n";
-if ( $project{"TARGET"} ne "" ) {
- print "TARGET\t\t= " . $project{"TARGET"} . "\n";
-}
-
-foreach ( @project_extra ) {
- if ( /^\s*((?:[\w\-]+:)?\w+)\s*([\+\-\*\/])?=\s*(.*)/ ) {
- if ( $project{$1} eq "" ) {
- $t = $1;
- if ( length($t) < 8 ) {
- $t .= "\t\t";
- } elsif ( length($t) < 16 ) {
- $t .= "\t";
- } else {
- $t .= " ";
- }
- print "$t$2= $3\n";
- }
- }
-}
-
-exit 0;
-
-
-#
-# progen_usage()
-#
-# Prints a message about program usage and exits
-#
-
-sub progen_usage {
- print STDERR "Usage:\n progen [options] [files]\n";
- print STDERR "Options:\n";
- print STDERR " -lower Lower-case letters filenames (useful for non-Unix)\n";
- print STDERR " -n name Specify a project name (= TARGET)\n";
- print STDERR " -o file Write output to \"file\"\n";
- print STDERR " -t file Specify a template file other than qtapp\n";
- exit 1;
-}
-
-
-#
-# progen_error(msg)
-#
-# Prints the message and exits
-#
-
-sub progen_error {
- my($msg) = @_;
- print STDERR "progen error: " . $msg . "\n";
- exit 1;
-}
-
-
-#
-# Finds files.
-#
-# Examples:
-# find_files("/usr","\.cpp$",1) - finds .cpp files in /usr and below
-# find_files("/tmp","^#",0) - finds #* files in /tmp
-#
-
-sub find_files {
- my($dir,$match,$descend) = @_;
- my($file,$p,@files);
- local(*D);
- $dir =~ s=\\=/=g;
- ($dir eq "") && ($dir = ".");
- if ( opendir(D,$dir) ) {
- if ( $dir eq "." ) {
- $dir = "";
- } else {
- ($dir =~ /\/$/) || ($dir .= "/");
- }
- foreach $file ( readdir(D) ) {
- next if ( $file =~ /^\.\.?$/ );
- $p = $dir . $file;
- ($file =~ /$match/i) && (push @files, $p);
- if ( $descend && -d $p && ! -l $p ) {
- push @files, &find_files($p,$match,$descend);
- }
- }
- closedir(D);
- }
- return @files;
-}
-
-
-#
-# strip_project_val(tag)
-#
-# Strips white space from project value strings.
-#
-
-sub strip_project_val {
- my($v) = @_;
- $v =~ s/^\s+//; # trim white space
- $v =~ s/\s+$//;
- return $v;
-}
-
-
-#
-# Project(strings)
-#
-# This is a powerful function for setting or reading project variables.
-# Returns the resulting project variables (joined with space between).
-#
-# This is a slightly modified version of the Project function in tmake.
-
-sub Project {
- my @settings = @_;
- my($r,$t,$s,$v,$p,$c);
- $r = "";
- foreach ( @settings ) {
- $v = $_;
- if ( $v =~ s/^\s*((?:[\w\-]+:)?\w+)\s*(\+=|\*=|\-=|\/=|=)\s*// ) {
- $t = $1;
- $s = $2;
- $v = strip_project_val($v);
- $p = $project{$t};
- if ( $s eq "=" ) { # set variable
- $p = $v;
- } elsif ( $s eq "+=" ) { # append
- if ( $p eq "" ) {
- $p = $v;
- } else {
- $p .= " " . $v;
- }
- } elsif ( $s eq "*=" ) { # append if not contained
- if ( !($p =~ /(?:^|\s)\Q$v\E(?:\s|$)/) ) {
- if ( $p eq "" ) {
- $p = $v;
- } else {
- $p .= " " . $v;
- }
- }
- } elsif ( $s eq "-=" ) { # subtract
- $p =~ s/$v//g;
- } elsif ( $s eq "/=" ) { # sed
- $cmd = '$p =~ ' . $v;
- eval $cmd;
- }
- $project{$t} = strip_project_val($p);
- } else {
- $p = strip_project_val($project{$v});
- }
- if ( $p ne "" ) {
- $r = ($r eq "") ? $p : ($r . " " . $p);
- }
- }
- return $r;
-}
-__END__
-:endofperl
diff --git a/tmake/bin/tmake b/tmake/bin/tmake
index 2d7e6a7..457467a 100755
--- a/tmake/bin/tmake
+++ b/tmake/bin/tmake
@@ -29,51 +29,89 @@
#
############################################################################
+$TMAKE_VERSION = "1.3";
+
if ($] < 5.0) {
&tmake_error("This program requires perl version 5 or newer");
}
-$cpp_ext = "cpp";
-$obj_ext = "o";
-$moc_aware = 0;
-$moc_pre = "moc_";
-$moc_ext = "moc";
-$moc_cmd = '$(MOC)';
-$linebreak = "\\";
-$dir_sep = "/";
-$is_unix = 1;
-$really_unix = &check_unix();
-$guess_os = 1;
-$depend_path = "";
-$nodepend = 0;
-$output_count = 0;
-
-$template_name = "";
-$project_name = "";
-$outfile = "";
-@project_extra = ();
-@project_files = ();
-@eval_expr = ();
-$eval_done = 0;
+$cpp_ext = "cpp";
+$moc_aware = 0;
+$moc_pre = "moc_";
+$moc_ext = "moc";
+$moc_cmd = '$(MOC)';
+$linebreak = "\\";
+$really_unix = &check_unix();
+$is_unix = $really_unix;
+$dir_sep = $is_unix ? "/" : "\\";
+$obj_ext = $is_unix ? "o" : "obj";
+$depend_path = "";
+$nodepend = 0;
+$output_count = 0;
+$notrim_whitespace = 0;
+$read_tmakeconf = 0;
+
+$template_name = "";
+$project_name = "";
+$outfile = "";
+%project = ();
+$eval_quit = 0;
+
+$project{"TMAKEPATH"} = $ENV{"TMAKEPATH"} . ";" . $ENV{"HOME"} . "/.tmake/";
while ( @ARGV ) { # parse command line args
$_ = shift @ARGV;
if ( s/^-// ) {
if ( /^e(.*)/ ) {
- push( @eval_expr, ($1 eq "") ? shift @ARGV : $1);
+ if ( ! $read_tmakeconf ) {
+ $read_tmakeconf = 1;
+ &ScanProject( &find_template("tmake.conf") );
+ }
+ $text = "";
+ eval( ($1 eq "") ? shift @ARGV : $1 );
+ die $@ if $@;
+ print $text . "\n" if ($text ne "");
+ $eval_quit = 1;
} elsif ( /^t(.*)/ ) {
$template_name = ($1 eq "") ? shift @ARGV : $1;
} elsif ( /^o(.*)/ ) {
$outfile = ($1 eq "") ? shift @ARGV : $1;
($outfile eq "-") && ($outfile = "");
+ if ( $outfile ne "" ) {
+ open(STDOUT,">" . fix_path($outfile)) ||
+ &tmake_error("Can't create \"$outfile\"");
+ }
} elsif ( /^p(.*)/ ) {
- push( @project_files, ($1 eq "") ? shift @ARGV : $1);
+ #
+ # The -p option is obsolete and will be removed in the next
+ # tmake release.
+ #
+ &tmake_warning( "-p option obsolete, instead use \"tmake file1.pro file2.pro ...\"");
+ my($pf) = ($1 eq "") ? shift @ARGV : $1;
+ if ( ! $read_tmakeconf ) {
+ $read_tmakeconf = 1;
+ &ScanProject( &find_template("tmake.conf") );
+ }
+ if ( ! ($pf =~ /\.pro$/i) && -f fix_path($pf . ".pro") ) {
+ $pf .= ".pro";
+ }
+ if ( $project_name eq "" ) {
+ $project_name = $pf;
+ $project{"PROJECT"} = $project_name;
+ $project{"PROJECT"} =~ s/\.pro$//i;
+ $project{"TARGET"} = $project{"PROJECT"};
+ }
+ if ( !&ScanProject($pf) ) {
+ &tmake_error("Can't open project file \"$pf\"");
+ }
} elsif ( /^unix$/ ) {
- $guess_os = 0;
$is_unix = 1;
+ $dir_sep = "/";
+ $obj_ext = "o";
} elsif ( /^win32$/ ) {
- $guess_os = 0;
$is_unix = 0;
+ $dir_sep = "\\";
+ $obj_ext = "obj";
} elsif ( /^nodepend$/ ) {
$nodepend = 1; # don't generate dependencies
} elsif ( /^v$/ ) {
@@ -81,66 +119,46 @@ while ( @ARGV ) { # parse command line args
} else {
&tmake_usage();
}
- } elsif ( /^\s*(?:[\w\-]+:)?\w+\s*[\+\-\*\/]?=/ ) { # project override
- push( @project_extra, $_ );
+ } elsif ( /^\s*((?:[^:\s]*?:)?)(\w+)\s*(\+=|\*=|\-=|\/=|=)/ ) {
+ if ( ! $read_tmakeconf && ! (/^\s*TMAKEPATH/) ) {
+ $read_tmakeconf = 1;
+ &ScanProject( &find_template("tmake.conf") );
+ }
+ Project( $_ ); # manual project setting
} else {
- $project_name &&
- &tmake_error("You can only specify one project file");
- $project_name = $_;
+ my($pf) = $_;
+ if ( ! $read_tmakeconf ) {
+ $read_tmakeconf = 1;
+ &ScanProject( &find_template("tmake.conf") );
+ }
+ if ( ! ($pf =~ /\.pro$/i) && -f fix_path($pf . ".pro") ) {
+ $pf .= ".pro";
+ }
+ if ( $project_name eq "" ) {
+ $project_name = $pf;
+ $project{"PROJECT"} = $project_name;
+ $project{"PROJECT"} =~ s/\.pro$//i;
+ $project{"TARGET"} = $project{"PROJECT"};
+ }
+ if ( !&ScanProject($pf) ) {
+ &tmake_error("Can't open project file \"$pf\"");
+ }
}
}
-($project_name ne "") || &tmake_usage();
+&tmake_verb("Version $TMAKE_VERSION (runtime environment: " .
+ ($really_unix ? "Unix" : "Win32") . ")\n" );
-if ( $guess_os && ! check_unix() ) { # probably non-Unix,
- $is_unix = 0;
- &tmake_verb("Win32 detected");
-}
-if ( ! $is_unix ) {
- $obj_ext = "obj";
- $dir_sep = "\\";
-}
-$outfile eq "" || open(STDOUT,">" . fix_path($outfile)) ||
- &tmake_error("Can't create \"$outfile\"");
-
-%project = ();
-&ScanProject( &find_template("tmake.conf") );
-&tmake_verb("Reading the project file $project_name");
-if ( ! ($project_name =~ /\.pro$/i) && -f fix_path($project_name . ".pro") ) {
- $project_name .= ".pro";
-}
-$project{"PROJECT"} = $project_name;
-$project{"PROJECT"} =~ s/\.pro$//i;
-$project{"TARGET"} = $project{"PROJECT"};
-
-unshift(@project_files,$project_name);
-foreach ( @project_files ) {
- if ( ! ($_ =~ /\.pro$/i) && -f fix_path($_ . ".pro") ) {
- $_ .= ".pro";
- }
- if ( !&ScanProject($_) ) {
- &tmake_error("Can't open project file \"$_\"");
- }
+if ( $eval_quit ) {
+ &tmake_verb("Done!");
+ exit 0;
}
-&Project( @project_extra );
+($project_name eq "") && &tmake_usage();
if ( $template_name eq "" ) {
$template_name = $project{"TEMPLATE"} ?
$project{"TEMPLATE"} : "default.t";
}
-
-foreach ( @eval_expr ) {
- $text = "";
- eval( $_ );
- die $@ if $@;
- print $text . "\n" if ($text ne "");
- $eval_done = 1;
-}
-if ( $eval_done ) {
- &tmake_verb("Done!");
- exit 0;
-}
-
$template_name = &find_template($template_name);
&IncludeTemplate($template_name);
&tmake_verb("Done!");
@@ -159,12 +177,11 @@ exit 0; # finished!
#
sub tmake_usage {
- print STDERR "Usage:\n tmake [options] project-file\n";
+ print STDERR "Usage:\n tmake [options] project-files\n";
print STDERR "Options:\n";
print STDERR " -e expr Evaluate expression, ignore template file\n";
print STDERR " -nodepend Don't generate dependency information\n";
print STDERR " -o file Write output to file\n";
- print STDERR " -p project Load additional project file\n";
print STDERR " -t file Specify a template file\n";
print STDERR " -unix Create output for Unix (auto detects)\n";
print STDERR " -v Verbose/debug mode\n";
@@ -187,6 +204,18 @@ sub tmake_error {
#
+# tmake_warning(msg)
+#
+# Prints the warning message
+#
+
+sub tmake_warning {
+ my($msg) = @_;
+ print STDERR "tmake warning: " . $msg . "\n";
+}
+
+
+#
# tmake_verb()
#
# Prints a verbose message
@@ -207,10 +236,14 @@ sub tmake_verb {
sub check_unix {
my($r);
$r = 0;
- if ( -f "/bin/uname" || -f "/usr/bin/uname" ) {
+ if ( -f "/bin/uname" ) {
$r = 1;
(-f "\\bin\\uname") && ($r = 0);
}
+ if ( -f "/usr/bin/uname" ) {
+ $r = 1;
+ (-f "\\usr\\bin\\uname") && ($r = 0);
+ }
return $r;
}
@@ -232,8 +265,9 @@ sub find_template {
} else {
$tb = $template_base . ";";
}
- $d = ";" . $tb . $ENV{"TMAKEPATH"} . ";" . $ENV{"HOME"} . "/.tmake/";
- @dirs = &split_path( $d );
+ $d = $tb . $project{"TMAKEPATH"};
+ @dirs = ("");
+ push @dirs, &split_path( $d );
$filename .= ".t" unless ($filename =~ /\.\w+$/);
for $d ( @dirs ) {
$p = $d . $filename;
@@ -267,9 +301,15 @@ sub StdInit {
$stdinit_done = 1;
if ( defined($project{"OBJECTS_DIR"}) ) {
$project{"OBJECTS_DIR"} = FixPath($project{"OBJECTS_DIR"});
+ &mkdirp($project{"OBJECTS_DIR"},0777);
}
if ( defined($project{"MOC_DIR"}) ) {
$project{"MOC_DIR"} = FixPath($project{"MOC_DIR"});
+ &mkdirp($project{"MOC_DIR"},0777);
+ }
+ if ( defined($project{"DESTDIR"}) ) {
+ $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
+ &mkdirp($project{"DESTDIR"},0777);
}
$project{"OBJECTS"} = &Objects($project{"SOURCES"});
if ( $moc_aware ) {
@@ -347,18 +387,16 @@ sub Now {
#
-# expand_project_val(tag)
+# expand_project_var(var)
#
# Internal function for Project().
# Expands a project value string.
#
-sub expand_project_val {
+sub expand_project_var {
my($v) = @_;
my($c);
return "" if !defined($v);
- $v =~ s/^\s+//; # trim white space
- $v =~ s/\s+$//;
$c = 0;
while ( $c < 100 ) { # expand $$
if ( $v =~ s/(\$\$\w+)/\035/ ) {
@@ -415,27 +453,33 @@ sub expand_project_val {
sub Project {
my @settings = @_;
- my($r,$if_tag,$t,$s,$v,$p,$c);
+ my($r,$if_var,$t,$s,$v,$p,$c);
$r = "";
foreach ( @settings ) {
$v = $_;
- if ( $v =~ s/^\s*((?:[^:]*?:)?)(\w+)\s*(\+=|\*=|\-=|\/=|=)\s*// ) {
- $if_tag = $1;
- if ( $if_tag ne "" ) {
- chop $if_tag;
- if ( $if_tag eq "unix" ) {
+ if ( $v =~ s/^\s*((?:[^:\s]*?:)?)(\w+)\s*(\+=|\*=|\-=|\/=|=)// ) {
+ $if_var = $1;
+ if ( $if_var ne "" ) {
+ chop $if_var;
+ if ( $if_var eq "unix" ) {
return "" if !$is_unix;
- } elsif ( $if_tag eq "win32" ) {
+ } elsif ( $if_var eq "win32" ) {
return "" if $is_unix;
- } elsif ( ($if_tag ne $tmake_platform) && !Config($if_tag) ) {
+ } elsif ( ($if_var ne $tmake_platform) && !Config($if_var) ) {
return "";
}
}
$t = $2;
$s = $3;
- $v = expand_project_val($v);
+ if ( ! $notrim_whitespace ) {
+ $v =~ s/^\s+//; # trim white space
+ $v =~ s/\s+$//;
+ }
+ $v = expand_project_var($v);
$p = $project{$t};
- if ( $s eq "=" ) { # set variable
+ if ( $s ne "=" && $v eq "" ) {
+ # nothing to append, subtract or sed
+ } elsif ( $s eq "=" ) { # set variable
$p = $v;
} elsif ( $s eq "+=" ) { # append
if ( $p eq "" ) {
@@ -457,9 +501,9 @@ sub Project {
$cmd = '$p =~ ' . $v;
eval $cmd;
}
- $project{$t} = expand_project_val($p);
+ $project{$t} = expand_project_var($p);
} else {
- $p = expand_project_val($project{$v});
+ $p = expand_project_var($project{$v});
}
if ( $p ne "" ) {
$r = ($r eq "") ? $p : ($r . " " . $p);
@@ -480,7 +524,7 @@ sub Project {
sub Substitute {
my($subst) = @_;
- $text = expand_project_val($subst);
+ $text = expand_project_var($subst);
return $text;
}
@@ -494,28 +538,50 @@ sub Substitute {
sub ScanProject {
my($file) = @_;
- my($tag,$var,@v,$more,$line);
+ my($var,$val,@v,$more,$line,$endmark);
- $tag = "";
+ $var = "";
$line = 0;
open(TMP,fix_path($file)) || return 0;
+ &tmake_verb("Reading the project file $file");
while ( <TMP> ) {
$line++;
s/\#.*//; # strip comment
s/^\s+//; # strip white space
s/\s+$//;
- if ( /^\s*((?:(?:[^:]*?:)?)\w+\s*(\+|\-|\*|\/)?=)/ ) {
- $tag = $1; # tag also contains the ".="
+ if ( /^\s*((?:(?:[^:\s]*?:)?)\w+\s*(\+|\-|\*|\/)?=)/ ) {
+ $var = $1; # var also contains the ".="
s/^.*?=\s*//;
+ if ( /^\<\<(.*)$/ ) {
+ $endmark = $1;
+ $val = "";
+ while ( <TMP> ) {
+ $line++;
+ if ( /^\Q$endmark\E$/ ) {
+ $endmark = "";
+ last;
+ }
+ $val .= $_;
+ }
+ if ( $endmark ne "" ) {
+ tmake_error("$file:$line: End marker $endmark not found");
+ }
+ chop $val if ( $val ne "" );
+ $notrim_whitespace++;
+ Project( $var . $val );
+ $notrim_whitespace--;
+ $var = "";
+ $_ = "";
+ }
}
- if ( $tag ne "" ) {
+ if ( $var ne "" ) {
$more = ( $_ =~ s/\s*\\\s*$// ); # more if \ at end of line
push( @v, split( /\s+/, $_ ) );
if ( ! $more ) {
- $var = join(" ",@v);
- Project( $tag . $var );
- $tag = "";
+ $val = join(" ",@v);
+ Project( $var . $val );
+ $var = "";
@v = ();
}
} elsif ( $_ ne "" ) {
@@ -523,6 +589,7 @@ sub ScanProject {
}
}
close(TMP);
+ &tmake_verb("Done reading the project file $file");
return 1;
}
@@ -601,15 +668,15 @@ sub IncludeTemplate {
#
-# Expand(tag) - appends to $text
+# Expand(var) - appends to $text
#
# Expands a list of $project{} variables with a space character between them.
#
sub Expand {
- my @tags = @_;
+ my @vars = @_;
my($t);
- $t = Project(@tags);
+ $t = Project(@vars);
if ( $text eq "" ) {
$text = $t;
} elsif ( $t ne "" ) {
@@ -620,13 +687,13 @@ sub Expand {
#
-# ExpandGlue(tag,prepend,glue,append) - appends to $text
+# ExpandGlue(var,prepend,glue,append) - appends to $text
#
-# Expands a $project{} tag, splits on whitespace
+# Expands a $project{} variable, splits on whitespace
# and joins with $glue. $prepend is put at the start
# of the string and $append is put at the end of the
# string. The resulting string becomes "" if the project
-# tag is empty or not defined.
+# var is empty or not defined.
#
# Example:
#
@@ -640,9 +707,9 @@ sub Expand {
#
sub ExpandGlue {
- my($tag,$prepend,$glue,$append) = @_;
+ my($var,$prepend,$glue,$append) = @_;
my($t,$v);
- $v = Project($tag);
+ $v = Project($var);
if ( $v eq "" ) {
$t = "";
} else {
@@ -658,14 +725,67 @@ sub ExpandGlue {
#
-# ExpandList(tag) - sets $text.
+# ExpandList(var) - sets $text.
#
# Suitable for expanding HEADERS = ... etc. in a Makefile
#
sub ExpandList {
- my($tag) = @_;
- return ExpandGlue($tag,""," ${linebreak}\n\t\t","");
+ my($var) = @_;
+ return ExpandGlue($var,""," ${linebreak}\n\t\t","");
+}
+
+
+#
+# ExpandPath(var,prepend,glue,append) - appends to $text
+#
+# Expands a $project{} variable, splits on either ';' or
+# whitespace and joins with $glue. $prepend is put at the
+# start of the string and $append is put at the end of the
+# string. The resulting string becomes "" if the project
+# variable is empty or not defined.
+#
+# If the variable contains at least one semicolon or tmake
+# is running on Windows, the resulting items are put in
+# double-quotes.
+#
+# Example:
+#
+# The project file defines:
+# INCLUDEPATH = "C:\qt\include;c:\program files\msdev\include
+#
+# ExpandGlue("INCLUDEPATH","-I","-I","")
+#
+# The result:
+# $text = -I"c:\qt\include" -I"c:\program files\msdev\include"
+#
+
+sub ExpandPath {
+ my($var,$prepend,$glue,$append) = @_;
+ my($t,$v);
+ my($s);
+ $v = Project($var);
+ if ( $v eq "" ) {
+ $t = "";
+ } else {
+ if ( $v =~ /;/ || !$is_unix ) {
+ $prepend .= '"';
+ $glue = '"' . $glue . '"';
+ $append = '"' . $append;
+ }
+
+ if ( $v =~ /;/ ) {
+ $t = $prepend . join($glue,split(/;+/,$v)) . $append;
+ } else {
+ $t = $prepend . join($glue,split(/\s+/,$v)) . $append;
+ }
+ }
+ if ( $text eq "" ) {
+ $text = $t;
+ } elsif ( $t ne "" ) {
+ $text .= " " . $t;
+ }
+ return $text;
}
@@ -859,11 +979,18 @@ sub AddIncludePath {
return;
}
$project{"INCLUDEPATH"} = "" if !defined($project{"INCLUDEPATH"});
+ if ( !defined($project{"INCPATH_SEP"}) ) {
+ if ( $project{"INCLUDEPATH"} =~ /;/ ) {
+ $project{"INCPATH_SEP"} = ";";
+ } else {
+ $project{"INCPATH_SEP"} = " ";
+ }
+ }
$p = $project{"INCLUDEPATH"};
$p = ($p && $path) ? ($p . ";" . $path) : ($p . $path);
$project{"INCLUDEPATH"} = $p;
- $p = join(" ",&split_path($p));
- $p =~ s=[\\/](\s|$)= =g;
+ $p = join($project{"INCPATH_SEP"},&split_path($p));
+ $p =~ s=[\\/]($project{"INCPATH_SEP"}|$)=$project{"INCPATH_SEP"}=g;
$project{"INCPATH"} = $p;
}
@@ -887,7 +1014,7 @@ sub FindHighestLibVersion {
$highest = "";
@files = find_files($dir,"${name}.*\.lib");
for $f ( @files ) {
- if ( $f =~ /(\d+)\.lib/ ) {
+ if ( $f =~ /(\d+)\.lib/i ) {
$v = $1;
if ( $highest eq "" || $v > $highest ) {
$highest = $v;
@@ -971,7 +1098,7 @@ sub make_depend {
@cur_dep_path = @dep_path;
if ( $file =~ /(.*[\/\\])/ ) {
$dep_curdir = $1;
- splice( @cur_dep_path, 0, 0, $dep_curdir );
+ push @cur_dep_path, $dep_curdir;
} else {
$dep_curdir = "";
}
@@ -1032,7 +1159,7 @@ sub canonical_dep {
sub scan_dep {
my($file) = @_;
my($dir,$path,$found,@allincs,@includes,%incs);
- $path = ($file eq $dep_file) ? $file : $dep_curdir . $file;
+ $path = $file;
@includes = ();
return @includes if $file =~ /\.$moc_ext$/; # avoid .moc files
if ( ! (-f fix_path($path)) ) {
@@ -1072,13 +1199,24 @@ sub scan_dep {
sub split_path {
my($p) = @_;
- return "" if !defined($p);
+ my($s,@d);
+ @d = ();
+ return @d if !defined($p) || $p eq "";
$p =~ s=:=;=g if $is_unix;
$p =~ s=[/\\]+=/=g;
- $p =~ s=([^/:]);=$1/;=g;
- $p =~ s=([^:;/])$=$1/=;
- $p =~ s=/=$dir_sep=g unless $is_unix;
- return split(/;/,$p);
+ if ( !($p =~ /;/) ) {
+ $p =~ s/\s+/;/g;
+ }
+ $p =~ s/\s*;\s*/;/g;
+ while( $p =~ /(?:(?:[^\"\;][^\;]*;*)|(?:\"[^\"]*\";*))/g ) {
+ $s = $&;
+ $s =~ s=\"==g;
+ $s =~ s=[\s\;]+$==g;
+ $s =~ s=([^/:])$=$1/=g;
+ $s =~ s=/=$dir_sep=g unless $is_unix;
+ push @d, $s;
+ }
+ return @d;
}
@@ -1097,3 +1235,28 @@ sub fix_path {
}
return $p;
}
+
+
+#
+# mkdirp(filename,mode) - Internal for StdInit()
+#
+# Creates the directory specified by $filename, with permissions
+# specified by mode (as modified by umask). Recursively calls
+# mkdir, similar to 'mkdir -p'.
+#
+
+sub mkdirp {
+ my($filename,$mode) = @_;
+ if ( $filename =~ /\$\(\w+\)/ ) { # ignore "$(something)"
+ return 0;
+ }
+ $filename =~ s-[\\:/]+-/-g;
+ if ( -d $filename ) {
+ return 1;
+ }
+ $filename =~ m-^((.*)/)?(.*)-;
+ if ( defined($2) && ! mkdirp($2,$mode) ) {
+ return 0;
+ }
+ return mkdir($filename,$mode);
+}
diff --git a/tmake/bin/tmake.bat b/tmake/bin/tmake.bat
deleted file mode 100644
index 6fbd6b2..0000000
--- a/tmake/bin/tmake.bat
+++ /dev/null
@@ -1,1093 +0,0 @@
-@rem = '--*-PERL-*--';
-@rem = '
-@echo off
-rem setlocal
-set ARGS=
-:loop
-if .%1==. goto endloop
-set ARGS=%ARGS% %1
-shift
-goto loop
-:endloop
-rem ***** This assumes PERL is in the PATH *****
-perl.exe -S tmake.bat %ARGS%
-goto endofperl
-@rem ';
-#!/usr/bin/perl
-############################################################################
-# $Id$
-#
-# Creates a Makefile from a template and a project file.
-#
-# Copyright (C) 1996-1998 by Troll Tech AS. All rights reserved.
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted, provided
-# that this copyright notice appears in all copies.
-# No representations are made about the suitability of this software for any
-# purpose. It is provided "as is" without express or implied warranty.
-#
-#
-# Some important, global variables in tmake:
-# cpp_ext C++ extension added to moc output (.cpp)
-# obj_ext Object file extension (.o on Unix, .obj otherwise)
-# moc_aware Will scan for files containing Qt signals/slots
-# moc_pre Moc prefix for generated moc file: x.h -> moc_x.cpp
-# moc_ext Moc extension for generated moc file: x.cpp -> x.moc
-# moc_cmd The moc command in your makefile, $(MOC)
-# linebreak Line break character (\)
-# dir_sep Directory separator (/ on Unix, \ on Windows)
-# is_unix Autodetected. If not Unix, assume Windows (Win32).
-#
-# If you need to customize any of these settings, do it before
-# calling StdInit() in the template file.
-#
-############################################################################
-
-if ($] < 5.0) {
- &tmake_error("This program requires perl version 5 or newer");
-}
-
-$cpp_ext = "cpp";
-$obj_ext = "o";
-$moc_aware = 0;
-$moc_pre = "moc_";
-$moc_ext = "moc";
-$moc_cmd = '$(MOC)';
-$linebreak = "\\";
-$dir_sep = "/";
-$is_unix = 1;
-$really_unix = &check_unix();
-$guess_os = 1;
-$depend_path = "";
-$nodepend = 0;
-$output_count = 0;
-
-$template_name = "";
-$project_name = "";
-$outfile = "";
-@project_extra = ();
-@project_files = ();
-@eval_expr = ();
-$eval_done = 0;
-
-while ( @ARGV ) { # parse command line args
- $_ = shift @ARGV;
- if ( s/^-// ) {
- if ( /^e(.*)/ ) {
- push( @eval_expr, ($1 eq "") ? shift @ARGV : $1);
- } elsif ( /^t(.*)/ ) {
- $template_name = ($1 eq "") ? shift @ARGV : $1;
- } elsif ( /^o(.*)/ ) {
- $outfile = ($1 eq "") ? shift @ARGV : $1;
- ($outfile eq "-") && ($outfile = "");
- } elsif ( /^p(.*)/ ) {
- push( @project_files, ($1 eq "") ? shift @ARGV : $1);
- } elsif ( /^unix$/ ) {
- $guess_os = 0;
- $is_unix = 1;
- } elsif ( /^win32$/ ) {
- $guess_os = 0;
- $is_unix = 0;
- } elsif ( /^nodepend$/ ) {
- $nodepend = 1; # don't generate dependencies
- } elsif ( /^v$/ ) {
- $verbose = 1;
- } else {
- &tmake_usage();
- }
- } elsif ( /^\s*(?:[\w\-]+:)?\w+\s*[\+\-\*\/]?=/ ) { # project override
- push( @project_extra, $_ );
- } else {
- $project_name &&
- &tmake_error("You can only specify one project file");
- $project_name = $_;
- }
-}
-
-($project_name ne "") || &tmake_usage();
-
-if ( $guess_os && ! check_unix() ) { # probably non-Unix,
- $is_unix = 0;
- &tmake_verb("Win32 detected");
-}
-if ( ! $is_unix ) {
- $obj_ext = "obj";
- $dir_sep = "\\";
-}
-$outfile eq "" || open(STDOUT,">" . fix_path($outfile)) ||
- &tmake_error("Can't create \"$outfile\"");
-
-%project = ();
-&ScanProject( &find_template("tmake.conf") );
-&tmake_verb("Reading the project file $project_name");
-if ( ! ($project_name =~ /\.pro$/i) && -f fix_path($project_name . ".pro") ) {
- $project_name .= ".pro";
-}
-$project{"PROJECT"} = $project_name;
-$project{"PROJECT"} =~ s/\.pro$//i;
-$project{"TARGET"} = $project{"PROJECT"};
-
-unshift(@project_files,$project_name);
-foreach ( @project_files ) {
- if ( ! ($_ =~ /\.pro$/i) && -f fix_path($_ . ".pro") ) {
- $_ .= ".pro";
- }
- if ( !&ScanProject($_) ) {
- &tmake_error("Can't open project file \"$_\"");
- }
-}
-&Project( @project_extra );
-
-if ( $template_name eq "" ) {
- $template_name = $project{"TEMPLATE"} ?
- $project{"TEMPLATE"} : "default.t";
-}
-
-foreach ( @eval_expr ) {
- $text = "";
- eval( $_ );
- die $@ if $@;
- print $text . "\n" if ($text ne "");
- $eval_done = 1;
-}
-if ( $eval_done ) {
- &tmake_verb("Done!");
- exit 0;
-}
-
-$template_name = &find_template($template_name);
-&IncludeTemplate($template_name);
-&tmake_verb("Done!");
-exit 0; # finished!
-
-
-
-##############################################################################
-# Subroutines from here
-##############################################################################
-
-#
-# tmake_usage()
-#
-# Prints a message about program usage and exits
-#
-
-sub tmake_usage {
- print STDERR "Usage:\n tmake [options] project-file\n";
- print STDERR "Options:\n";
- print STDERR " -e expr Evaluate expression, ignore template file\n";
- print STDERR " -nodepend Don't generate dependency information\n";
- print STDERR " -o file Write output to file\n";
- print STDERR " -p project Load additional project file\n";
- print STDERR " -t file Specify a template file\n";
- print STDERR " -unix Create output for Unix (auto detects)\n";
- print STDERR " -v Verbose/debug mode\n";
- print STDERR " -win32 Create output for Win32 (auto detects)\n";
- exit 1;
-}
-
-
-#
-# tmake_error(msg)
-#
-# Prints the message and exits
-#
-
-sub tmake_error {
- my($msg) = @_;
- print STDERR "tmake error: " . $msg . "\n";
- exit 1;
-}
-
-
-#
-# tmake_verb()
-#
-# Prints a verbose message
-#
-
-sub tmake_verb {
- my($msg) = @_;
- $verbose && print STDERR "tmake: " . $msg . "\n";
-}
-
-
-#
-# check_unix()
-#
-# Returns 1 if this is a Unix, 0 otherwise.
-#
-
-sub check_unix {
- my($r);
- $r = 0;
- if ( -f "/bin/uname" ) {
- $r = 1;
- (-f "\\bin\\uname") && ($r = 0);
- }
- return $r;
-}
-
-
-#
-# find_template(filename)
-#
-# Looks for the template file.
-# 1. search the current directory
-# 2. search the directories in TMAKEPATH
-# 3. search in $HOME/.tmake
-#
-
-sub find_template {
- my($filename) = @_;
- my($tb,$d,$p,@dirs);
- $tb = ($template_base eq "") ? "" : $template_base . ";";
- $d = ";" . $tb . $ENV{"TMAKEPATH"} . ";" . $ENV{"HOME"} . "/.tmake/";
- @dirs = &split_path( $d );
- $filename .= ".t" unless ($filename =~ /\.\w+$/);
- for $d ( @dirs ) {
- $p = $d . $filename;
- if ( -f fix_path($p) ) {
- if ( $filename eq "tmake.conf" ) {
- $tmake_platform = $d;
- $tmake_platform =~ s-.*[/\\]([^/\\]*)[/\\]-$1-;
- &tmake_verb("Detected platform $tmake_platform");
- }
- return $p;
- }
- return ($d . $filename) if ( -f fix_path($d . $filename) );
- }
- &tmake_error("Template file " . $filename . " not found");
-}
-
-
-##############################################################################
-# User functions
-##############################################################################
-
-#
-# StdInit()
-#
-# Standard initialization
-#
-
-sub StdInit {
- my($p);
- return if $stdinit_done;
- $stdinit_done = 1;
- if ( defined($project{"OBJECTS_DIR"}) ) {
- $project{"OBJECTS_DIR"} = FixPath($project{"OBJECTS_DIR"});
- }
- if ( defined($project{"MOC_DIR"}) ) {
- $project{"MOC_DIR"} = FixPath($project{"MOC_DIR"});
- }
- $project{"OBJECTS"} = &Objects($project{"SOURCES"});
- if ( $moc_aware ) {
- $project{"_HDRMOC"} = &list_moc($project{"HEADERS"},$moc_pre,$cpp_ext);
- $project{"_SRCMOC"} = &list_moc($project{"SOURCES"},"",$moc_ext);
- $project{"OBJMOC"} = &Objects($project{"_HDRMOC"});
- $p = $project{"_HDRMOC"} . " " . $project{"_SRCMOC"};
- $p =~ s/(^\s+|\s+$)//g;
- $project{"SRCMOC"} = $p;
- }
- &AddIncludePath("");
-}
-
-
-sub FixPath {
- my($p) = @_;
- if ( $p eq "." ) { $p = ""; }
- elsif ( length($p) > 0 ) {
- $p .= $dir_sep;
- $p =~ s-[\\/]+-${dir_sep}-g;
- }
- return $p;
-}
-
-
-#
-# Config(name)
-#
-# Returns true if the project variable CONFIG contains the
-# configuration name.
-#
-
-sub Config {
- my($name) = @_;
- return $project{"CONFIG"} =~ /\b$name\b/;
-}
-
-
-#
-# DisableOutput()
-#
-# Disables tmake output. Must be restored by calling a corresponding
-# EnableOutput().
-#
-
-sub DisableOutput {
- $output_count++;
-}
-
-
-#
-# EnableOutput()
-#
-# Enables tmake output again after DisableOutput() has been called.
-#
-
-sub EnableOutput {
- $output_count--;
-}
-
-
-#
-# Now() - sets $text
-#
-# Sets $text to the current date and time.
-#
-
-sub Now {
- my($sec,$min,$hour,$mday,$mon,$year);
- ($sec,$min,$hour,$mday,$mon,$year) = localtime(time());
- $text = sprintf("%02d:%02d, %4d/%02d/%02d",
- $hour, $min, 1900+$year, 1+$mon, $mday);
-}
-
-
-#
-# expand_project_val(tag)
-#
-# Internal function for Project().
-# Expands a project value string.
-#
-
-sub expand_project_val {
- my($v) = @_;
- my($c);
- $v =~ s/^\s+//; # trim white space
- $v =~ s/\s+$//;
- $c = 0;
- while ( $c < 100 ) { # expand $$
- if ( $v =~ s/(\$\$\w+)/\035/ ) {
- $_ = $1;
- s/\$\$//g;
- $v =~ s/\035/$project{$_}/g;
- $c++;
- } else {
- $c = 100;
- }
- }
- return $v;
-}
-
-
-#
-# Project(strings)
-#
-# This is a powerful function for setting or reading project variables.
-# Returns the resulting project variables (joined with space between).
-#
-# Get a project variable:
-# $s = Project("TEMPLATE"); -> $s = "TEMPLATE"
-#
-# Set a project variable:
-# Project("TEMPLATE = lib"); -> TEMPLATE = lib
-# Project("CONFIG =";) -> CONFIG empty
-#
-# Append to a project variable:
-# Project("CONFIG = qt"); -> CONFIG = qt
-# Project("CONFIG += debug"); -> CONFIG = qt debug
-#
-# Append to a project variable if it does not contain the value already:
-# Project("CONFIG = qt release"); -> CONFIG = qt release
-# Project("CONFIG *= qt"); -> CONFIG = qt release
-# Project("CONFIG *= opengl"); -> CONFIG = qt release opengl
-#
-# Subtract from a project variable:
-# Project("THINGS = abc xyz"); -> THINGS = abc xyz
-# Project("THINGS -= abc"); -> THINGS = xyz
-#
-# Search/replace on a project variable:
-# Project("CONFIG = tq opengl"); -> CONFIG = tq opengl
-# Project("CONFIG /= s/tq/qt/"); -> CONFIG = qt opengl
-#
-# The operations can be performed on several project variables at a time.
-#
-# Project("TEMPLATE = app", "CONFIG *= opengl", "THINGS += klm");
-#
-
-sub Project {
- my @settings = @_;
- my($r,$if_tag,$t,$s,$v,$p,$c);
- $r = "";
- foreach ( @settings ) {
- $v = $_;
- if ( $v =~ s/^\s*([\w\-]+:)?(\w+)\s*(\+=|\*=|\-=|\/=|=)\s*// ) {
- $if_tag = $1;
- if ( $if_tag ne "" ) {
- chop $if_tag;
- if ( $if_tag eq "unix" ) {
- return "" if !$is_unix;
- } elsif ( $if_tag eq "win32" ) {
- return "" if $is_unix;
- } elsif ( ($if_tag ne $tmake_platform) && !Config($if_tag) ) {
- return "";
- }
- }
- $t = $2;
- $s = $3;
- $v = expand_project_val($v);
- $p = $project{$t};
- if ( $s eq "=" ) { # set variable
- $p = $v;
- } elsif ( $s eq "+=" ) { # append
- if ( $p eq "" ) {
- $p = $v;
- } else {
- $p .= " " . $v;
- }
- } elsif ( $s eq "*=" ) { # append if not contained
- if ( !($p =~ /(?:^|\s)\Q$v\E(?:\s|$)/) ) {
- if ( $p eq "" ) {
- $p = $v;
- } else {
- $p .= " " . $v;
- }
- }
- } elsif ( $s eq "-=" ) { # subtract
- $p =~ s/$v//g;
- } elsif ( $s eq "/=" ) { # sed
- $cmd = '$p =~ ' . $v;
- eval $cmd;
- }
- $project{$t} = expand_project_val($p);
- } else {
- $p = expand_project_val($project{$v});
- }
- if ( $p ne "" ) {
- $r = ($r eq "") ? $p : ($r . " " . $p);
- }
- }
- return $r;
-}
-
-
-#
-# Substitute(string)
-#
-# This function substitutes project variables in a text.
-#
-# Example:
-# Substitute('The project name is "$$PROJECT"')
-#
-
-sub Substitute {
- my($subst) = @_;
- $text = expand_project_val($subst);
- return $text;
-}
-
-
-#
-# ScanProject(file)
-#
-# Scans a project file. Inserts project variables into the global
-# associative project array.
-#
-
-sub ScanProject {
- my($file) = @_;
- my($tag,$var,@v,$more,$line);
-
- $tag = "";
- $line = 0;
- open(TMP,fix_path($file)) || return 0;
-
- while ( <TMP> ) {
- $line++;
- s/\#.*//; # strip comment
- s/^\s+//; # strip white space
- s/\s+$//;
- if ( /^\s*((?:[\w\-]+:)?\w+\s*(\+|\-|\*|\/)?=)/ ) {
- $tag = $1; # tag also contains the ".="
- s/^.*?=\s*//;
- }
- if ( $tag ne "" ) {
- $more = ( $_ =~ s/\s*\\\s*$// ); # more if \ at end of line
- push( @v, split( /\s+/, $_ ) );
- if ( ! $more ) {
- $var = join(" ",@v);
- Project( $tag . $var );
- $tag = "";
- @v = ();
- }
- } elsif ( $_ ne "" ) {
- tmake_error("$file:$line: Syntax error");
- }
- }
- close(TMP);
- return 1;
-}
-
-
-#
-# IncludeTemplate(template_name)
-#
-# Includes and processes a template file.
-#
-# Below, we read the template file and executes any perl code found.
-# Perl code comes after "#$". The variable $text contains the text
-# to replace the perl code that was executed.
-# Template comments begin with "#!".
-#
-
-sub IncludeTemplate {
- my($t_name) = @_;
- my($cmd,$cmd_block,$cmd_end,$is_cmd_block,$saveline,$spaceonly);
- local($text);
- local(*T);
-
- $t_name = &find_template($t_name);
- if ( $tmake_template_dict{$t_name} ) {
- &tmake_error("Cyclic template inclusion for $t_name");
- } else {
- $tmake_template_dict{$t_name} = 1;
- }
- $template_base = $t_name;
- $template_base =~ s-(.*[/\\]).*-$1-;
- &tmake_verb("Reading the template $t_name");
- open(T,fix_path($t_name)) ||
- &tmake_error("Can't open template file \"$t_name\"");
-
- while ( <T> ) {
- if ( /\#\!/ ) { # tmake comment
- s/\s*\#\!.*//;
- next if /^$/;
- }
- if ( /\#\$(\{)?\s*(.*)\n/ ) { # code
- $cmd = $2;
- $is_cmd_block = ($1 eq "{");
- s/\#\$.*\n//;
- if ( $is_cmd_block ) { # code block #${ ...
- $saveline = $_;
- $cmd_block = $cmd;
- $cmd_end = 0;
- while ( <T> ) {
- $cmd = $_;
- $cmd =~ s/\s*\#\!.*//; # tmake comment
- if ( $cmd =~ /^\s*\#\$\}/ ) {
- $_ = "";
- $cmd_end = 1;
- last;
- }
- $cmd =~ s/^\s*\#(\$)?\s*//;
- $cmd_block .= $cmd;
- }
- $cmd_end || &tmake_error('#$} expected but not found');
- $cmd = $cmd_block;
- $_ = $saveline;
- }
- $spaceonly = /^\s*$/;
- $saveline = $_;
- &tmake_verb("Evaluate: $cmd");
- $text = "";
- eval $cmd;
- die $@ if $@;
- next if $spaceonly && ($text =~ /^\s*$/);
- print $saveline . $text . "\n" if $output_count <= 0;
- } else { # something else
- print if $output_count <= 0;
- }
- }
- close( T );
-}
-
-
-#
-# Expand(tag) - appends to $text
-#
-# Expands a list of $project{} variables with a space character between them.
-#
-
-sub Expand {
- my @tags = @_;
- my($t);
- $t = Project(@tags);
- if ( $text eq "" ) {
- $text = $t;
- } elsif ( $t ne "" ) {
- $text .= " " . $t;
- }
- return $text;
-}
-
-
-#
-# ExpandGlue(tag,prepend,glue,append) - appends to $text
-#
-# Expands a $project{} tag, splits on whitespace
-# and joins with $glue. $prepend is put at the start
-# of the string and $append is put at the end of the
-# string. The resulting string becomes "" if the project
-# tag is empty or not defined.
-#
-# Example:
-#
-# The project file defines:
-# SOURCES = a b c
-#
-# ExpandGlue("SOURCES","<","-",">")
-#
-# The result:
-# $text = "<a-b-c>"
-#
-
-sub ExpandGlue {
- my($tag,$prepend,$glue,$append) = @_;
- my($t,$v);
- $v = Project($tag);
- if ( $v eq "" ) {
- $t = "";
- } else {
- $t = $prepend . join($glue,split(/\s+/,$v)) . $append;
- }
- if ( $text eq "" ) {
- $text = $t;
- } elsif ( $t ne "" ) {
- $text .= " " . $t;
- }
- return $text;
-}
-
-
-#
-# ExpandList(tag) - sets $text.
-#
-# Suitable for expanding HEADERS = ... etc. in a Makefile
-#
-
-sub ExpandList {
- my($tag) = @_;
- return ExpandGlue($tag,""," ${linebreak}\n\t\t","");
-}
-
-
-#
-# TmakeSelf()
-#
-# Generates makefile rule to regenerate the makefile using tmake.
-#
-
-sub TmakeSelf {
- my $a = "tmake $project_name";
- if ( $nodepend ) {
- $a .= " -nodepend";
- }
- if ( $outfile ) {
- $text = "tmake: $outfile\n\n$outfile: $project_name\n\t";
- $a .= " -o $outfile";
- } else {
- $text = "tmake:\n\t";
- }
- $text .= $a
-}
-
-
-#
-# Objects(files)
-#
-# Replaces any extension with .o ($obj_ext).
-#
-
-sub Objects {
- local($_) = @_;
- my(@a);
- @a = split(/\s+/,$_);
- foreach ( @a ) {
- s-\.\w+$-.${obj_ext}-;
- if ( defined($project{"OBJECTS_DIR"}) ) {
- s-^.*[\\/]--;
- $_ = $project{"OBJECTS_DIR"} . $_;
- }
- }
- return join(" ",@a);
-}
-
-
-#
-# list_moc(files,prefix,extension)
-#
-# Scans all files and selects all files that contain Q_OBJECT.
-# Insert a prefix before the filename and replaces the filename extention.
-#
-
-sub list_moc {
- my($files,$pre,$ext) = @_;
- my(@v,@m,@lines,$contents,$n,$f,$t);
- @v = split(/\s+/,$files);
- undef $/;
- foreach $f ( @v ) {
- if ( open(TMP,fix_path($f)) ) {
- $contents = <TMP>;
- close(TMP);
- $n = 0;
- @lines = split(/\n/,$contents);
- grep( /tmake\s+ignore\s+Q_OBJECT/ && $n--, @lines );
- $contents =~ s-/\*.*?\*/--gs; # strip C/C++ comments
- $contents =~ s-//.*\n--g;
- @lines = split(/\n/,$contents);
- grep( /(^|\W)Q_OBJECT(\W|$)/ && $n++, @lines );
- if ( $n > 0 ) {
- $t = $f;
- $t =~ s-^(.*[/\\])?([^/\\]*?)\.(\w+)$-$1${pre}$2.${ext}-;
- if ( defined($project{"MOC_DIR"}) ) {
- $t =~ s-^.*[\\/]--;
- $t = $project{"MOC_DIR"} . $t;
- }
- $moc_output{$f} = $t;
- $moc_input{$t} = $f;
- push(@m,$t);
- }
- $contents = "";
- }
- }
- $/ = "\n";
- return join(" ",@m);
-}
-
-
-#
-# BuildObj(objects,sources)
-#
-# Builds the object files.
-#
-
-sub BuildObj {
- my($obj,$src) = @_;
- my(@objv,$srcv,$i,$s,$o,$d,$c);
- @objv = split(/\s+/,$obj);
- @srcv = split(/\s+/,$src);
- for $i ( 0..$#objv ) {
- $s = $srcv[$i];
- $o = $objv[$i];
- next if $s eq "";
- $text .= $o . ": " . $s;
- if ( $moc_output{$s} ne "" ) {
- $text .= " ${linebreak}\n\t\t" . $moc_output{$s};
- }
- $d = &make_depend($s);
- $text .= " ${linebreak}\n\t\t" . $d if $d ne "";
- if ( defined($project{"OBJECTS_DIR"}) ||
- !defined($project{"TMAKE_COMPILE_IMP"}) ) {
- $c = $project{"TMAKE_COMPILE"};
- $c =~ s/\$src/$s/;
- $c =~ s/\$obj/$o/;
- $text .= "\n\t$c";
- }
- $text .= "\n\n";
- }
- chop $text;
-}
-
-
-#
-# BuildMocObj(objects,sources)
-#
-# Builds the moc object files.
-#
-
-sub BuildMocObj {
- my($obj,$src) = @_;
- my(@objv,$srcv,$i,$s,$o,$hdr,$d);
- @objv = split(/\s+/,$obj);
- @srcv = split(/\s+/,$src);
- for $i ( 0..$#objv ) {
- $s = $srcv[$i];
- $o = $objv[$i];
- $hdr = $moc_input{$srcv[$i]};
- $text .= $o . ": " . $s . " ${linebreak}\n\t\t" . $hdr;
- $d = &make_depend($hdr);
- $text .= " ${linebreak}\n\t\t" . $d if $d ne "";
- if ( defined($project{"OBJECTS_DIR"}) || defined($project{"MOC_DIR"})||
- !defined($project{"TMAKE_COMPILE_IMP"}) ) {
- $c = $project{"TMAKE_COMPILE"};
- $c =~ s/\$src/$s/;
- $c =~ s/\$obj/$o/;
- $text .= "\n\t$c";
- }
- $text .= "\n\n";
- }
- chop $text;
-}
-
-
-#
-# BuildMocSrc(files)
-#
-# Builds the moc source files from headers and sources.
-#
-
-sub BuildMocSrc {
- my($f) = @_;
- my(@v,$m,$o);
- @v = split(/\s+/,$f);
- foreach $m ( @v ) {
- $o = $moc_output{$m};
- if ( $o ne "" ) {
- $text .= "$o: $m\n\t$moc_cmd $m -o $o\n\n";
- }
- }
- chop $text;
-}
-
-
-#
-# AddIncludePath(path)
-#
-# Adds path to the current include path, $project{"INCLUDEPATH"}.
-#
-
-sub AddIncludePath {
- my($path) = @_;
- my($p);
- if ( $project{"INCPATH"} &&
- ($project{"INCPATH"} =~ /(?:^|\s)\Q$path\E(?:\s|$)/) ) {
- return;
- }
- $p = $project{"INCLUDEPATH"};
- $p = ($p && $path) ? ($p . ";" . $path) : ($p . $path);
- $project{"INCLUDEPATH"} = $p;
- $p = join(" ",&split_path($p));
- $p =~ s=[\\/](\s|$)= =g;
- $project{"INCPATH"} = $p;
-}
-
-
-#
-# FindHighestLibVersion(dir,name)
-#
-# Returns the newest library version. Scans all the files in the specifies
-# directory and returns the highest version number.
-#
-# Used on Windows only.
-#
-# Example:
-# FindHighestLibVersion("c:\qt\lib","qt") returns "200" if
-# the c:\qt\lib directory contains qt141.lib and qt200.lib.
-#
-
-sub FindHighestLibVersion {
- my($dir,$name) = @_;
- my(@files,$f,$v,$highest);
- $highest = "";
- @files = find_files($dir,"${name}.*\.lib");
- for $f ( @files ) {
- if ( $f =~ /(\d+)\.lib/ ) {
- $v = $1;
- if ( $highest eq "" || $v > $highest ) {
- $highest = $v;
- }
- }
- }
- return $highest;
-}
-
-
-#
-# Finds files.
-#
-# Examples:
-# find_files("/usr","\.cpp$",1) - finds .cpp files in /usr and below
-# find_files("/tmp","^#",0) - finds #* files in /tmp
-#
-
-sub find_files {
- my($dir,$match,$descend) = @_;
- my($file,$p,@files);
- local(*D);
- $dir =~ s=\\=/=g;
- ($dir eq "") && ($dir = ".");
- if ( opendir(D,fix_path($dir)) ) {
- if ( $dir eq "." ) {
- $dir = "";
- } else {
- ($dir =~ /\/$/) || ($dir .= "/");
- }
- foreach $file ( readdir(D) ) {
- next if ( $file =~ /^\.\.?$/ );
- $p = $dir . $file;
- if ( $is_unix ) {
- ($file =~ /$match/) && (push @files, $p);
- } else {
- ($file =~ /$match/i) && (push @files, $p);
- }
- if ( $descend && -d $p && ! -l $p ) {
- push @files, &find_files($p,$match,$descend);
- }
- }
- closedir(D);
- }
- return @files;
-}
-
-
-#
-# make_depend(file)
-#
-# Returns a list of included files.
-# Uses the global $depend_path variable.
-#
-
-sub make_depend {
- my($file) = @_;
- my($i,$count);
- if ( $nodepend ) {
- return "";
- }
- if ( ! $depend_path_fixed ) {
- $depend_path_fixed = 1;
- $depend_path = $project{"DEPENDPATH"};
- $count = 0;
- while ( $count < 100 ) {
- if ( $depend_path =~ s/(\$[\{\(]?\w+[\}\)]?)/035/ ) {
- $_ = $1;
- s/[\$\{\}\(\)]//g;
- $depend_path =~ s/035/$ENV{$_}/g;
- } else {
- $count = 100;
- }
- }
- @dep_path = &split_path($depend_path);
- }
- @cur_dep_path = @dep_path;
- if ( $file =~ /(.*[\/\\])/ ) {
- $dep_curdir = $1;
- splice( @cur_dep_path, 0, 0, $dep_curdir );
- } else {
- $dep_curdir = "";
- }
- $dep_file = $file;
- &canonical_dep($file);
- %dep_dict = ();
- $i = &build_dep($file);
- chop $i;
- $i =~ s=/=$dir_sep=g unless $is_unix;
- $i =~ s=([a-zA-Z]):/=//$1/=g if $gnuwin32;
- return join(" ${linebreak}\n\t\t",split(/ /,$i) );
-}
-
-#
-# build_dep() - Internal for make_depend()
-#
-
-sub build_dep {
- my($file) = @_;
- my(@i,$a,$n);
- $a = "";
- return $a if !(defined $depend_dict{$file});
- @i = split(/ /,$depend_dict{$file});
- for $n ( @i ) {
- if ( !defined($dep_dict{$n}) && defined($full_path{$n}) ) {
- $dep_dict{$n} = 1;
- $a .= $full_path{$n} . " " . &build_dep($n);
- }
- }
- return $a;
-}
-
-#
-# canonical_dep(file) - Internal for make_depend()
-#
-# Reads the file and all included files recursively.
-# %depend_dict associates a file name to a list of included files.
-#
-
-sub canonical_dep {
- my($file) = @_;
- my(@inc,$i);
- @inc = &scan_dep($file);
- if ( @inc ) {
- $depend_dict{$file} = join(" ",@inc);
- for $i ( @inc ) {
- &canonical_dep($i) if !defined($depend_dict{$i});
- }
- }
-}
-
-#
-# scan_dep(file) - Internal for make_depend()
-#
-# Returns an array of included files.
-#
-
-sub scan_dep {
- my($file) = @_;
- my($dir,$path,$found,@allincs,@includes,%incs);
- $path = ($file eq $dep_file) ? $file : $dep_curdir . $file;
- @includes = ();
- return @includes if $file =~ /\.$moc_ext$/; # avoid .moc files
- if ( ! (-f fix_path($path)) ) {
- $found = 0;
- for $dir ( @cur_dep_path ) {
- $path = $dir . $file;
- last if ( $found = (-f fix_path($path)) );
- }
- return @includes if ! $found;
- }
- undef $/;
- if ( open(TMP,fix_path($path)) ) {
- $full_path{$file} = $path;
- $_ = <TMP>;
- s-/\*.*?\*/--gs; # strip C/C++ comments
- s-//.*\n-\n-g;
- @allincs = split(/\n/,$_);
- @allincs = grep(/^\s*#\s*include/,@allincs);
- foreach ( @allincs ) { # all #include lines
- next if !(/^\s*#\s*include\s+[<"]([^>"]*)[>"]/) || defined($incs{$1});
- push(@includes,$1);
- $incs{$1} = "1";
- }
- close(TMP);
- }
- $/ = "\n";
- return @includes;
-}
-
-
-#
-# split_path(path)
-#
-# Splits a path containing : (Unix) or ; (MSDOS, NT etc.) separators.
-# Returns an array.
-#
-
-sub split_path {
- my($p) = @_;
- $p =~ s=:=;=g if $is_unix;
- $p =~ s=[/\\]+=/=g;
- $p =~ s=([^/:]);=$1/;=g;
- $p =~ s=([^:;/])$=$1/=;
- $p =~ s=/=$dir_sep=g unless $is_unix;
- return split(/;/,$p);
-}
-
-
-#
-# fix_path(path)
-#
-# Converts all '\' to '/' if this really seems to be a Unix box.
-#
-
-sub fix_path {
- my($p) = @_;
- if ( $really_unix ) {
- $p =~ s-\\-/-g;
- } else {
- $p =~ s-/-\\-g;
- }
- return $p;
-}
-__END__
-:endofperl
diff --git a/tmake/doc/tmake.html b/tmake/doc/tmake.html
index b19af51..1b14809 100644
--- a/tmake/doc/tmake.html
+++ b/tmake/doc/tmake.html
@@ -1,52 +1,36 @@
<!doctype HTML public "-//W3C//DTD HTML 3.2//EN">
<html><head><title>
-tmake User's Guide
+User's Guide - tmake
</title></head><body bgcolor="#ffffff">
-<p><h1 align=center>tmake User's Guide</h1>
-
-
-<hr>
-<h2>License Statement</h2>
-
-Copyright (C) 1996-1998 by Troll Tech AS. All rights reserved.<p>
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, provided
-that this copyright notice appears in all copies.
-No representations are made about the suitability of this software for any
-purpose. It is provided "as is" without express or implied warranty.
+<p><h1 align=center>User's Guide - tmake</h1>
<hr>
<h2>Introduction</h2>
-tmake is an easy-to-use tool for creating and maintaining makefiles across
-many platforms and compilers. The idea is that you should spend your time
-writing code, not makefiles.
-
-<p>
-We wrote tmake because we spent too much time maintaining makefiles for
-Windows and Unix compilers. Being the developer of the multi-platform GUI
-toolkit <a href="http://www.troll.no/qt">Qt</a>, Troll Tech must provide
-Qt makefiles for more than 30 different OS/compiler combinations.
+tmake is an easy-to-use tool from Troll Tech to create and maintain
+makefiles for software projects. It can be a painful task to manage
+makefiles manually, especially if you develop for more than one platform
+or use more than one compiler. tmake automates and streamlines this
+process and lets you spend your valuable time on writing code, not
+makefiles.
<p>
-We looked at GNU autoconf, but it was Unix-specific and not flexible
-enough in our opinion. Our makefile system also had to deal with Qt
-<a href="http://www.troll.no/qt/metaobjects.html">meta object
-compiler</a> (moc) issues. The moc program extracts meta information from
-C++ files and generates a C++ file with data tables etc. It takes work to
-add makefile rules for the moc and wanted to automate this task.
+Our main motivation for developing tmake was that we spent far too much
+time maintaining makefiles for <a href="http://www.troll.no/qt">Qt</a>,
+our cross-platform GUI toolkit. Qt supports around 15 flavors of Unix,
+Microsoft Windows, and around 15 different C++ compilers. We looked at
+GNU autoconf, but it was Unix-specific and not flexible enough in our
+opinion. Our makefile system also had to deal with Qt <a
+href="http://www.troll.no/qt/metaobjects.html">meta object compiler</a>
+(moc) issues. The moc program extracts meta information from C++ files and
+generates a C++ file with data tables etc. It takes extra work to add
+makefile rules for the moc and wanted to automate this task.
<p>
-The tmake project was started around mid 1996 and version 1.0 was released
-in September 1997. It soon became a success and is now widely used among
-Qt programmers.
-
-<p>
-tmake is written in Perl and requires perl version 5 or newer. You do not
-need to be familiar with Perl programming to use tmake, but you should
-learn Perl if you want to write your own makefile templates.
+tmake is written in Perl and requires that you have installed perl version
+5 or newer. Basic use of tmake requires no perl knowledge, but if you know
+perl you can extend tmake and write your own makefile templates.
<p>
<b>Windows users:</b> The tmake distribution for Win32 includes tmake.exe
@@ -56,9 +40,14 @@ perl scripts. You can download perl for Win32 (Windows NT and 95) from <a
href="http://www.activestate.com">www.activestate.com</a>
<p>
-Feedback is highly appreciated. Contact the author hanord@troll.no if you
-have ideas, patches etc. for tmake.
+tmake is free software and you may use, copy, modify and distribute tmake
+and its documentation for any purpose and without any fee. See the
+LICENSE file for details.
+<p>
+Feedback is highly appreciated. Contact the author, Haavard Nord <a
+href="mailto:hanord@troll.no">(hanord@troll.no)</a>, if you have ideas,
+patches etc. for tmake.
<hr>
<h2>Installation</h2>
@@ -66,7 +55,7 @@ have ideas, patches etc. for tmake.
<ol>
<li>Make sure you have perl version 5 or later installed (optional
for Windows users).
-<li>Unpack the tmake tar.gz or zip archive.
+<li>Unpack the tmake tar.gz archive for Unix or the tmake .zip file for Windows.
<li>Set the TMAKEPATH environment variable to the directories
containing the template files (see below).
<li>Add the tmake/bin directory to your PATH.
@@ -84,14 +73,15 @@ Here are some examples:<p>
setenv PATH $PATH:/local/tmake/bin
</pre>
-<strong>Windows NT and Windows 95:</strong><pre>
+<strong>Microsoft Windows:</strong><pre>
set TMAKEPATH=c:\tmake\lib\win32-msvc
set PATH=%PATH%;c:\tmake\bin
</pre>
<p>
-The template directory name has the form <em>platform</em>-<em>compiler</em>.
-Each template directory contains template files and a configuration file.
+The template directory name has the form <em>platform</em>-<em>compiler</em>
+and contains a platform configuration file (tmake.conf) and tmake template
+files.
<p>
Supported platforms: AIX, Data General, FreeBSD, HPUX, SGI Irix, Linux,
@@ -99,8 +89,7 @@ NetBSD, OpenBSD, OSF1/DEC, SCO, Solaris, SunOS, Ultrix, Unixware and
Win32.
<p>
-Have a look at the tmake/lib directory to see if your platform-compiler
-combination is supported. If it's not there, please tell us.
+You can find your platform-compiler combination in the <tt>tmake/lib</tt>.
<p>
<b>Unix users:</b> tmake requires that perl is in /usr/bin. If your
@@ -114,7 +103,7 @@ make a small shell script which invokes tmake with the correct perl.
Let's assume you have a small Qt application consisting of one C++ header
file and two source files.
-First you need to create a project file, e.g. hello.pro:<pre>
+First you need to create a tmake project file, e.g. hello.pro:<pre>
HEADERS = hello.h
SOURCES = hello.cpp main.cpp
TARGET = hello
@@ -173,7 +162,7 @@ these files:
<p>
The hello.pro project file above does not have a <code>TEMPLATE</code> or
-a <code>CONFIG</code> tag. The default template is <tt>app</tt> (the .t
+a <code>CONFIG</code> variable. The default template is <tt>app</tt> (the .t
extension is optional) and the default configuration is <tt>qt warn_on
release</tt>.
@@ -191,7 +180,7 @@ above:<pre>
<h4>Makefile Configuration</h4>
<p>
-The <code>CONFIG</code> tag is recognized by both the app.t and lib.t
+The <code>CONFIG</code> variable is recognized by both the app.t and lib.t
templates and specifies what compiler options to use and which extra
libraries to link in.
@@ -247,7 +236,7 @@ These options defines the application/library type:
<td>&nbsp;</td>
<td>x11</td>
<td>&nbsp;</td>
- <td>The target is a X11 application (app.t only).</td>
+ <td>The target is a X11 application or library.</td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -265,7 +254,7 @@ These options defines the application/library type:
<td>&nbsp;</td>
<td>dll</td>
<td>&nbsp;</td>
- <td>The target is a shared object/DLL (app.t only).</td>
+ <td>The target is a shared object/DLL.</td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -283,7 +272,7 @@ read:<pre>
</pre>
<p>
-The most common tmake options and project tags are described here.
+The most common tmake options and project variables are described here.
See the tmake <a href="tmake_ref.html">reference manual</a> for
details.<p>
@@ -294,7 +283,7 @@ details.<p>
The application template, app.t, lets you compile and link executable
programs or shared objects (DLLs).
-This template recognizes several tags.
+This template recognizes several variabless.
<p>
<table border="0">
<tr>
@@ -372,10 +361,9 @@ The library template, lib.t, lets you compile and create static or shared
libraries.
<p>
-The lib.t template supports the same project tags as app.t, but also
+The lib.t template supports the same project variables as app.t, but also
<code>VERSION</code>. <code>VERSION</code> is the version number of the
-target library, e.g. 1.40. The version is important for Unix shared
-libraries, but ignored on Windows.
+target library, e.g. 1.40. The version is important for shared libraries.
@@ -383,7 +371,7 @@ libraries, but ignored on Windows.
The subdirs template, subdirs.t, lets you invoke make in subdirectories.
-<p>The <code>SUBDIRS</code> tag contains the name of all subdirectories to
+<p>The <code>SUBDIRS</code> variable contains the name of all subdirectories to
be processed.
@@ -418,29 +406,130 @@ template):<pre>
<hr>
-<h2><a name="usage"></a>Program Usage: tmake</h2>
+<h2>Project File Syntax</h2>
+
+The tmake project file has a very simple syntax. You may set
+project variables, append to project variables, remove from
+project variable and substitute project variables.
+
+To set a project variable:<pre>
+ HEADERS = gui.h xml.h url.h
+</pre>
+
+If you cannot fit everything on one line, use '\' to split it up:<pre>
+ HEADERS = gui.h \
+ xml.h \
+ url.h
+</pre>
+
+<p>
+Project variables contains lists of items (such as header files,
+compiler options etc.) and use whitespace to separate the items.
+This means that tmake cannot deal with items containing whitespace.
+The INCLUDEPATH variable is an exception. If INCLUDEPATH contains
+one or more semicolons (;), tmake uses the semicolon to separate
+the include directories, hence you can have include directories
+containing whitespace (this is quite common on Windows).
+
+<p>
+Here is an example:<pre>
+ INCLUDEPATH = C:\Program Files\DBLib\Include;C:\qt\include
+</pre>
+
+<p>
+tmake supports <em>project variable expension</em>. Use $$ to expand
+any project variable:<pre>
+ ALLFILES = $$HEADERS $$SOURCES
+</pre>
+
+<p>
+Most often you assign some value to a project variable, but you can
+also add to, remove from or replace parts of a project variable.<pre>
+ A = abc
+ X = xyz
+ A += def # A = abc def
+ X *= xyz # X = xyz
+ B = $$A # B = abc def
+ B -= abc # B = def
+ X /= s/y/Y/ # X = xYz
+</pre>
+The *= operation adds the value if the variable does not already contain it.
+The /= operation performs regular expression substitution.
+
+<p>
+You can also set variables from the command line when running the tmake
+program. For instance, if you want to generate a makefile with debug
+information:<pre>
+ tmake "CONFIG+=debug" hello.pro
+</pre>
+
+<p>
+Use the <tt>unix:</tt> or <tt>win32:</tt> (conditional) qualifier if you want a
+platform-specific variable:<pre>
+ SOURCES = common.cpp # common for all platforms
+ unix:SOURCES += unix.cpp # additional sources for Unix
+ win32:SOURCES += win32.cpp # additional sources for Windows
+ unix:LIBS += -lm # on Unix we need the math lib
+</pre>
+If none of the platforms match, tmake looks for the variable in CONFIG
+variable:<pre>
+ debug:SOURCES += dbgstuff.cpp # additional source for debugging
+</pre>
+
+Finally, you can set platform and compiler-dependent variables:<pre>
+ linux-g++:TMAKE_CFLAGS = -fno-rtti
+</pre>
+
+<p>
+You may define your own project variables to be used by custom templates. A
+project variable is stored in <code>%project</code>, which is an associative
+Perl array. Access it like this: <code>$project{"var"}</code> or via the
+function <code>Project("var")</code>. For example, after reading
+"hello.pro", <code>$project{"SOURCES"}</code> contains "hello.cpp
+main.cpp".<p>
+
+
+<hr>
+<h2><a name="usage"></a>Running tmake</h2>
Usage:<pre>
- tmake [options] <em>project-file</em>
+ tmake [options] <em>project files or project settings</em>
</pre>
Options:<pre>
-e expr Evaluate the Perl expression. Ignores the template file.
-nodepend Don't generate dependency information.
-o <em>file</em> Write output to <em>file</em> instead of stdout.
- -p <em>file</em> Load an additional project file.
-t <em>file</em> Specify a template <em>file</em>.
-unix Force tmake into Unix mode.
-v Verbose/debugging on.
-win32 Force tmake into Win32 mode.
</pre>
-The -t option overrides any <code>TEMPLATE</code> tag in the project file.
+The -t option overrides any <code>TEMPLATE</code> variable in the project file.
<p>
The default project file extension is ".pro". The default template file
extension is ".t". If you do not specify these extension tmake will
automatically add them for you.
+
+<p>
+Example of basic use:<pre>
+ tmake hello -o Makefile
+</pre>
+
+<p>
+Example of how to create a makefile with debugging information:<pre>
+ tmake "CONFIG+=debug" hello -o Makefile
+</pre>
+
<p>
+Exmaple of how to specify a TMAKEPATH:<pre>
+ tmake "TMAKEPATH=/local/tmake/lib/hpux-g++" hello.pro -o Makefile
+</pre>
+Example of how to evaluate a perl expression (print names of headers
+and source files):<pre>
+ tmake hello -e 'Expand("HEADERS","SOURCES")'
+</pre>
<hr>
<h2><a name="progen"></a>The progen Utility</h2>
@@ -478,12 +567,12 @@ settings in your project file:<pre>
solaris-cc:TMAKE_CC = /opt/bin/CC_5.0
solaris-cc:TMAKE_CFLAGS = -pts
unix:TMAKE_LIBS = -lXext
- win32:INCLUDE_PATH = c:\myinclude
+ win32:INCLUDEPATH = c:\myinclude
win32-borland:DEFINES = NO_BOOL
</pre>
-You can prefix a project tag with unix: or win32: to make it specific for
-either Unix or Windows. You can also prefix tags with
+You can prefix a project variable with unix: or win32: to make it specific for
+either Unix or Windows. You can also prefix a variable with
<em>platform-compiler</em>
<h4>Your Own Templates</h4>
@@ -496,10 +585,10 @@ can do with tmake. First you need to know how tmake works.
When you run tmake, it first reads the <tt>tmake.conf</tt> file.
This configuration file has the same syntax as the project file.
-tmake then reads the project file and sets the project tags it
+tmake then reads the project file and sets the project variables it
finds, e.g. <code>HEADERS</code>, <code>SOURCES</code> etc.
-All tags and values are stored in a global associative Perl hash
+All variables and values are stored in a global associative Perl hash
array called <code>project</code>. For example,
<code>$project{"SOURCES"}</code> contains "hello.cpp main.cpp"
after processing hello.pro.
diff --git a/tmake/doc/tmake_ref.html b/tmake/doc/tmake_ref.html
index 0b89b28..c9124c4 100644
--- a/tmake/doc/tmake_ref.html
+++ b/tmake/doc/tmake_ref.html
@@ -1,67 +1,11 @@
<!doctype HTML public "-//W3C//DTD HTML 3.2//EN">
<html><head><title>
-tmake Reference Manual
+Reference Manual - tmake
</title></head><body bgcolor="#ffffff">
-<p><h1 align=center>tmake Reference Manual</h1>
+<p><h1 align=center>Reference Manual - tmake</h1>
<hr>
-<h2>Project Settings</h2>
-
-tmake recognizes several project tags. The syntax for setting a
-project variable is:<pre>
- TAG = value
-</pre>
-You can also do tag expansion using $$:<pre>
- ALLFILES = Project files: $$HEADERS $$SOURCES
-</pre>
-Normally you assign to a tag, but you can also add to a tag, subtract
-from a tag or replace parts of the tag.<pre>
- A = abc
- X = xyz
- A += def # A = abc def
- X *= xyz # X = xyz
- B = $$A # B = abc def
- B -= abc # B = def
- X /= s/y/Y/ # X = xYz
-</pre>
-The *= operation adds the value if the tag does not already contain it.
-The /= operation performs regular expression substitution.
-
-<p>
-You can also set tags from the command line when running the tmake program.
-For instance, if you want to generate a makefile with debug information:<pre>
- tmake hello.pro "CONFIG+=debug"
-</pre>
-
-<p>
-Use the <tt>unix:</tt> or <tt>win32:</tt> qualifier if you want a
-platform-specific tag:<pre>
- SOURCES = common.cpp # common for all platforms
- unix:SOURCES += unix.cpp # additional sources for Unix
- win32:SOURCES += win32.cpp # additional sources for Windows
- unix:LIBS += -lm # on Unix we need the math lib
-</pre>
-If none of the platforms match, tmake looks for the tag in <a
-href="#CONFIG">CONFIG</a> setting:<pre>
- debug:SOURCES += dbgstuff.cpp # additional source for debugging
-</pre>
-
-Finally, you can set platform and compiler-dependent tags:<pre>
- linux-g++:TMAKE_CFLAGS = -fno-rtti
-</pre>
-
-<p>
-You may define your own project tags to be used by custom templates. A
-project tag is stored in <code>%project</code>, which is an associative
-Perl array. Access it like this: <code>$project{"tag"}</code> or via the
-function <code>Project('tag')</code>. For example, after reading
-"hello.pro", <code>$project{"SOURCES"}</code> contains "hello.cpp
-main.cpp". One limitation of tmake is that it cannot handle file names
-with white space.<p>
-
-
-<hr>
-<h2>Project Tag Reference</h2>
+<h2>Project Variable Reference</h2>
<h4><a name="ALL_DEPS"></a>ALL_DEPS</h4>
Specifies additional dependencies for the makefile target "all:".<p>
@@ -158,6 +102,12 @@ These options defines the application/library type:
</table>
+<h4><a name="DEFINES"></a>DEFINES</h4>
+Specifies C/C++ macros (-D compiler option). On Windows you need
+to let DEFINES contain "QT_DLL" if you are building a Qt program
+which should link with the Qt DLL.
+
+
<h4><a name="DEF_FILE"></a>DEF_FILE</h4>
Win32/app.t only: Specifies a .def file.
@@ -175,14 +125,14 @@ Defines the header files of the project.
<h4><a name="INCPATH"></a>INCPATH</h4>
-This tag is generated from <code>INCLUDEPATH</code>. The ';' or ':'
+This variable is generated from <code>INCLUDEPATH</code>. The ';' or ':'
separators have been replaced by ' ' (single space). This makes it
easier to split. qtapp.t and other templates expand
<code>INCPATH</code> to set -I options for the C++ compiler.
<h4><a name="INCLUDEPATH"></a>INCLUDEPATH</h4>
-This tag specifies the #include directories. It can be set in the
+This variable specifies the #include directories. It can be set in the
project file, or by the <a href="#AddIncludePath">AddIncludePath()</a>
function.<p>
Example:<pre>
@@ -214,7 +164,7 @@ See also: <a href="#OBJECTS_DIR">OBJECTS_DIR</a>.
<h4><a name="OBJECTS"></a>OBJECTS</h4>
-This tag is generated from <code>SOURCES</code> by the StdInit() function.
+This varialble is generated from <code>SOURCES</code> by the StdInit() function.
The extension of each source file has been replaced by .o (Unix) or .obj
(Win32).<p>
Example:<pre>
@@ -236,7 +186,7 @@ See also: <a href="#MOC_DIR">MOC_DIR</a>.
<h4><a name="OBJMOC"></a>OBJMOC</h4>
-This tag is generated by the <a href="#StdInit">StdInit()</a> function if
+This variable is generated by the <a href="#StdInit">StdInit()</a> function if
<code>$moc_aware</code> is true. <code>OBJMOC</code> contains the name of
all intermediate moc object files.<p>
Example:<pre>
@@ -258,7 +208,7 @@ file, excluding the .pro extension.
<h4><a name="RC_FILE"></a>RC_FILE</h4>
Win32/app.t only: Specifies a .rc file. Cannot be used with the RES_FILE
-tag.
+variable.
<h4><a name="RES_FILE"></a>RES_FILE</h4>
@@ -271,7 +221,7 @@ Defines the source files of the project.
<h4><a name="SRCMOC"></a>SRCMOC</h4>
-This tag is generated by the <a href="#StdInit">StdInit()</a> function if
+This variable is generated by the <a href="#StdInit">StdInit()</a> function if
<code>CONFIG</code> contains "qt". <code>SRCMOC</code> contains the name of
all intermediate moc files.<p>
Example:<pre>
@@ -303,8 +253,8 @@ Contains the name of the compiler.
Contains the default compiler flags.
-<h4><a name="TMAKE_FILETAGS"></a>TMAKE_FILETAGS</h4>
-Tells tmake which tags contain file names. This is because tmake
+<h4><a name="TMAKE_FILEVARS"></a>TMAKE_FILEVARS</h4>
+Tells tmake which variables contain file names. This is because tmake
on Windows replace the directory separator / with \.
@@ -370,7 +320,7 @@ Example:<pre>
<h3>Config(string)</h3>
-Returns true if the <code>CONFIG</code> tag contains the given string.
+Returns true if the <code>CONFIG</code> variable contains the given string.
<p>Example:<pre>
#$ if ( Config("release") { }
</pre>
@@ -390,20 +340,20 @@ EnableOutput() is called.
Enables tmake output after DisableOutput() was called.
-<h3>Expand(tag)</h3>
-Expands a project tag. Equivalent to <code>$text = $project{$tag}</code>.
+<h3>Expand(var)</h3>
+Expands a project variable. Equivalent to <code>$text = $project{$var}</code>.
<p>Example:<pre>
VERSION = #$ Expand("VERSION");
</pre>Output:<pre>
VERSION = 1.1
</pre>
-<h3>ExpandGlue(tag,prepend,glue,append)</h3>
-Expands a $project{} tag, splits on whitespace
+<h3>ExpandGlue(var,prepend,glue,append)</h3>
+Expands a $project{} variable, splits on whitespace
and joins with $glue. $prepend is put at the start
of the string and $append is put at the end of the
string. The resulting string ($text) becomes "" if
-the project tag is empty or not defined.<p>
+the project variable is empty or not defined.<p>
Example:<pre>
clear:
#$ ExpandGlue("OBJECTS","-del","\n\t-del ","");
@@ -414,9 +364,9 @@ Example:<pre>
</pre>
-<h3>ExpandList(tag)</h3>
+<h3>ExpandList(var)</h3>
This function is suitable for expanding lists of files.
-Equivalent with <code>ExpandGlue($tag,""," \\\n\t\t","")</code>.<p>
+Equivalent with <code>ExpandGlue($var,""," \\\n\t\t","")</code>.<p>
Example:<pre>
OBJECTS = #$ ExpandList("OBJECTS");
</pre>Output:<pre>
@@ -425,6 +375,11 @@ Example:<pre>
</pre>
+<h3>ExpandPath(var,prepend,glue,append)</h3>
+Similar to ExpandGlue, except that it splits the items on a semicolon
+instead of space (if the variable contains at least one semicolon).
+
+
<h3>IncludeTemplate(file)</h3>
Includes a template file. The ".t" extension is optional.<p>
Example:<pre>
@@ -477,7 +432,7 @@ between).
<h3><a name="ScanProject"></a>ScanProject(file)</h3>
-Scans a project file and stores the project tags and values in the
+Scans a project file and stores the project variables and values in the
global associative <code>%project</code> array.
@@ -485,7 +440,7 @@ global associative <code>%project</code> array.
Standard initialization of tmake. StdInit() should be
called from one of the first lines in the template.<p>
-This function creates some new project tags:<ul>
+This function creates some new project variables:<ul>
<li><code><a href="#OBJECTS">OBJECTS</a></code>
- Object files corresponding to
<code><a href="#SOURCES">SOURCES</a></code>.
@@ -493,16 +448,16 @@ This function creates some new project tags:<ul>
<li><code><a href="#OBJMOC">OBJMOC</a></code> - moc object files.
</ul>
-The moc-related tags are created only if <code>CONFIG</code> contains "qt"
+The moc-related variables are created only if <code>CONFIG</code> contains "qt"
<h3>Substitute(string)</h3>
-This function takes a string and substitutes any occurrence of $$tag
-with the actual content of the tag. Returns the substituted string.
+This function takes a string and substitutes any occurrence of $$var
+with the actual content of the variable. Returns the substituted string.
Also sets $text.
<p>
Important: Use single quotes around the string, otherwise perl will expand
-any $tags it finds.
+any $vars it finds.
<p>Example:<pre>
Substitute('Project name: $$PROJECT, uses template $$TEMPLATE');
</pre>
diff --git a/tmake/lib/aix-g++/tmake.conf b/tmake/lib/aix-g++/tmake.conf
index f2fe571..cf8c528 100755
--- a/tmake/lib/aix-g++/tmake.conf
+++ b/tmake/lib/aix-g++/tmake.conf
@@ -11,9 +11,9 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
-TMAKE_CFLAGS_SHLIB =
+TMAKE_CFLAGS_SHLIB =
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
TMAKE_CXX = g++
@@ -43,10 +43,10 @@ TMAKE_LFLAGS_SHLIB =
TMAKE_LFLAGS_SONAME =
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/aix-xlc/tmake.conf b/tmake/lib/aix-xlc/tmake.conf
index 401e390..623f258 100755
--- a/tmake/lib/aix-xlc/tmake.conf
+++ b/tmake/lib/aix-xlc/tmake.conf
@@ -38,7 +38,7 @@ TMAKE_LINK = xlC
TMAKE_LINK_SHLIB = ld
TMAKE_LINK_SHLIB_CMD = /usr/lpp/xlC/bin/makeC++SharedLib -p 0 \
-o lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) \
- -lX11 -lXext $(OBJECTS) $(OBJMOC); \
+ -lXext -lX11 $(OBJECTS) $(OBJMOC); \
ar q lib$(TARGET).a lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
ranlib lib$(TARGET).a; \
mv lib$(TARGET).a $(DESTDIR)
@@ -49,7 +49,7 @@ TMAKE_LFLAGS_SHLIB =
TMAKE_LFLAGS_SONAME =
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
diff --git a/tmake/lib/bsdi-g++/app.t b/tmake/lib/bsdi-g++/app.t
new file mode 100755
index 0000000..867725e
--- /dev/null
+++ b/tmake/lib/bsdi-g++/app.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/app.t");
diff --git a/tmake/lib/bsdi-g++/lib.t b/tmake/lib/bsdi-g++/lib.t
new file mode 100755
index 0000000..2523b2f
--- /dev/null
+++ b/tmake/lib/bsdi-g++/lib.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/lib.t");
diff --git a/tmake/lib/bsdi-g++/subdirs.t b/tmake/lib/bsdi-g++/subdirs.t
new file mode 100755
index 0000000..5e888af
--- /dev/null
+++ b/tmake/lib/bsdi-g++/subdirs.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/subdirs.t");
diff --git a/tmake/lib/bsdi-g++/tmake.conf b/tmake/lib/bsdi-g++/tmake.conf
new file mode 100755
index 0000000..e0bfd42
--- /dev/null
+++ b/tmake/lib/bsdi-g++/tmake.conf
@@ -0,0 +1,60 @@
+#
+# $Id$
+#
+# tmake configuration for bsdi-shlicc++, bsdi 4.0
+#
+# shlicc/++ is a BSDI wrapper around cc/g++ that enables shared libs
+# (info/7367)
+#
+
+TEMPLATE = app
+CONFIG = qt warn_on release
+
+TMAKE_CC = gcc
+TMAKE_CFLAGS =
+TMAKE_CFLAGS_WARN_ON = -Wall -W
+TMAKE_CFLAGS_WARN_OFF =
+TMAKE_CFLAGS_RELEASE = -O2
+TMAKE_CFLAGS_DEBUG = -g
+TMAKE_CFLAGS_SHLIB = -fPIC
+TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+TMAKE_CXX = shlicc++
+TMAKE_CXXFLAGS = $$TMAKE_CFLAGS
+TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
+TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
+TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
+TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
+TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB
+TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
+
+TMAKE_INCDIR =
+TMAKE_LIBDIR =
+TMAKE_INCDIR_X11 = /usr/X11R6/include
+TMAKE_LIBDIR_X11 = /usr/X11R6/lib
+TMAKE_INCDIR_QT = $(QTDIR)/include
+TMAKE_LIBDIR_QT = $(QTDIR)/lib
+TMAKE_INCDIR_OPENGL = /usr/X11R6/include
+TMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+TMAKE_LINK = shlicc++
+TMAKE_LINK_SHLIB = shlicc++
+TMAKE_LFLAGS = -Wl,-rpath=/lib:/usr/X11R6/lib:$(QTDIR)/lib
+TMAKE_LFLAGS_RELEASE =
+TMAKE_LFLAGS_DEBUG =
+TMAKE_LFLAGS_SHLIB = -shared
+TMAKE_LFLAGS_SONAME = -Wl,-soname,
+
+TMAKE_LIBS =
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
+TMAKE_LIBS_QT = -lqt
+TMAKE_LIBS_QT_OPENGL = -lqgl
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
+
+TMAKE_MOC = moc
+
+TMAKE_AR = ar cqs
+TMAKE_RANLIB =
+
+TMAKE_TAR = tar -cf
+TMAKE_GZIP = gzip -9f
diff --git a/tmake/lib/dgux-g++/tmake.conf b/tmake/lib/dgux-g++/tmake.conf
index 54e4ac3..ff9c24b 100755
--- a/tmake/lib/dgux-g++/tmake.conf
+++ b/tmake/lib/dgux-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -44,10 +44,10 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-h,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/freebsd-g++/tmake.conf b/tmake/lib/freebsd-g++/tmake.conf
index d7dbb21..ee3f390 100755
--- a/tmake/lib/freebsd-g++/tmake.conf
+++ b/tmake/lib/freebsd-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS = -pipe
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -45,10 +45,10 @@ TMAKE_LFLAGS_SHLIB = -shared
#TMAKE_LFLAGS_SONAME = -Wl,-soname
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/gnu-g++/tmake.conf b/tmake/lib/gnu-g++/tmake.conf
index eed7c32..9712914 100755
--- a/tmake/lib/gnu-g++/tmake.conf
+++ b/tmake/lib/gnu-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -43,10 +43,10 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/hpux-acc/tmake.conf b/tmake/lib/hpux-acc/tmake.conf
index 381fa97..6a50ab5 100755
--- a/tmake/lib/hpux-acc/tmake.conf
+++ b/tmake/lib/hpux-acc/tmake.conf
@@ -27,8 +27,8 @@ TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
TMAKE_INCDIR =
TMAKE_LIBDIR =
-TMAKE_INCDIR_X11 =
-TMAKE_LIBDIR_X11 =
+TMAKE_INCDIR_X11 = /usr/include/X11R6
+TMAKE_LIBDIR_X11 = /usr/lib/X11R6
TMAKE_INCDIR_QT = $(QTDIR)/include
TMAKE_LIBDIR_QT = $(QTDIR)/lib
TMAKE_INCDIR_OPENGL =
@@ -44,7 +44,7 @@ TMAKE_LFLAGS_SONAME =
TMAKE_HPUX_SHLIB = 1
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
diff --git a/tmake/lib/hpux-cc/tmake.conf b/tmake/lib/hpux-cc/tmake.conf
index 851cb67..91289cf 100755
--- a/tmake/lib/hpux-cc/tmake.conf
+++ b/tmake/lib/hpux-cc/tmake.conf
@@ -27,8 +27,8 @@ TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
TMAKE_INCDIR =
TMAKE_LIBDIR =
-TMAKE_INCDIR_X11 =
-TMAKE_LIBDIR_X11 =
+TMAKE_INCDIR_X11 = /usr/include/X11R6
+TMAKE_LIBDIR_X11 = /usr/lib/X11R6
TMAKE_INCDIR_QT = $(QTDIR)/include
TMAKE_LIBDIR_QT = $(QTDIR)/lib
TMAKE_INCDIR_OPENGL =
@@ -44,7 +44,7 @@ TMAKE_LFLAGS_SONAME =
TMAKE_HPUX_SHLIB = 1
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
diff --git a/tmake/lib/hpux-g++/tmake.conf b/tmake/lib/hpux-g++/tmake.conf
index f9b47d4..c39e8f9 100755
--- a/tmake/lib/hpux-g++/tmake.conf
+++ b/tmake/lib/hpux-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -27,8 +27,8 @@ TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
TMAKE_INCDIR =
TMAKE_LIBDIR =
-TMAKE_INCDIR_X11 =
-TMAKE_LIBDIR_X11 =
+TMAKE_INCDIR_X11 = /usr/include/X11R6
+TMAKE_LIBDIR_X11 = /usr/lib/X11R6
TMAKE_INCDIR_QT = $(QTDIR)/include
TMAKE_LIBDIR_QT = $(QTDIR)/lib
TMAKE_INCDIR_OPENGL =
@@ -44,7 +44,7 @@ TMAKE_LFLAGS_SONAME =
TMAKE_HPUX_SHLIB = 1
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL =
diff --git a/tmake/lib/irix-64/tmake.conf b/tmake/lib/irix-64/tmake.conf
index 2d20f07..3e35176 100755
--- a/tmake/lib/irix-64/tmake.conf
+++ b/tmake/lib/irix-64/tmake.conf
@@ -7,10 +7,10 @@
TEMPLATE = app
CONFIG = qt warn_on release
-TMAKE_CC = CC
+TMAKE_CC = cc
TMAKE_CFLAGS = -64 LANG:bool=ON -woff 1209,1233,1314,1355,1375,1506
TMAKE_CFLAGS_WARN_ON = -fullwarn
-TMAKE_CFLAGS_WARN_OFF =
+TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB =
@@ -43,7 +43,7 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
@@ -53,7 +53,7 @@ TMAKE_MOC = moc
TMAKE_AR = ar cq
TMAKE_RANLIB =
-TMAKE_CLEAN = so_locations
+TMAKE_CLEAN = -r so_locations ii_files
TMAKE_TAR = tar -cf
TMAKE_GZIP = gzip -9f
diff --git a/tmake/lib/irix-dcc/tmake.conf b/tmake/lib/irix-dcc/tmake.conf
index 5f69690..f0fb7d4 100755
--- a/tmake/lib/irix-dcc/tmake.conf
+++ b/tmake/lib/irix-dcc/tmake.conf
@@ -43,7 +43,7 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
diff --git a/tmake/lib/irix-g++/tmake.conf b/tmake/lib/irix-g++/tmake.conf
index f6fea61..3ac1c54 100755
--- a/tmake/lib/irix-g++/tmake.conf
+++ b/tmake/lib/irix-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -43,7 +43,7 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
diff --git a/tmake/lib/irix-n32/tmake.conf b/tmake/lib/irix-n32/tmake.conf
index 52a6a38..6ca03bb 100755
--- a/tmake/lib/irix-n32/tmake.conf
+++ b/tmake/lib/irix-n32/tmake.conf
@@ -7,17 +7,17 @@
TEMPLATE = app
CONFIG = qt warn_on release
-TMAKE_CC = CC
-TMAKE_CFLAGS = -n32 LANG:bool=ON -woff 1209,1233,1314,1355,1375,1506
+TMAKE_CC = cc
+TMAKE_CFLAGS = -n32 -mips3 LANG:bool=ON -woff 1209,1233,1314,1355,1375,1506
TMAKE_CFLAGS_WARN_ON = -fullwarn
-TMAKE_CFLAGS_WARN_OFF =
+TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB =
TMAKE_CFLAGS_YACC = -woff 1110,1174,3262
TMAKE_CXX = CC
-TMAKE_CXXFLAGS = -n32 LANG:bool=ON -woff 1209,1233,1314,1355,1375,1506
+TMAKE_CXXFLAGS = -n32 -mips3 LANG:bool=ON -woff 1209,1233,1314,1355,1375,1506
TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
@@ -43,7 +43,7 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
@@ -53,7 +53,7 @@ TMAKE_MOC = moc
TMAKE_AR = ar cq
TMAKE_RANLIB =
-TMAKE_CLEAN = so_locations
+TMAKE_CLEAN = -r so_locations ii_files
TMAKE_TAR = tar -cf
TMAKE_GZIP = gzip -9f
diff --git a/tmake/lib/irix-o32/app.t b/tmake/lib/irix-o32/app.t
new file mode 100755
index 0000000..867725e
--- /dev/null
+++ b/tmake/lib/irix-o32/app.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/app.t");
diff --git a/tmake/lib/irix-o32/lib.t b/tmake/lib/irix-o32/lib.t
new file mode 100755
index 0000000..2523b2f
--- /dev/null
+++ b/tmake/lib/irix-o32/lib.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/lib.t");
diff --git a/tmake/lib/irix-o32/subdirs.t b/tmake/lib/irix-o32/subdirs.t
new file mode 100755
index 0000000..5e888af
--- /dev/null
+++ b/tmake/lib/irix-o32/subdirs.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/subdirs.t");
diff --git a/tmake/lib/irix-o32/tmake.conf b/tmake/lib/irix-o32/tmake.conf
new file mode 100755
index 0000000..66da8ef
--- /dev/null
+++ b/tmake/lib/irix-o32/tmake.conf
@@ -0,0 +1,59 @@
+#
+# $Id$
+#
+# tmake configuration for irix-o32
+#
+
+TEMPLATE = app
+CONFIG = qt warn_on release
+
+TMAKE_CC = cc
+TMAKE_CFLAGS = -32 LANG:bool=ON -woff 1209,1233,1314,1355,1375,1506
+TMAKE_CFLAGS_WARN_ON = -fullwarn
+TMAKE_CFLAGS_WARN_OFF =
+TMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000
+TMAKE_CFLAGS_DEBUG = -g
+TMAKE_CFLAGS_SHLIB =
+TMAKE_CFLAGS_YACC = -woff 1110,1174,3262
+
+TMAKE_CXX = CC
+TMAKE_CXXFLAGS = -32 LANG:bool=ON -woff 1209,1233,1314,1355,1375,1506
+TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
+TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
+TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
+TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
+TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB
+TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
+
+TMAKE_INCDIR =
+TMAKE_LIBDIR =
+TMAKE_INCDIR_X11 =
+TMAKE_LIBDIR_X11 =
+TMAKE_INCDIR_QT = $(QTDIR)/include
+TMAKE_LIBDIR_QT = $(QTDIR)/lib
+TMAKE_INCDIR_OPENGL =
+TMAKE_LIBDIR_OPENGL =
+
+TMAKE_LINK = CC
+TMAKE_LINK_SHLIB = CC
+TMAKE_LFLAGS = -32
+TMAKE_LFLAGS_RELEASE =
+TMAKE_LFLAGS_DEBUG =
+TMAKE_LFLAGS_SHLIB = -shared
+TMAKE_LFLAGS_SONAME = -Wl,-soname,
+
+TMAKE_LIBS =
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
+TMAKE_LIBS_QT = -lqt
+TMAKE_LIBS_QT_OPENGL = -lqgl
+TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
+
+TMAKE_MOC = moc
+
+TMAKE_AR = ar cq
+TMAKE_RANLIB =
+
+TMAKE_CLEAN = -r so_locations ii_files
+
+TMAKE_TAR = tar -cf
+TMAKE_GZIP = gzip -9f
diff --git a/tmake/lib/linux-g++/tmake.conf b/tmake/lib/linux-g++/tmake.conf
index 01b0d82..bbef2ec 100755
--- a/tmake/lib/linux-g++/tmake.conf
+++ b/tmake/lib/linux-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS = -pipe
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -43,10 +43,11 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
+TMAKE_LIBS_X11SM = -lICE -lSM
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/netbsd-g++/tmake.conf b/tmake/lib/netbsd-g++/tmake.conf
index 53bbadc..693cb9b 100755
--- a/tmake/lib/netbsd-g++/tmake.conf
+++ b/tmake/lib/netbsd-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -46,10 +46,10 @@ TMAKE_LFLAGS_SHLIB = -Bshareable
TMAKE_LFLAGS_SONAME =
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/openbsd-g++/tmake.conf b/tmake/lib/openbsd-g++/tmake.conf
index e45b6d7..fde8505 100755
--- a/tmake/lib/openbsd-g++/tmake.conf
+++ b/tmake/lib/openbsd-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -46,10 +46,10 @@ TMAKE_LFLAGS_SHLIB = -Bshareable
TMAKE_LFLAGS_SONAME =
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/osf1-cxx/tmake.conf b/tmake/lib/osf1-cxx/tmake.conf
index 7e4200e..53f5be8 100755
--- a/tmake/lib/osf1-cxx/tmake.conf
+++ b/tmake/lib/osf1-cxx/tmake.conf
@@ -9,11 +9,11 @@ CONFIG = qt warn_on release
TMAKE_CC = cxx
TMAKE_CFLAGS = -x cxx -w -D_POSIX_SOURCE -D_OSF_SOURCE -D_AES_SOURCE
-TMAKE_CFLAGS_WARN_ON =
+TMAKE_CFLAGS_WARN_ON =
TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
-TMAKE_CFLAGS_SHLIB =
+TMAKE_CFLAGS_SHLIB =
TMAKE_CFLAGS_YACC = -Olimit 1000
TMAKE_CXX = cxx
@@ -40,13 +40,15 @@ TMAKE_LFLAGS =
TMAKE_LFLAGS_RELEASE =
TMAKE_LFLAGS_DEBUG =
TMAKE_LFLAGS_SHLIB = -shared
-TMAKE_LFLAGS_SONAME =
+TMAKE_LFLAGS_SONAME = <<END
+-soname
+END
-TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS =
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/osf1-g++/tmake.conf b/tmake/lib/osf1-g++/tmake.conf
index 54aa2c1..60ac13b 100755
--- a/tmake/lib/osf1-g++/tmake.conf
+++ b/tmake/lib/osf1-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS = -D_POSIX_SOURCE -D_OSF_SOURCE -D_AES_SOURCE
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -43,10 +43,10 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/qnx-g++/tmake.conf b/tmake/lib/qnx-g++/tmake.conf
index 0bb70ae..68485f9 100755
--- a/tmake/lib/qnx-g++/tmake.conf
+++ b/tmake/lib/qnx-g++/tmake.conf
@@ -43,10 +43,10 @@ TMAKE_LFLAGS_SHLIB =
TMAKE_LFLAGS_SONAME =
TMAKE_LIBS = -lunix
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/sco-g++/tmake.conf b/tmake/lib/sco-g++/tmake.conf
index 8ee470c..a27fff7 100755
--- a/tmake/lib/sco-g++/tmake.conf
+++ b/tmake/lib/sco-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -43,10 +43,10 @@ TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME =
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext -lsocket
-TMAKE_LIBS_QT = -lqt -lsocket
+TMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lm
+TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/solaris-cc-gcc/app.t b/tmake/lib/solaris-cc-gcc/app.t
new file mode 100755
index 0000000..867725e
--- /dev/null
+++ b/tmake/lib/solaris-cc-gcc/app.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/app.t");
diff --git a/tmake/lib/solaris-cc-gcc/lib.t b/tmake/lib/solaris-cc-gcc/lib.t
new file mode 100755
index 0000000..2523b2f
--- /dev/null
+++ b/tmake/lib/solaris-cc-gcc/lib.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/lib.t");
diff --git a/tmake/lib/solaris-cc-gcc/subdirs.t b/tmake/lib/solaris-cc-gcc/subdirs.t
new file mode 100755
index 0000000..5e888af
--- /dev/null
+++ b/tmake/lib/solaris-cc-gcc/subdirs.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/subdirs.t");
diff --git a/tmake/lib/solaris-cc-gcc/tmake.conf b/tmake/lib/solaris-cc-gcc/tmake.conf
new file mode 100755
index 0000000..aae2bf7
--- /dev/null
+++ b/tmake/lib/solaris-cc-gcc/tmake.conf
@@ -0,0 +1,61 @@
+#
+# $Id$
+#
+# tmake configuration for solaris-cc-gcc
+# (Using SunPro CC for C++ code and gcc for C code.)
+#
+
+TEMPLATE = app
+CONFIG = qt warn_on release
+
+TMAKE_CC = gcc
+TMAKE_CFLAGS =
+TMAKE_CFLAGS_WARN_ON = -Wall -W
+TMAKE_CFLAGS_WARN_OFF =
+TMAKE_CFLAGS_RELEASE = -O2
+TMAKE_CFLAGS_DEBUG = -g
+TMAKE_CFLAGS_SHLIB = -fPIC
+TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+TMAKE_CXX = CC
+TMAKE_CXXFLAGS =
+TMAKE_CXXFLAGS_WARN_ON =
+TMAKE_CXXFLAGS_WARN_OFF = -w
+TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
+TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
+TMAKE_CXXFLAGS_SHLIB = -PIC
+TMAKE_CXXFLAGS_YACC =
+
+TMAKE_INCDIR =
+TMAKE_LIBDIR =
+TMAKE_INCDIR_X11 = /usr/openwin/include
+TMAKE_LIBDIR_X11 = /usr/openwin/lib
+TMAKE_INCDIR_QT = $(QTDIR)/include
+TMAKE_LIBDIR_QT = $(QTDIR)/lib
+TMAKE_INCDIR_OPENGL =
+TMAKE_LIBDIR_OPENGL =
+
+TMAKE_LINK = CC
+# Jan Wortelboer <janw@wins.uva.nl> suggests avoiding $LD_LIBRARY_PATH:
+TMAKE_LINK_SHLIB = CC -R$(QTDIR)/lib:/usr/openwin/lib
+TMAKE_LFLAGS =
+TMAKE_LFLAGS_RELEASE =
+TMAKE_LFLAGS_DEBUG =
+TMAKE_LFLAGS_SHLIB = -G -h $(TARGET1)
+TMAKE_LFLAGS_SONAME =
+
+TMAKE_LIBS = -lC
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
+TMAKE_LIBS_QT = -lqt
+TMAKE_LIBS_QT_OPENGL = -lqgl
+TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
+
+TMAKE_MOC = moc
+
+TMAKE_AR = CC -xar -o
+TMAKE_RANLIB =
+
+TMAKE_CLEAN = -r Templates.DB
+
+TMAKE_TAR = tar -cf
+TMAKE_GZIP = gzip -9f
diff --git a/tmake/lib/solaris-cc/tmake.conf b/tmake/lib/solaris-cc/tmake.conf
index dd8801b..7f82383 100755
--- a/tmake/lib/solaris-cc/tmake.conf
+++ b/tmake/lib/solaris-cc/tmake.conf
@@ -8,21 +8,21 @@ TEMPLATE = app
CONFIG = qt warn_on release
TMAKE_CC = cc
-TMAKE_CFLAGS = -pto
+TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON =
TMAKE_CFLAGS_WARN_OFF = -w
-TMAKE_CFLAGS_RELEASE = -O2
+TMAKE_CFLAGS_RELEASE = -O
TMAKE_CFLAGS_DEBUG = -g
-TMAKE_CFLAGS_SHLIB = -PIC
+TMAKE_CFLAGS_SHLIB = -KPIC
TMAKE_CFLAGS_YACC =
TMAKE_CXX = CC
TMAKE_CXXFLAGS = $$TMAKE_CFLAGS
TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
-TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
+TMAKE_CXXFLAGS_RELEASE = -O2
TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
-TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB
+TMAKE_CXXFLAGS_SHLIB = -PIC
TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
TMAKE_INCDIR =
@@ -40,11 +40,11 @@ TMAKE_LINK_SHLIB = CC -R$(QTDIR)/lib:/usr/openwin/lib
TMAKE_LFLAGS =
TMAKE_LFLAGS_RELEASE =
TMAKE_LFLAGS_DEBUG =
-TMAKE_LFLAGS_SHLIB = -G
+TMAKE_LFLAGS_SHLIB = -G -h $(TARGET1)
TMAKE_LFLAGS_SONAME =
-TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS = -lC
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
diff --git a/tmake/lib/solaris-g++/tmake.conf b/tmake/lib/solaris-g++/tmake.conf
index c23c9b4..c4c4104 100755
--- a/tmake/lib/solaris-g++/tmake.conf
+++ b/tmake/lib/solaris-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -39,11 +39,12 @@ TMAKE_LINK_SHLIB = g++
TMAKE_LFLAGS =
TMAKE_LFLAGS_RELEASE =
TMAKE_LFLAGS_DEBUG =
-TMAKE_LFLAGS_SHLIB = -B dynamic -h lib$(TARGET).so.$(VER_MAJ) -shared
+TMAKE_LFLAGS_SHAPP = -shared
+TMAKE_LFLAGS_SHLIB = -shared -h $(TARGET1)
TMAKE_LFLAGS_SONAME =
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
diff --git a/tmake/lib/sunos-g++/tmake.conf b/tmake/lib/sunos-g++/tmake.conf
index 43115f8..1952f48 100755
--- a/tmake/lib/sunos-g++/tmake.conf
+++ b/tmake/lib/sunos-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -43,7 +43,7 @@ TMAKE_LFLAGS_SHLIB = -fPIC -shared
TMAKE_LFLAGS_SONAME =
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
TMAKE_LIBS_OPENGL = -lGL -lGLU -lXmu
diff --git a/tmake/lib/ultrix-g++/tmake.conf b/tmake/lib/ultrix-g++/tmake.conf
index 59147d7..51b4962 100755
--- a/tmake/lib/ultrix-g++/tmake.conf
+++ b/tmake/lib/ultrix-g++/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB =
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -43,10 +43,10 @@ TMAKE_LFLAGS_DEBUG =
#TMAKE_LFLAGS_SONAME = -Wl,-soname,
TMAKE_LIBS =
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu
TMAKE_MOC = moc
diff --git a/tmake/lib/unix/generic.t b/tmake/lib/unix/generic.t
index d9dc6ea..88b731a 100755
--- a/tmake/lib/unix/generic.t
+++ b/tmake/lib/unix/generic.t
@@ -34,8 +34,11 @@
Project('CONFIG *= x11inc');
}
if ( Config("qt") ) {
- $moc_aware = 1;
+ Project('CONFIG *= moc');
AddIncludePath(Project("TMAKE_INCDIR_QT"));
+ if ( Config("release") ) {
+ Project('DEFINES += NO_DEBUG');
+ }
if ( Config("opengl") ) {
Project("TMAKE_LIBDIR_QT") &&
Project('TMAKE_LIBS *= -L$$TMAKE_LIBDIR_QT');
@@ -61,6 +64,9 @@
Project('TMAKE_LIBS *= -L$$TMAKE_LIBDIR_X11');
Project('TMAKE_LIBS *= $$TMAKE_LIBS_X11');
}
+ if ( Config("moc") ) {
+ $moc_aware = 1;
+ }
Project('TMAKE_LIBS += $$LIBS');
if ( !Project("TMAKE_RUN_CC") ) {
Project('TMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src');
@@ -76,7 +82,6 @@
}
Project('TMAKE_FILETAGS = HEADERS SOURCES TARGET DESTDIR $$FILETAGS');
StdInit();
- $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
$project{"VERSION"} || ($project{"VERSION"} = "1.0");
$project{"VER_MAJ"} = $project{"VERSION"};
$project{"VER_MAJ"} =~ s/\.\d+$//;
@@ -86,6 +91,8 @@
if ( Project("TMAKE_APP_FLAG") ) {
if ( Config("dll") ) {
Project('TARGET = $$TARGET.so');
+ Project("TMAKE_LFLAGS_SHAPP") ||
+ ($project{"TMAKE_LFLAGS_SHAPP"} = $project{"TMAKE_LFLAGS_SHLIB"});
Project("TMAKE_LFLAGS_SONAME") &&
($project{"TMAKE_LFLAGS_SONAME"} .= $project{"TARGET"});
}
@@ -127,7 +134,11 @@
if ( Config("dll") ) {
Project('TMAKE_CFLAGS *= $$TMAKE_CFLAGS_SHLIB' );
Project('TMAKE_CXXFLAGS *= $$TMAKE_CXXFLAGS_SHLIB' );
- Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_SHLIB $$TMAKE_LFLAGS_SONAME');
+ if ( Project("TMAKE_APP_FLAG") ) {
+ Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_SHAPP');
+ } else {
+ Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_SHLIB $$TMAKE_LFLAGS_SONAME');
+ }
}
#$}
#!
@@ -143,7 +154,7 @@ CC = #$ Expand("TMAKE_CC");
CXX = #$ Expand("TMAKE_CXX");
CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
CXXFLAGS= #$ Expand("TMAKE_CXXFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
-INCPATH = #$ ExpandGlue("INCPATH","-I"," -I","");
+INCPATH = #$ ExpandPath("INCPATH","-I"," -I","");
#$ Config("staticlib") && DisableOutput();
LINK = #$ Expand("TMAKE_LINK");
LFLAGS = #$ Expand("TMAKE_LFLAGS");
diff --git a/tmake/lib/unix/subdirs.t b/tmake/lib/unix/subdirs.t
index 8f20097..e2b58a7 100755
--- a/tmake/lib/unix/subdirs.t
+++ b/tmake/lib/unix/subdirs.t
@@ -25,7 +25,9 @@ all: $(SUBDIRS)
$(SUBDIRS): FORCE
cd $@; $(MAKE)
-tmake:
+#$ TmakeSelf();
+
+tmake_all:
#${
$text = "\t" . 'for i in $(SUBDIRS); do ( cd $$i ; $(TMAKE) $$i.pro -o $(MAKEFILE); grep "TEMPLATE.*subdirs" $$i.pro 2>/dev/null >/dev/null && $(MAKE) -f $(MAKEFILE) tmake ) ; done';
#$}
diff --git a/tmake/lib/unixware-g++/tmake.conf b/tmake/lib/unixware-g++/tmake.conf
index 24300a9..c01a359 100755
--- a/tmake/lib/unixware-g++/tmake.conf
+++ b/tmake/lib/unixware-g++/tmake.conf
@@ -3,6 +3,8 @@
#
# tmake configuration for sco-g++
#
+# incl. UnixWare 7
+#
TEMPLATE = app
CONFIG = qt warn_on release
@@ -11,7 +13,7 @@ TMAKE_CC = gcc
TMAKE_CFLAGS = -D_UNIXWARE
TMAKE_CFLAGS_WARN_ON = -Wall -W
TMAKE_CFLAGS_WARN_OFF =
-TMAKE_CFLAGS_RELEASE = -O2 -fno-strength-reduce
+TMAKE_CFLAGS_RELEASE = -O2
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_SHLIB = -fPIC
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
@@ -42,11 +44,11 @@ TMAKE_LFLAGS_DEBUG =
TMAKE_LFLAGS_SHLIB = -shared
TMAKE_LFLAGS_SONAME =
-TMAKE_LIBS = -lsocket -lnsl -lc
-TMAKE_LIBS_X11 = -lX11 -lXext
+TMAKE_LIBS = -lc
+TMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lnsl -lm
TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl
-TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXt -lXext -lm
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXt
TMAKE_MOC = moc
diff --git a/tmake/lib/unixware7-cc/app.t b/tmake/lib/unixware7-cc/app.t
new file mode 100755
index 0000000..867725e
--- /dev/null
+++ b/tmake/lib/unixware7-cc/app.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/app.t");
diff --git a/tmake/lib/unixware7-cc/lib.t b/tmake/lib/unixware7-cc/lib.t
new file mode 100755
index 0000000..2523b2f
--- /dev/null
+++ b/tmake/lib/unixware7-cc/lib.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/lib.t");
diff --git a/tmake/lib/unixware7-cc/subdirs.t b/tmake/lib/unixware7-cc/subdirs.t
new file mode 100755
index 0000000..5e888af
--- /dev/null
+++ b/tmake/lib/unixware7-cc/subdirs.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/subdirs.t");
diff --git a/tmake/lib/unixware7-cc/tmake.conf b/tmake/lib/unixware7-cc/tmake.conf
new file mode 100755
index 0000000..af04187
--- /dev/null
+++ b/tmake/lib/unixware7-cc/tmake.conf
@@ -0,0 +1,59 @@
+#
+# $Id$
+#
+# tmake configuration for sco-g++
+#
+# (UnixWare file, with different -D)
+#
+
+TEMPLATE = app
+CONFIG = qt warn_on release
+
+TMAKE_CC = cc
+TMAKE_CFLAGS =
+TMAKE_CFLAGS_WARN_ON = -Wall -W
+TMAKE_CFLAGS_WARN_OFF =
+TMAKE_CFLAGS_RELEASE = -O -T used
+TMAKE_CFLAGS_DEBUG = -g
+TMAKE_CFLAGS_SHLIB = -K PIC
+TMAKE_CFLAGS_YACC =
+
+TMAKE_CXX = CC
+TMAKE_CXXFLAGS = $$TMAKE_CFLAGS
+TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
+TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
+TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
+TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
+TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB
+TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
+
+TMAKE_INCDIR =
+TMAKE_LIBDIR =
+TMAKE_INCDIR_X11 =
+TMAKE_LIBDIR_X11 = /usr/X/lib
+TMAKE_INCDIR_QT = $(QTDIR)/include
+TMAKE_LIBDIR_QT = $(QTDIR)/lib
+TMAKE_INCDIR_OPENGL =
+TMAKE_LIBDIR_OPENGL =
+
+TMAKE_LINK = CC
+TMAKE_LINK_SHLIB = CC
+TMAKE_LFLAGS =
+TMAKE_LFLAGS_RELEASE =
+TMAKE_LFLAGS_DEBUG =
+TMAKE_LFLAGS_SHLIB = -G
+TMAKE_LFLAGS_SONAME =
+
+TMAKE_LIBS =
+TMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lnsl -lm
+TMAKE_LIBS_QT = -lqt
+TMAKE_LIBS_QT_OPENGL = -lqgl
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXt
+
+TMAKE_MOC = moc
+
+TMAKE_AR = ar cq
+TMAKE_RANLIB =
+
+TMAKE_TAR = tar -cf
+TMAKE_GZIP = gzip -9f
diff --git a/tmake/lib/unixware7-g++/app.t b/tmake/lib/unixware7-g++/app.t
new file mode 100755
index 0000000..867725e
--- /dev/null
+++ b/tmake/lib/unixware7-g++/app.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/app.t");
diff --git a/tmake/lib/unixware7-g++/lib.t b/tmake/lib/unixware7-g++/lib.t
new file mode 100755
index 0000000..2523b2f
--- /dev/null
+++ b/tmake/lib/unixware7-g++/lib.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/lib.t");
diff --git a/tmake/lib/unixware7-g++/subdirs.t b/tmake/lib/unixware7-g++/subdirs.t
new file mode 100755
index 0000000..5e888af
--- /dev/null
+++ b/tmake/lib/unixware7-g++/subdirs.t
@@ -0,0 +1,2 @@
+#! Use the common Unix template
+#$ IncludeTemplate("../unix/subdirs.t");
diff --git a/tmake/lib/unixware7-g++/tmake.conf b/tmake/lib/unixware7-g++/tmake.conf
new file mode 100755
index 0000000..3f35784
--- /dev/null
+++ b/tmake/lib/unixware7-g++/tmake.conf
@@ -0,0 +1,59 @@
+#
+# $Id$
+#
+# tmake configuration for sco-g++
+#
+# (UnixWare file, with different -D)
+#
+
+TEMPLATE = app
+CONFIG = qt warn_on release
+
+TMAKE_CC = gcc
+TMAKE_CFLAGS = -D_UNIXWARE7
+TMAKE_CFLAGS_WARN_ON = -Wall -W
+TMAKE_CFLAGS_WARN_OFF =
+TMAKE_CFLAGS_RELEASE = -O2
+TMAKE_CFLAGS_DEBUG = -g
+TMAKE_CFLAGS_SHLIB = -fPIC
+TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+TMAKE_CXX = g++
+TMAKE_CXXFLAGS = $$TMAKE_CFLAGS
+TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
+TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
+TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE
+TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG
+TMAKE_CXXFLAGS_SHLIB = $$TMAKE_CFLAGS_SHLIB
+TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC
+
+TMAKE_INCDIR =
+TMAKE_LIBDIR =
+TMAKE_INCDIR_X11 =
+TMAKE_LIBDIR_X11 = /usr/X/lib
+TMAKE_INCDIR_QT = $(QTDIR)/include
+TMAKE_LIBDIR_QT = $(QTDIR)/lib
+TMAKE_INCDIR_OPENGL =
+TMAKE_LIBDIR_OPENGL =
+
+TMAKE_LINK = g++
+TMAKE_LINK_SHLIB = g++
+TMAKE_LFLAGS =
+TMAKE_LFLAGS_RELEASE =
+TMAKE_LFLAGS_DEBUG =
+TMAKE_LFLAGS_SHLIB = -shared
+TMAKE_LFLAGS_SONAME =
+
+TMAKE_LIBS = -lc
+TMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lnsl -lm
+TMAKE_LIBS_QT = -lqt
+TMAKE_LIBS_QT_OPENGL = -lqgl
+TMAKE_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXt
+
+TMAKE_MOC = moc
+
+TMAKE_AR = ar cq
+TMAKE_RANLIB =
+
+TMAKE_TAR = tar -cf
+TMAKE_GZIP = gzip -9f
diff --git a/tmake/lib/win32-borland/generic.t b/tmake/lib/win32-borland/generic.t
index 88190d8..0cf8711 100755
--- a/tmake/lib/win32-borland/generic.t
+++ b/tmake/lib/win32-borland/generic.t
@@ -38,8 +38,11 @@
Project('CONFIG += windows' );
}
if ( Config("qt") ) {
- $moc_aware = 1;
+ Project('CONFIG *= moc');
AddIncludePath(Project("TMAKE_INCDIR_QT"));
+ if ( Config("release") ) {
+ Project('DEFINES += NO_DEBUG');
+ }
if ( Config("opengl") ) {
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_OPENGL');
}
@@ -47,6 +50,7 @@
if ( Project("TMAKE_QT_DLL") ) {
Project('DEFINES -= QT_DLL');
Project('DEFINES *= QT_MAKEDLL');
+ Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_QT_DLL');
}
} else {
if ( Project("TMAKE_QT_DLL") ) {
@@ -56,7 +60,9 @@
if ( Project("TMAKE_QT_DLL") ) {
my $qtver =FindHighestLibVersion($ENV{"QTDIR"} . "/lib", "qt");
Project("TMAKE_LIBS /= s/qt.lib/qt${qtver}.lib/");
- Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL');
+ if ( !Config("dll") ) {
+ Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL');
+ }
}
}
}
@@ -94,6 +100,9 @@
Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_CONSOLE_ANY');
Project('TMAKE_LIBS *= $$TMAKE_LIBS_CONSOLE');
}
+ if ( Config("moc") ) {
+ $moc_aware = 1;
+ }
Project('TMAKE_LIBS += $$LIBS');
Project('TMAKE_FILETAGS = HEADERS SOURCES DEF_FILE RC_FILE TARGET TMAKE_LIBS DESTDIR DLLDESTDIR $$FILETAGS');
foreach ( split(/\s/,Project("TMAKE_FILETAGS")) ) {
@@ -115,7 +124,6 @@
Project('TMAKE_LIBS *= $$RES_FILE');
}
StdInit();
- $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
if ( Project("VERSION") ) {
$project{"VER_MAJ"} = $project{"VERSION"};
$project{"VER_MAJ"} =~ s/\.\d+$//;
@@ -141,7 +149,7 @@ CC = #$ Expand("TMAKE_CC");
CXX = #$ Expand("TMAKE_CXX");
CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
CXXFLAGS= #$ Expand("TMAKE_CXXFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
-INCPATH = #$ ExpandGlue("INCPATH",'-I"','" -I"','"');
+INCPATH = #$ ExpandPath("INCPATH",'-I',' -I','');
#$ !Project("TMAKE_APP_OR_DLL") && DisableOutput();
LINK = #$ Expand("TMAKE_LINK");
LFLAGS = #$ Expand("TMAKE_LFLAGS");
diff --git a/tmake/lib/win32-borland/subdirs.t b/tmake/lib/win32-borland/subdirs.t
index 8e70c0e..f08e41f 100755
--- a/tmake/lib/win32-borland/subdirs.t
+++ b/tmake/lib/win32-borland/subdirs.t
@@ -1,33 +1,3 @@
-#############################################################################
-#!
-#! This is a tmake template for creating a makefile that invokes make in
-#! sub directories - for Win32/Borland C++.
-#!
-#${
- StdInit();
- $m = "";
- foreach ( split(/\s+/,$project{"SUBDIRS"}) ) {
- $m = $m . "\tcd $_\n\tDOMAKE\n\t\@cd ..\n";
- }
- $project{"SUBMAKE"} = $m;
-#$}
-#!
-# Makefile for building targets in sub directories.
-# Generated by tmake at #$ Now();
-# Project: #$ Expand("PROJECT");
-# Template: #$ Expand("TEMPLATE");
-#############################################################################
-
-SUBDIRS = #$ ExpandList("SUBDIRS");
-
-all: $(SUBDIRS)
-
-#${
- foreach ( split(/\s+/,$project{"SUBDIRS"}) ) {
- $text = $text . $_ . ":\n\t" .
- "cd $_\n\t\$(MAKE\)\n\t\@cd ..\n\n";
- }
-#$}
-
-clean:
-#$ $text = $project{"SUBMAKE"}; $text =~ s/DOMAKE/\$(MAKE\) clean/g;
+#! Use the common Win32 template
+#$ Project("TMAKE_NOFORCE = 1");
+#$ IncludeTemplate("../win32/subdirs.t");
diff --git a/tmake/lib/win32-borland/tmake.conf b/tmake/lib/win32-borland/tmake.conf
index 4dd3636..0f41370 100755
--- a/tmake/lib/win32-borland/tmake.conf
+++ b/tmake/lib/win32-borland/tmake.conf
@@ -51,6 +51,6 @@ TMAKE_LIBS_OPENGL =
TMAKE_MOC = moc
TMAKE_LIB = tlib /C /P256
-TMAKE_RC = rc
+TMAKE_RC = brc32
TMAKE_ZIP = zip -r -9
diff --git a/tmake/lib/win32-g++/generic.t b/tmake/lib/win32-g++/generic.t
index 253c401..060d5c3 100755
--- a/tmake/lib/win32-g++/generic.t
+++ b/tmake/lib/win32-g++/generic.t
@@ -3,9 +3,11 @@
#!
#${
if ( Config("qt") ) {
- if ( $ENV{"QT_DLL"} && !$ENV{"QT_NODLL"} ) {
+ if ( !(Project("DEFINES") =~ /QT_NODLL/) &&
+ ((Project("DEFINES") =~ /QT_(?:MAKE)?DLL/) ||
+ ($ENV{"QT_DLL"} && !$ENV{"QT_NODLL"})) ) {
Project('TMAKE_QT_DLL = 1');
- if ( Project("TARGET") eq "qt" ) {
+ if ( (Project("TARGET") eq "qt") && Project("TMAKE_LIB_FLAG") ) {
Project('CONFIG += dll');
}
}
@@ -18,38 +20,49 @@
}
if ( Config("warn_off") ) {
Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_WARN_OFF');
+ Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_WARN_OFF');
} elsif ( Config("warn_on") ) {
Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_WARN_ON');
+ Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_WARN_ON');
}
if ( Config("debug") ) {
Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_DEBUG');
+ Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_DEBUG');
Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_DEBUG');
} elsif ( Config("release") ) {
Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_RELEASE');
+ Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_RELEASE');
Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_RELEASE');
}
if ( Config("qt") || Config("opengl") ) {
Project('CONFIG += windows' );
}
if ( Config("qt") ) {
- $moc_aware = 1;
- AddIncludePath(Project('TMAKE_INCDIR_QT'));
+ Project('CONFIG *= moc');
+ AddIncludePath(Project("TMAKE_INCDIR_QT"));
+ if ( Config("release") ) {
+ Project('DEFINES += NO_DEBUG');
+ }
if ( Config("opengl") ) {
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_OPENGL');
}
- if ( Project("TARGET") eq "qt" ) {
- if ( Project("TMAKE_QT_DLL") && !(Project("DEFINES") =~ /QT_NODLL/) ) {
+ if ( (Project("TARGET") eq "qt") && Project("TMAKE_LIB_FLAG") ) {
+ if ( Project("TMAKE_QT_DLL") ) {
+ Project('DEFINES -= QT_DLL');
Project('DEFINES *= QT_MAKEDLL');
+ Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_QT_DLL');
}
} else {
- if ( Project("TMAKE_QT_DLL") && !(Project("DEFINES") =~ /QT_NODLL/) ) {
+ if ( Project("TMAKE_QT_DLL") ) {
Project('DEFINES *= QT_DLL');
}
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT');
- if ( (Project("DEFINES") =~ /QT_DLL/) ) {
+ if ( Project("TMAKE_QT_DLL") ) {
my $qtver =FindHighestLibVersion($ENV{"QTDIR"} . "/lib", "qt");
Project("TMAKE_LIBS /= s/qt.lib/qt${qtver}.lib/");
- Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL');
+ if ( !Config("dll") ) {
+ Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL');
+ }
}
}
}
@@ -69,10 +82,10 @@
} else {
Project('TMAKE_LFLAGS_CONSOLE_ANY = $$TMAKE_LFLAGS_CONSOLE');
Project('TMAKE_LFLAGS_WINDOWS_ANY = $$TMAKE_LFLAGS_WINDOWS');
- if ( Project('TMAKE_APP_FLAG') ) {
+ if ( Project("TMAKE_APP_FLAG") ) {
$project{"TARGET_EXT"} = ".exe";
} else {
- $project{"TARGET_EXT"} = ".a";
+ $project{"TARGET_EXT"} = ".lib";
}
}
if ( Config("windows") ) {
@@ -87,26 +100,19 @@
Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_CONSOLE_ANY');
Project('TMAKE_LIBS *= $$TMAKE_LIBS_CONSOLE');
}
+ if ( Config("moc") ) {
+ $moc_aware = 1;
+ }
Project('TMAKE_LIBS += $$LIBS');
Project('TMAKE_FILETAGS = HEADERS SOURCES DEF_FILE RC_FILE TARGET TMAKE_LIBS DESTDIR DLLDESTDIR $$FILETAGS');
- foreach ( split(/\s/,Project('TMAKE_FILETAGS')) ) {
+ foreach ( split(/\s/,Project("TMAKE_FILETAGS")) ) {
$project{$_} =~ s-[/\\]+-/-g;
}
- $obj_ext = "o";
- $dir_sep = "/";
- $gnuwin32 = 1;
- if ( Config("qt") ) {
- $qtdir = $ENV{"QTDIR"};
- $project{"INCPATH"} =~ s/\$\(QTDIR\)/$qtdir/;
- $project{"INCPATH"} =~ s/\\/\//g;
- $project{"TMAKE_LIBS"} =~ s/\$\(QTDIR\)/$qtdir/;
- $project{"TMAKE_LIBS"} =~ s/\\/\//g;
- }
- if ( Project('DEF_FILE') ) {
+ if ( Project("DEF_FILE") ) {
Project('TMAKE_LFLAGS *= $$DEF_FILE');
}
- if ( Project('RC_FILE') ) {
- if ( Project('RES_FILE') ) {
+ if ( Project("RC_FILE") ) {
+ if ( Project("RES_FILE") ) {
tmake_error("Both .rc and .res file specified.\n" .
"Please specify one of them, not both.");
}
@@ -114,11 +120,20 @@
$project{"RES_FILE"} =~ s/\.rc$/.res/i;
Project('TARGETDEPS += $$RES_FILE');
}
- if ( Project('RES_FILE') ) {
- Project('TMAKE_LFLAGS *= $$RES_FILE');
+ if ( Project("RES_FILE") ) {
+ Project('TMAKE_LIBS *= $$RES_FILE');
+ }
+ $obj_ext = "o";
+ $dir_sep = "/";
+ $gnuwin32 = 1;
+ if ( Config("qt") ) {
+ $qtdir = $ENV{"QTDIR"};
+ $project{"INCPATH"} =~ s/\$\(QTDIR\)/$qtdir/;
+ $project{"INCPATH"} =~ s/\\/\//g;
+ $project{"TMAKE_LIBS"} =~ s/\$\(QTDIR\)/$qtdir/;
+ $project{"TMAKE_LIBS"} =~ s/\\/\//g;
}
StdInit();
- $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
if ( Project("VERSION") ) {
$project{"VER_MAJ"} = $project{"VERSION"};
$project{"VER_MAJ"} =~ s/\.\d+$//;
@@ -143,8 +158,10 @@
####### Compiler, tools and options
CC = #$ Expand("TMAKE_CC");
+CXX = #$ Expand("TMAKE_CXX");
CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
-INCPATH = #$ ExpandGlue("INCPATH","-I"," -I","");
+CXXFLAGS= #$ Expand("TMAKE_CXXFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
+INCPATH = #$ ExpandPath("INCPATH",'-I',' -I','');
#$ !Project("TMAKE_APP_OR_DLL") && DisableOutput();
LINK = #$ Expand("TMAKE_LINK");
LFLAGS = #$ Expand("TMAKE_LFLAGS");
@@ -173,16 +190,16 @@ TARGET = #$ ExpandGlue("TARGET",$project{"DESTDIR"},"",$project{"TARGET_EXT"});
.SUFFIXES: .cpp .cxx .cc .c
.cpp.o:
- #$ Expand("TMAKE_COMPILE_IMP");
+ #$ Expand("TMAKE_RUN_CXX_IMP");
.cxx.o:
- #$ Expand("TMAKE_COMPILE_IMP");
+ #$ Expand("TMAKE_RUN_CXX_IMP");
.cc.o:
- #$ Expand("TMAKE_COMPILE_IMP");
+ #$ Expand("TMAKE_RUN_CXX_IMP");
.c.o:
- #$ Expand("TMAKE_COMPILE_IMP");
+ #$ Expand("TMAKE_RUN_CC_IMP");
####### Build rules
diff --git a/tmake/lib/win32-g++/tmake.conf b/tmake/lib/win32-g++/tmake.conf
index 59667bd..2e8b316 100755
--- a/tmake/lib/win32-g++/tmake.conf
+++ b/tmake/lib/win32-g++/tmake.conf
@@ -7,7 +7,7 @@
TEMPLATE = app
CONFIG = qt warn_on release
-TMAKE_CC = g++
+TMAKE_CC = gcc
TMAKE_CFLAGS =
TMAKE_CFLAGS_WARN_ON =
TMAKE_CFLAGS_WARN_OFF =
@@ -15,7 +15,7 @@ TMAKE_CFLAGS_RELEASE = -O
TMAKE_CFLAGS_DEBUG = -g
TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
-TMAKE_CXX = $$TMAKE_CC
+TMAKE_CXX = g++
TMAKE_CXXFLAGS = $$TMAKE_CFLAGS
TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON
TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF
@@ -42,7 +42,7 @@ TMAKE_LFLAGS_WINDOWS_DLL= -Wl,-subsystem,windows
TMAKE_LIBS =
TMAKE_LIBS_CONSOLE =
-TMAKE_LIBS_WINDOWS = -luser32 -lgdi32 -lcomdlg32 -lole32 -luuid -lwsock32
+TMAKE_LIBS_WINDOWS = -luser32 -lgdi32 -lcomdlg32 -limm32 -lole32 -luuid -lwsock32
TMAKE_LIBS_QT = -L$(QTDIR)/lib -lqt
TMAKE_LIBS_QT_DLL = -lqtmain
TMAKE_LIBS_QT_OPENGL = -lqgl
diff --git a/tmake/lib/win32-msvc/generic.t b/tmake/lib/win32-msvc/generic.t
index e57180d..388db4b 100755
--- a/tmake/lib/win32-msvc/generic.t
+++ b/tmake/lib/win32-msvc/generic.t
@@ -38,8 +38,11 @@
Project('CONFIG += windows' );
}
if ( Config("qt") ) {
- $moc_aware = 1;
+ Project('CONFIG *= moc');
AddIncludePath(Project("TMAKE_INCDIR_QT"));
+ if ( Config("release") ) {
+ Project('DEFINES += NO_DEBUG');
+ }
if ( Config("opengl") ) {
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_OPENGL');
}
@@ -47,6 +50,7 @@
if ( Project("TMAKE_QT_DLL") ) {
Project('DEFINES -= QT_DLL');
Project('DEFINES *= QT_MAKEDLL');
+ Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_QT_DLL');
}
} else {
if ( Project("TMAKE_QT_DLL") ) {
@@ -56,7 +60,9 @@
if ( Project("TMAKE_QT_DLL") ) {
my $qtver =FindHighestLibVersion($ENV{"QTDIR"} . "/lib", "qt");
Project("TMAKE_LIBS /= s/qt.lib/qt${qtver}.lib/");
- Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL');
+ if ( !Config("dll") ) {
+ Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL');
+ }
}
}
}
@@ -94,6 +100,9 @@
Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_CONSOLE_ANY');
Project('TMAKE_LIBS *= $$TMAKE_LIBS_CONSOLE');
}
+ if ( Config("moc") ) {
+ $moc_aware = 1;
+ }
Project('TMAKE_LIBS += $$LIBS');
Project('TMAKE_FILETAGS = HEADERS SOURCES DEF_FILE RC_FILE TARGET TMAKE_LIBS DESTDIR DLLDESTDIR $$FILETAGS');
foreach ( split(/\s/,Project("TMAKE_FILETAGS")) ) {
@@ -115,7 +124,6 @@
Project('TMAKE_LIBS *= $$RES_FILE');
}
StdInit();
- $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
if ( Project("VERSION") ) {
$project{"VER_MAJ"} = $project{"VERSION"};
$project{"VER_MAJ"} =~ s/\.\d+$//;
@@ -137,7 +145,7 @@ CC = #$ Expand("TMAKE_CC");
CXX = #$ Expand("TMAKE_CXX");
CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
CXXFLAGS= #$ Expand("TMAKE_CXXFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
-INCPATH = #$ ExpandGlue("INCPATH",'-I"','" -I"','"');
+INCPATH = #$ ExpandPath("INCPATH",'-I',' -I','');
#$ !Project("TMAKE_APP_OR_DLL") && DisableOutput();
LINK = #$ Expand("TMAKE_LINK");
LFLAGS = #$ Expand("TMAKE_LFLAGS");
diff --git a/tmake/lib/win32-msvc/tmake.conf b/tmake/lib/win32-msvc/tmake.conf
index cb64ac9..0f92f29 100755
--- a/tmake/lib/win32-msvc/tmake.conf
+++ b/tmake/lib/win32-msvc/tmake.conf
@@ -11,7 +11,7 @@ TMAKE_CC = cl
TMAKE_CFLAGS = -nologo
TMAKE_CFLAGS_WARN_ON = -W3
TMAKE_CFLAGS_WARN_OFF = -W0
-TMAKE_CFLAGS_RELEASE = -O2
+TMAKE_CFLAGS_RELEASE = -O1
TMAKE_CFLAGS_DEBUG = -Zi
TMAKE_CFLAGS_MT = -MT
TMAKE_CFLAGS_MT_DBG = -MTd
@@ -47,10 +47,11 @@ TMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console
TMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows
TMAKE_LFLAGS_CONSOLE_DLL= /SUBSYSTEM:console /DLL
TMAKE_LFLAGS_WINDOWS_DLL= /SUBSYSTEM:windows /DLL
+TMAKE_LFLAGS_QT_DLL = /BASE:0x39D00000
TMAKE_LIBS =
TMAKE_LIBS_CONSOLE =
-TMAKE_LIBS_WINDOWS = user32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib wsock32.lib
+TMAKE_LIBS_WINDOWS = user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
TMAKE_LIBS_QT = $(QTDIR)\lib\qt.lib
TMAKE_LIBS_QT_DLL = $(QTDIR)\lib\qtmain.lib
TMAKE_LIBS_QT_OPENGL = $(QTDIR)\lib\qgl.lib
diff --git a/tmake/lib/win32-msvc/vcapp.t b/tmake/lib/win32-msvc/vcapp.t
index 02e15e4..ac7ae23 100755
--- a/tmake/lib/win32-msvc/vcapp.t
+++ b/tmake/lib/win32-msvc/vcapp.t
@@ -2,6 +2,16 @@
#! This TMAKE template - Microsoft Visual C++ 5.0 applications
#!
#${
+ if ( Config("qt") ) {
+ if ( !(Project("DEFINES") =~ /QT_NODLL/) &&
+ ((Project("DEFINES") =~ /QT_(?:MAKE)?DLL/) ||
+ ($ENV{"QT_DLL"} && !$ENV{"QT_NODLL"})) ) {
+ Project('TMAKE_QT_DLL = 1');
+ if ( (Project("TARGET") eq "qt") && Project("TMAKE_LIB_FLAG") ) {
+ Project('CONFIG += dll');
+ }
+ }
+ }
if ( Config("qt") || Config("opengl") ) {
Project('CONFIG += windows');
}
@@ -11,25 +21,22 @@
if ( Config("opengl") ) {
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_OPENGL');
}
+ if ( Project("TMAKE_QT_DLL") ) {
+ Project('DEFINES *= QT_DLL');
+ }
Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT');
+ if ( Project("TMAKE_QT_DLL") ) {
+ my $qtver =FindHighestLibVersion($ENV{"QTDIR"} . "/lib", "qt");
+ Project("TMAKE_LIBS /= s/qt.lib/qt${qtver}.lib/");
+ Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL');
+ }
}
if ( Config("opengl") ) {
Project('TMAKE_LIBS *= $$TMAKE_LIBS_OPENGL');
}
Project('TMAKE_LIBS += $$LIBS');
- if ( Config("windows") ) {
- $project{"VC_PROJ_TYPE"} = 'Win32 (x86) Application';
- $project{"VC_PROJ_CODE"} = '0x0101';
- $vc_base_libs = 'kernel32.lib user32.lib gdi32.lib winspool.lib ' .
- 'comdlg32.lib advapi32.lib shell32.lib ole32.lib ' .
- 'oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ';
- $vc_libs = $vc_base_libs . 'wsock32.lib ';
- $vc_link_release = '/nologo /subsystem:windows /machine:I386';
- $vc_link_debug = '/nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept';
- $vc_cpp_def_release = '/D "NDEBUG" /D "WIN32" /D "_WINDOWS" ';
- $vc_cpp_def_debug = '/D "_DEBUG" /D "WIN32" /D "_WINDOWS" ';
- } else {
+ if ( Config("console") ) {
$project{"VC_PROJ_TYPE"} = 'Win32 (x86) Console Application';
$project{"VC_PROJ_CODE"} = '0x0103';
$vc_base_libs = 'kernel32.lib user32.lib gdi32.lib winspool.lib ' .
@@ -40,6 +47,17 @@
$vc_link_debug = '/nologo /subsystem:console /debug /machine:I386 /pdbtype:sept';
$vc_cpp_def_release = '/D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" ';
$vc_cpp_def_debug = '/D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" ';
+ } else {
+ $project{"VC_PROJ_TYPE"} = 'Win32 (x86) Application';
+ $project{"VC_PROJ_CODE"} = '0x0101';
+ $vc_base_libs = 'kernel32.lib user32.lib gdi32.lib winspool.lib ' .
+ 'comdlg32.lib advapi32.lib shell32.lib ole32.lib ' .
+ 'oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ';
+ $vc_libs = $vc_base_libs . 'wsock32.lib ';
+ $vc_link_release = '/nologo /subsystem:windows /machine:I386';
+ $vc_link_debug = '/nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept';
+ $vc_cpp_def_release = '/D "NDEBUG" /D "WIN32" /D "_WINDOWS" ';
+ $vc_cpp_def_debug = '/D "_DEBUG" /D "WIN32" /D "_WINDOWS" ';
}
$project{"VC_BASE_LINK_RELEASE"} = $vc_base_libs . $vc_link_release;
$project{"VC_BASE_LINK_DEBUG"} = $vc_base_libs . $vc_link_debug;
@@ -52,7 +70,7 @@
$vc_cpp_opt_common = '/YX /FD /c';
$project{"VC_BASE_CPP_RELEASE"} = $vc_cpp_opt_release . $vc_cpp_def_release . $vc_cpp_opt_common;
$project{"VC_BASE_CPP_DEBUG"} = $vc_cpp_opt_debug . $vc_cpp_def_debug . $vc_cpp_opt_common;
- ExpandGlue("INCPATH",'/I "','" /I "','"');
+ ExpandPath("INCPATH",'/I ',' /I ','');
if ( $text ne "" ) { $vc_inc = $text . " "; $text = ""; } else { $vc_inc = ""; }
ExpandGlue("DEFINES",'/D "','" /D "','"');
if ( $text ne "" ) { $vc_def = $text . " "; $text = ""; } else { $vc_def = ""; }
diff --git a/tmake/lib/win32-msvc/vclib.t b/tmake/lib/win32-msvc/vclib.t
index e56409e..11cd1d7 100755
--- a/tmake/lib/win32-msvc/vclib.t
+++ b/tmake/lib/win32-msvc/vclib.t
@@ -20,7 +20,7 @@
$vc_cpp_opt_common = '/YX /FD /c';
$project{"VC_BASE_CPP_RELEASE"} = $vc_cpp_opt_release . $vc_cpp_def_release . $vc_cpp_opt_common;
$project{"VC_BASE_CPP_DEBUG"} = $vc_cpp_opt_debug . $vc_cpp_def_debug . $vc_cpp_opt_common;
- ExpandGlue("INCPATH",'/I "','" /I "','"');
+ ExpandPath("INCPATH",'/I ',' /I ','');
if ( $text ne "" ) { $vc_inc = $text . " "; $text = ""; } else { $vc_inc = ""; }
ExpandGlue("DEFINES",'/D "','" /D "','"');
if ( $text ne "" ) { $vc_def = $text . " "; $text = ""; } else { $vc_def = ""; }
diff --git a/tmake/lib/win32-symantec/generic.t b/tmake/lib/win32-symantec/generic.t
index e22d9c1..78e1d77 100755
--- a/tmake/lib/win32-symantec/generic.t
+++ b/tmake/lib/win32-symantec/generic.t
@@ -108,7 +108,6 @@
Project('TMAKE_LIBS *= $$RES_FILE');
}
StdInit();
- $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
if ( Project("VERSION") ) {
$project{"VER_MAJ"} = $project{"VERSION"};
$project{"VER_MAJ"} =~ s/\.\d+$//;
@@ -127,7 +126,7 @@
CC = #$ Expand("TMAKE_CC");
CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
-INCPATH = #$ ExpandGlue("INCPATH",'-I"','" -I"','"');
+INCPATH = #$ ExpandPath("INCPATH",'-I',' -I','');
#$ !Project("TMAKE_APP_OR_DLL") && DisableOutput();
LINK = #$ Expand("TMAKE_LINK");
LFLAGS = #$ Expand("TMAKE_LFLAGS");
diff --git a/tmake/lib/win32-symantec/tmake.conf b/tmake/lib/win32-symantec/tmake.conf
index c2b7e68..02a0a8f 100755
--- a/tmake/lib/win32-symantec/tmake.conf
+++ b/tmake/lib/win32-symantec/tmake.conf
@@ -42,7 +42,7 @@ TMAKE_LFLAGS_WINDOWS_DLL= /SUBSYSTEM:windows /DLL
TMAKE_LIBS =
TMAKE_LIBS_CONSOLE =
-TMAKE_LIBS_WINDOWS = user32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib wsock32.lib
+TMAKE_LIBS_WINDOWS = user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
TMAKE_LIBS_QT = $(QTDIR)\lib\qt.lib
TMAKE_LIBS_QT_DLL = $(QTDIR)\lib\qtmain.lib
TMAKE_LIBS_QT_OPENGL = $(QTDIR)\lib\qgl.lib
diff --git a/tmake/lib/win32-visage/generic.t b/tmake/lib/win32-visage/generic.t
index fd928ad..aeec8db 100755
--- a/tmake/lib/win32-visage/generic.t
+++ b/tmake/lib/win32-visage/generic.t
@@ -108,7 +108,6 @@
Project('TMAKE_LIBS *= $$RES_FILE');
}
StdInit();
- $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
if ( Project("VERSION") ) {
$project{"VER_MAJ"} = $project{"VERSION"};
$project{"VER_MAJ"} =~ s/\.\d+$//;
@@ -127,7 +126,7 @@
CC = #$ Expand("TMAKE_CC");
CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D","");
-INCPATH = #$ ExpandGlue("INCPATH",'-I"','" -I"','"');
+INCPATH = #$ ExpandGlue("INCPATH",'-I',' -I','');
#$ !Project("TMAKE_APP_OR_DLL") && DisableOutput();
LINK = #$ Expand("TMAKE_LINK");
LFLAGS = #$ Expand("TMAKE_LFLAGS");
diff --git a/tmake/lib/win32-visage/tmake.conf b/tmake/lib/win32-visage/tmake.conf
index 3e20294..c909baf 100755
--- a/tmake/lib/win32-visage/tmake.conf
+++ b/tmake/lib/win32-visage/tmake.conf
@@ -42,7 +42,7 @@ TMAKE_LFLAGS_WINDOWS_DLL= -DLL
TMAKE_LIBS =
TMAKE_LIBS_CONSOLE =
-TMAKE_LIBS_WINDOWS = user32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib wsock32.lib
+TMAKE_LIBS_WINDOWS = user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
TMAKE_LIBS_QT = $(QTDIR)\lib\qt.lib
TMAKE_LIBS_QT_DLL = $(QTDIR)\lib\qtmain.lib
TMAKE_LIBS_QT_OPENGL = $(QTDIR)\lib\qgl.lib
diff --git a/tmake/lib/win32-watcom/generic.t b/tmake/lib/win32-watcom/generic.t
index a8c3990..0cc47bb 100755
--- a/tmake/lib/win32-watcom/generic.t
+++ b/tmake/lib/win32-watcom/generic.t
@@ -109,7 +109,6 @@
}
$linebreak = '&';
StdInit();
- $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
if ( Project("VERSION") ) {
$project{"VER_MAJ"} = $project{"VERSION"};
$project{"VER_MAJ"} =~ s/\.\d+$//;
@@ -131,7 +130,7 @@ QTDIR = #$ $text = $ENV{"QTDIR"};
#$ Config("qt") || EnableOutput();
CC = #$ Expand("TMAKE_CC");
CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-d="," -d=","");
-INCPATH = #$ ExpandGlue("INCPATH","-i="," -i=","");
+INCPATH = #$ ExpandPath("INCPATH",'-i=',' -i=','');
#$ !Project("TMAKE_APP_OR_DLL") && DisableOutput();
LINK = #$ Expand("TMAKE_LINK");
LFLAGS = #$ Expand("TMAKE_LFLAGS");
diff --git a/tmake/lib/win32/subdirs.t b/tmake/lib/win32/subdirs.t
index 57464c6..4c857fd 100755
--- a/tmake/lib/win32/subdirs.t
+++ b/tmake/lib/win32/subdirs.t
@@ -10,6 +10,8 @@
$m = $m . "\tcd $_\n\tDOMAKE\n\t\@cd ..\n";
}
$project{"SUBMAKE"} = $m;
+ Project('MAKEFILE') || Project('MAKEFILE = Makefile');
+ Project('TMAKE') || Project('TMAKE = tmake');
#$}
#!
# Makefile for building targets in sub directories.
@@ -18,18 +20,35 @@
# Template: #$ Expand("TEMPLATE");
#############################################################################
+MAKEFILE= #$ Expand("MAKEFILE");
+TMAKE = #$ Expand("TMAKE");
+
SUBDIRS = #$ ExpandList("SUBDIRS");
all: $(SUBDIRS)
#${
foreach ( split(/\s+/,$project{"SUBDIRS"}) ) {
- $text = $text . $_ . ": FORCE\n\t" .
+ if ( Project("TMAKE_NOFORCE") ) {
+ $text = $text . $_ . ":\n\t" .
+ "cd $_\n\t\$(MAKE\)\n\t\@cd ..\n\n";
+ } else {
+ $text = $text . $_ . ": FORCE\n\t" .
"cd $_\n\t\$(MAKE\)\n\t\@cd ..\n\n";
+ }
+ }
+#$}
+#$ TmakeSelf();
+
+tmake_all:
+#${
+ foreach ( split(/\s+/,$project{"SUBDIRS"}) ) {
+ $text .= "\tcd $_\n\t\$(TMAKE\) $_.pro -o \$(MAKEFILE)\n\t\@cd ..\n";
}
#$}
clean:
#$ $text = $project{"SUBMAKE"}; $text =~ s/DOMAKE/\$(MAKE\) clean/g;
-
+#$ Project("TMAKE_NOFORCE") && DisableOutput();
FORCE:
+#$ Project("TMAKE_NOFORCE") && EnableOutput();