mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Standardize directory names
RedHat systems use a libexec directory, MacOSX and Ubuntu use lib. Changed our scripts and makefiles to handle both. refs #63
This commit is contained in:
parent
55ac9a7eea
commit
eed8837478
32
bin/trick-dp
32
bin/trick-dp
@ -1,34 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_dp that determines trick_home based on execution location of this script.
|
|
||||||
|
|
||||||
use FindBin qw($RealBin);
|
use FindBin qw($RealBin);
|
||||||
use lib "$RealBin/../libexec/trick/pm" ;
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
use File::Basename ;
|
use launch_java ;
|
||||||
use Cwd 'abs_path';
|
|
||||||
use gte ;
|
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
launch_java("Trick DP", "trick.dataproducts.trickdp.TrickDPApplication") ;
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
$host_cpu = gte("TRICK_HOST_CPU") ;
|
|
||||||
chomp($host_cpu) ;
|
|
||||||
$ENV{TRICK_HOST_CPU} = $host_cpu ;
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/ \\
|
|
||||||
-Xdock:name=\"Trick DP\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.dataproducts.trickdp.TrickDPApplication " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/ trick.dataproducts.trickdp.TrickDPApplication "
|
|
||||||
. join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use FindBin qw($RealBin);
|
||||||
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
|
use launch_java ;
|
||||||
|
|
||||||
|
launch_java("Data Recording Editor", "trick.dre.DreApplication") ;
|
||||||
|
|
||||||
if [ "${OSTYPE}" = "darwin" ]
|
|
||||||
then
|
|
||||||
java -classpath ${TRICK_HOME}/libexec/trick/java/dist/*:${TRICK_HOME}/libexec/trick/java/lib/* \
|
|
||||||
-Xdock:name="Data Recording Editor" \
|
|
||||||
-Xdock:icon=${TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \
|
|
||||||
trick.dre.DreApplication $@
|
|
||||||
else
|
|
||||||
java -classpath ${TRICK_HOME}/libexec/trick/java/dist/*:${TRICK_HOME}/libexec/trick/java/lib/* trick.dre.DreApplication $@
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use FindBin qw($RealBin);
|
use FindBin qw($RealBin);
|
||||||
use lib "$RealBin/../libexec/trick/pm" ;
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
use gte ;
|
use gte ;
|
||||||
use strict ;
|
use strict ;
|
||||||
|
|
||||||
|
@ -1,24 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_qp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
use File::Basename ;
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
use Cwd 'abs_path';
|
use launch_java ;
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
launch_java("Trick Plot", "trick.dataproducts.plot.JXPlotApplication") ;
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/ \\
|
|
||||||
-Xdock:name=\"Trick Plot\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.dataproducts.plot.JXPlotApplication " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/ trick.dataproducts.plot.JXPlotApplication " . join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
25
bin/trick-mm
25
bin/trick-mm
@ -1,26 +1,9 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_dp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
|
use launch_java ;
|
||||||
|
|
||||||
use File::Basename ;
|
launch_java("Monte Monitor", "trick.montemonitor.MonteMonitorApplication") ;
|
||||||
use Cwd 'abs_path';
|
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* \\
|
|
||||||
-Xdock:name=\"Monte Monitor\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.montemonitor.MonteMonitorApplication " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* trick.montemonitor.MonteMonitorApplication " . join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
|
||||||
|
@ -1,27 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_dp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
|
use launch_java ;
|
||||||
|
|
||||||
use File::Basename ;
|
launch_java("Event/Malvunction Trick View", "trick.mtv.MtvApp") ;
|
||||||
use Cwd 'abs_path';
|
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* \\
|
|
||||||
-Xdock:name=\"Event/Malfunction Trick View\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.mtv.MtvApp " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* trick.mtv.MtvApp " . join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
print "$command\n" ;
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
|
||||||
|
25
bin/trick-qp
25
bin/trick-qp
@ -1,25 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_qp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
use File::Basename ;
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
use Cwd 'abs_path';
|
use launch_java ;
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
launch_java("Trick QP", "trick.dataproducts.trickqp.TrickQPApplication") ;
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/ \\
|
|
||||||
-Xdock:name=\"Trick QP\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.dataproducts.trickqp.TrickQPApplication " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/ trick.dataproducts.trickqp.TrickQPApplication " . join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
|
||||||
|
@ -1,26 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_dp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
|
use launch_java ;
|
||||||
|
|
||||||
use File::Basename ;
|
launch_java("SIE", "trick.sie.SieApplication") ;
|
||||||
use Cwd 'abs_path';
|
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* \\
|
|
||||||
-Xdock:name=\"SIE\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.sie.SieApplication " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* trick.sie.SieApplication " . join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
|
||||||
|
@ -1,27 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_dp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
|
use launch_java ;
|
||||||
|
|
||||||
use File::Basename ;
|
launch_java("Sim Control", "trick.simcontrol.SimControlApplication") ;
|
||||||
use Cwd 'abs_path';
|
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* \\
|
|
||||||
-Xdock:name=\"Sim Control\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.simcontrol.SimControlApplication " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* \\
|
|
||||||
trick.simcontrol.SimControlApplication " . join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
|
||||||
|
@ -1,27 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_dp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
|
use launch_java ;
|
||||||
|
|
||||||
use File::Basename ;
|
launch_java("Sim Sniffer", "trick.sniffer.SimSnifferApplication") ;
|
||||||
use Cwd 'abs_path';
|
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* \\
|
|
||||||
-Xdock:name=\"Sim Sniffer\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.sniffer.SimSnifferApplication " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* trick.sniffer.SimSnifferApplication "
|
|
||||||
. join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
|
||||||
|
@ -1,36 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_dp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
|
use launch_java ;
|
||||||
|
|
||||||
use File::Basename ;
|
launch_java("Stripchart", "trick.stripchart.StripchartApplication") ;
|
||||||
use Cwd 'abs_path';
|
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/ \\
|
|
||||||
-Xdock:name=\"Stripchart\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.stripchart.StripchartApplication ";
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* trick.stripchart.StripchartApplication ";
|
|
||||||
}
|
|
||||||
|
|
||||||
# to preserve the quotes if the option value has spaces in it
|
|
||||||
foreach (@ARGV) {
|
|
||||||
if ( $_ =~ /\s/ ) {
|
|
||||||
$command = "$command \"$_\"";
|
|
||||||
} else {
|
|
||||||
$command = "$command $_";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
system $command;
|
|
||||||
|
|
||||||
exit $? >> 8;
|
|
||||||
|
26
bin/trick-tv
26
bin/trick-tv
@ -1,26 +1,8 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
# trick_dp that determines trick_home based on execution location of this script.
|
use FindBin qw($RealBin);
|
||||||
|
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||||
|
use launch_java ;
|
||||||
|
|
||||||
use File::Basename ;
|
launch_java("Trick View", "trick.tv.TVApplication") ;
|
||||||
use Cwd 'abs_path';
|
|
||||||
|
|
||||||
if ( ! exists $ENV{TRICK_HOME} ) {
|
|
||||||
$trick_bin = dirname(abs_path($0)) ;
|
|
||||||
$trick_home = dirname($trick_bin) ;
|
|
||||||
|
|
||||||
# set TRICK_HOME based on the value of trick_home
|
|
||||||
$ENV{TRICK_HOME} = $trick_home ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $^O eq "darwin" ) {
|
|
||||||
$command = "java -classpath $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* \\
|
|
||||||
-Xdock:name=\"Trick View\" \\
|
|
||||||
-Xdock:icon=$ENV{TRICK_HOME}/libexec/trick/java/resources/trick_icon.png \\
|
|
||||||
trick.tv.TVApplication " . join (" " , @ARGV) ;
|
|
||||||
} else {
|
|
||||||
$command = "java -cp $ENV{TRICK_HOME}/libexec/trick/java/dist/*:$ENV{TRICK_HOME}/libexec/trick/java/lib/* trick.tv.TVApplication " . join (" " , @ARGV) ;
|
|
||||||
}
|
|
||||||
system $command ;
|
|
||||||
exit $? >> 8;
|
|
||||||
|
|
||||||
|
@ -351,6 +351,9 @@ sub ICG(\@$$$) {
|
|||||||
|
|
||||||
if ( $operation eq "CP" ) {
|
if ( $operation eq "CP" ) {
|
||||||
|
|
||||||
|
next if ( $f =~ /$ENV{TRICK_HOME}\/include/) ;
|
||||||
|
next if ( $f =~ /$ENV{TRICK_HOME}\/trick_source/) ;
|
||||||
|
|
||||||
trick_print($$sim_ref{fh}, "Getting dependencies for $f\n" , "normal_white" , $$sim_ref{args}{v});
|
trick_print($$sim_ref{fh}, "Getting dependencies for $f\n" , "normal_white" , $$sim_ref{args}{v});
|
||||||
|
|
||||||
delete $$sim_ref{head_deps}{$f} ;
|
delete $$sim_ref{head_deps}{$f} ;
|
||||||
|
56
libexec/trick/pm/launch_java.pm
Normal file
56
libexec/trick/pm/launch_java.pm
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
package launch_java ;
|
||||||
|
@ISA = qw(Exporter);
|
||||||
|
@EXPORT = qw(launch_java);
|
||||||
|
|
||||||
|
# launch_java determines trick_home based on execution location of the calling script.
|
||||||
|
use File::Basename ;
|
||||||
|
use Cwd 'abs_path';
|
||||||
|
use gte ;
|
||||||
|
|
||||||
|
sub launch_java($$) {
|
||||||
|
|
||||||
|
my ($name, $application ) = @_ ;
|
||||||
|
|
||||||
|
if ( ! exists $ENV{TRICK_HOME} ) {
|
||||||
|
$trick_bin = dirname(abs_path($0)) ;
|
||||||
|
$trick_home = dirname($trick_bin) ;
|
||||||
|
|
||||||
|
# set TRICK_HOME based on the value of trick_home
|
||||||
|
$ENV{TRICK_HOME} = $trick_home ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( -e "$ENV{TRICK_HOME}/libexec/trick" ) {
|
||||||
|
$lib_dir = "libexec" ;
|
||||||
|
} else {
|
||||||
|
$lib_dir = "lib" ;
|
||||||
|
}
|
||||||
|
$java_dir = "$ENV{TRICK_HOME}/$lib_dir/trick/java" ;
|
||||||
|
|
||||||
|
$host_cpu = gte("TRICK_HOST_CPU") ;
|
||||||
|
chomp($host_cpu) ;
|
||||||
|
$ENV{TRICK_HOST_CPU} = $host_cpu ;
|
||||||
|
|
||||||
|
if ( $^O eq "darwin" ) {
|
||||||
|
$command = "java -classpath $java_dir/dist/*:$java_dir/lib/*:$java_dir/lib/ \\
|
||||||
|
-Xdock:name=\"$name\" \\
|
||||||
|
-Xdock:icon=$java_dir/resources/trick_icon.png \\
|
||||||
|
$application" ;
|
||||||
|
} else {
|
||||||
|
$command = "java -cp $java_dir/dist/*:$java_dir/lib/*:$java_dir/lib/ $application" ;
|
||||||
|
}
|
||||||
|
|
||||||
|
# to preserve the quotes if the option value has spaces in it
|
||||||
|
foreach (@ARGV) {
|
||||||
|
if ( $_ =~ /\s/ ) {
|
||||||
|
$command .= " \"$_\"";
|
||||||
|
} else {
|
||||||
|
$command .= " $_";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
system $command ;
|
||||||
|
exit $? >> 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
@ -599,15 +599,15 @@ build_user_lib : \$(BUILD_USER_OBJ_DIRS) \$(BUILD_USER_LIBS)
|
|||||||
print MAKEFILE "
|
print MAKEFILE "
|
||||||
\$(OBJECT_DIR)/S_source.o: S_source.cpp | \$(OBJECT_DIR)
|
\$(OBJECT_DIR)/S_source.o: S_source.cpp | \$(OBJECT_DIR)
|
||||||
\t\$(TRICK_CPPC) \$(TRICK_CXXFLAGS) -MMD -MP -c S_source.cpp -o \$(OBJECT_DIR)/S_source.o
|
\t\$(TRICK_CPPC) \$(TRICK_CXXFLAGS) -MMD -MP -c S_source.cpp -o \$(OBJECT_DIR)/S_source.o
|
||||||
\t\@\${TRICK_HOME}/libexec/trick/depend_objs S_source.cpp
|
\t\@\${TRICK_HOME}/\$(LIBEXEC)/trick/depend_objs S_source.cpp
|
||||||
|
|
||||||
\$(OBJECT_DIR)/class_map.o: \$(CURDIR)/io_src/class_map.cpp | \$(OBJECT_DIR)
|
\$(OBJECT_DIR)/class_map.o: \$(CURDIR)/io_src/class_map.cpp | \$(OBJECT_DIR)
|
||||||
\t\$(TRICK_CPPC) \$(TRICK_CXXFLAGS) -MMD -MP -c \$(CURDIR)/io_src/class_map.cpp -o \$(OBJECT_DIR)/class_map.o
|
\t\$(TRICK_CPPC) \$(TRICK_CXXFLAGS) -MMD -MP -c \$(CURDIR)/io_src/class_map.cpp -o \$(OBJECT_DIR)/class_map.o
|
||||||
\t\@\${TRICK_HOME}/libexec/trick/depend_objs class_map.cpp
|
\t\@\${TRICK_HOME}/\$(LIBEXEC)/trick/depend_objs class_map.cpp
|
||||||
|
|
||||||
\$(OBJECT_DIR)/enum_map.o: \$(CURDIR)/io_src/enum_map.cpp | \$(OBJECT_DIR)
|
\$(OBJECT_DIR)/enum_map.o: \$(CURDIR)/io_src/enum_map.cpp | \$(OBJECT_DIR)
|
||||||
\t\$(TRICK_CPPC) \$(TRICK_CXXFLAGS) -MMD -MP -c \$(CURDIR)/io_src/enum_map.cpp -o \$(OBJECT_DIR)/enum_map.o
|
\t\$(TRICK_CPPC) \$(TRICK_CXXFLAGS) -MMD -MP -c \$(CURDIR)/io_src/enum_map.cpp -o \$(OBJECT_DIR)/enum_map.o
|
||||||
\t\@\${TRICK_HOME}/libexec/trick/depend_objs enum_map.cpp
|
\t\@\${TRICK_HOME}/\$(LIBEXEC)/trick/depend_objs enum_map.cpp
|
||||||
|
|
||||||
-include \$(OBJECT_DIR)/S_source.dep
|
-include \$(OBJECT_DIR)/S_source.dep
|
||||||
-include \$(OBJECT_DIR)/class_map.dep
|
-include \$(OBJECT_DIR)/class_map.dep
|
||||||
@ -961,7 +961,7 @@ sub write_rules ($$$$) {
|
|||||||
print MAKEFILE "$k/object_\${TRICK_HOST_CPU}/$n" . "o : $k/$dir_info{src_dir}$n" . "c\n" ;
|
print MAKEFILE "$k/object_\${TRICK_HOST_CPU}/$n" . "o : $k/$dir_info{src_dir}$n" . "c\n" ;
|
||||||
if ( $dir_info{writable} ) {
|
if ( $dir_info{writable} ) {
|
||||||
print MAKEFILE "\tcd $k/$dir_info{src_dir} ; \$(TRICK_CC) \$(TRICK_CFLAGS) -MMD -MP -c \${\@F:.o=.c} -o \$\@\n" ;
|
print MAKEFILE "\tcd $k/$dir_info{src_dir} ; \$(TRICK_CC) \$(TRICK_CFLAGS) -MMD -MP -c \${\@F:.o=.c} -o \$\@\n" ;
|
||||||
print MAKEFILE "\t\@cd $k/$dir_info{src_dir} ; \${TRICK_HOME}/libexec/trick/depend_objs ${n}c\n" ;
|
print MAKEFILE "\t\@cd $k/$dir_info{src_dir} ; \${TRICK_HOME}/\$(LIBEXEC)/trick/depend_objs ${n}c\n" ;
|
||||||
|
|
||||||
print MAKEFILE "-include $k/object_\${TRICK_HOST_CPU}/${n}dep\n" ;
|
print MAKEFILE "-include $k/object_\${TRICK_HOST_CPU}/${n}dep\n" ;
|
||||||
}
|
}
|
||||||
@ -977,7 +977,7 @@ sub write_rules ($$$$) {
|
|||||||
if ( $dir_info{writable} ) {
|
if ( $dir_info{writable} ) {
|
||||||
#print MAKEFILE "\t\@echo \"Compiling $k/$dir_info{src_dir}[33m\${\@F:.o=.$ext}[00m\"\n" ;
|
#print MAKEFILE "\t\@echo \"Compiling $k/$dir_info{src_dir}[33m\${\@F:.o=.$ext}[00m\"\n" ;
|
||||||
print MAKEFILE "\tcd $k/$dir_info{src_dir} ; \$(TRICK_CPPC) \$(TRICK_CXXFLAGS) -MMD -MP -c \${\@F:.o=.$ext} -o \$\@\n" ;
|
print MAKEFILE "\tcd $k/$dir_info{src_dir} ; \$(TRICK_CPPC) \$(TRICK_CXXFLAGS) -MMD -MP -c \${\@F:.o=.$ext} -o \$\@\n" ;
|
||||||
print MAKEFILE "\t\@cd $k/$dir_info{src_dir} ; \${TRICK_HOME}/libexec/trick/depend_objs $n$ext\n" ;
|
print MAKEFILE "\t\@cd $k/$dir_info{src_dir} ; \${TRICK_HOME}/\$(LIBEXEC)/trick/depend_objs $n$ext\n" ;
|
||||||
|
|
||||||
print MAKEFILE "\n-include $k/object_\${TRICK_HOST_CPU}/${n}dep\n\n" ;
|
print MAKEFILE "\n-include $k/object_\${TRICK_HOST_CPU}/${n}dep\n\n" ;
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ sub make_swig_makefile($$$) {
|
|||||||
print MAKEFILE"\n\n" ;
|
print MAKEFILE"\n\n" ;
|
||||||
|
|
||||||
print MAKEFILE "convert_swig:\n" ;
|
print MAKEFILE "convert_swig:\n" ;
|
||||||
print MAKEFILE "\t\${TRICK_HOME}/libexec/trick/convert_swig \${TRICK_CONVERT_SWIG_FLAGS} S_source.hh\n" ;
|
print MAKEFILE "\t\${TRICK_HOME}/\$(LIBEXEC)/trick/convert_swig \${TRICK_CONVERT_SWIG_FLAGS} S_source.hh\n" ;
|
||||||
print MAKEFILE "\n\n" ;
|
print MAKEFILE "\n\n" ;
|
||||||
|
|
||||||
my %swig_dirs ;
|
my %swig_dirs ;
|
||||||
|
@ -44,6 +44,13 @@ $(error Please run $(TRICK_HOME)/configure before running make)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Where are the libexec executables
|
||||||
|
ifneq ("$(wildcard $(TRICK_HOME)/libexec)","")
|
||||||
|
LIBEXEC = libexec
|
||||||
|
else
|
||||||
|
LIBEXEC = lib
|
||||||
|
endif
|
||||||
|
|
||||||
# Do this section only once
|
# Do this section only once
|
||||||
ifndef TRICK_MAKE_COMMON
|
ifndef TRICK_MAKE_COMMON
|
||||||
export TRICK_MAKE_COMMON := 1
|
export TRICK_MAKE_COMMON := 1
|
||||||
|
@ -32,10 +32,10 @@ ${TRICK_LIB_DIR}/libtrick.a:
|
|||||||
|
|
||||||
Makefile_sim: S_define
|
Makefile_sim: S_define
|
||||||
@/bin/rm -rf lib_${TRICK_HOST_CPU} object_${TRICK_HOST_CPU}
|
@/bin/rm -rf lib_${TRICK_HOST_CPU} object_${TRICK_HOST_CPU}
|
||||||
@${TRICK_HOME}/libexec/trick/configuration_processor $(TRICK_CPFLAGS)
|
@${TRICK_HOME}/$(LIBEXEC)/trick/configuration_processor $(TRICK_CPFLAGS)
|
||||||
|
|
||||||
model_dirs:
|
model_dirs:
|
||||||
@${TRICK_HOME}/libexec/trick/configuration_processor -z
|
@${TRICK_HOME}/$(LIBEXEC)/trick/configuration_processor -z
|
||||||
|
|
||||||
tidy clean real_clean spotless apocalypse sie ICG force_ICG help convert_swig S_define_exp:
|
tidy clean real_clean spotless apocalypse sie ICG force_ICG help convert_swig S_define_exp:
|
||||||
@if [ -f Makefile_sim ] ; then $(MAKE) --no-print-directory -f Makefile_sim $@ ; else echo "No Makefile_sim found" ; fi
|
@if [ -f Makefile_sim ] ; then $(MAKE) --no-print-directory -f Makefile_sim $@ ; else echo "No Makefile_sim found" ; fi
|
||||||
|
@ -167,7 +167,7 @@ $(Y_OBJS) : $(OBJ_DIR)/%.tab.o : $(SRC_DIR)%.tab.c | $(OBJ_DIR)
|
|||||||
|
|
||||||
depend:
|
depend:
|
||||||
@ $(TRICK_CPPC) -MM $(TRICK_CXXFLAGS) $(C_SRC) $(CPP_SRC) >> $(DEPTEMPFILE)
|
@ $(TRICK_CPPC) -MM $(TRICK_CXXFLAGS) $(C_SRC) $(CPP_SRC) >> $(DEPTEMPFILE)
|
||||||
@ $(PERL) ${TRICK_HOME}/libexec/trick/depend_cp $(DEPTEMPFILE) > $(DEPFILE)
|
@ $(PERL) ${TRICK_HOME}/$(LIBEXEC)/trick/depend_cp $(DEPTEMPFILE) > $(DEPFILE)
|
||||||
@ $(RM) $(DEPTEMPFILE)
|
@ $(RM) $(DEPTEMPFILE)
|
||||||
@ echo "Created dependency file $(DEPFILE)"
|
@ echo "Created dependency file $(DEPFILE)"
|
||||||
|
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
|
|
||||||
INSTALL = /bin/install
|
INSTALL = /bin/install
|
||||||
|
|
||||||
|
|
||||||
|
# if we are on a Rehat system, the lib directory is lib64 on 64 bit machines
|
||||||
|
ifneq ("$(wildcard /etc/redhat-release)","")
|
||||||
UNAME_M := $(shell uname -m)
|
UNAME_M := $(shell uname -m)
|
||||||
ifeq ($(UNAME_M),x86_64)
|
ifeq ($(UNAME_M),x86_64)
|
||||||
TRICK_LIB_DIR := ${TRICK_HOME}/lib64
|
TRICK_LIB_DIR := ${TRICK_HOME}/lib64
|
||||||
else
|
else
|
||||||
TRICK_LIB_DIR := ${TRICK_HOME}/lib
|
TRICK_LIB_DIR := ${TRICK_HOME}/lib
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
TRICK_LIB_DIR := ${TRICK_HOME}/lib
|
||||||
|
endif
|
||||||
|
|
||||||
SHARED_LIB_OPT := -shared
|
SHARED_LIB_OPT := -shared
|
||||||
TRICK_LIBS = -Wl,-rpath=${TRICK_HOME}/lib:${TRICK_HOME}/lib64 -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip
|
TRICK_LIBS = -Wl,-rpath=${TRICK_HOME}/lib:${TRICK_HOME}/lib64 -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip
|
||||||
|
@ -37,7 +37,6 @@ void HeaderSearchDirs::AddCompilerBuiltInSearchDirs () {
|
|||||||
// all kinds of problems. On macs all headers are clang friendly.
|
// all kinds of problems. On macs all headers are clang friendly.
|
||||||
#if __linux
|
#if __linux
|
||||||
std::stringstream icg_dir ;
|
std::stringstream icg_dir ;
|
||||||
//icg_dir << std::string(getenv("TRICK_HOME")) << "/libexec/trick/lib/clang/" ;
|
|
||||||
icg_dir << LLVM_HOME << "/lib/clang/" ;
|
icg_dir << LLVM_HOME << "/lib/clang/" ;
|
||||||
icg_dir << __clang_major__ << "." << __clang_minor__ ;
|
icg_dir << __clang_major__ << "." << __clang_minor__ ;
|
||||||
#ifdef __clang_patchlevel__
|
#ifdef __clang_patchlevel__
|
||||||
|
@ -9,9 +9,9 @@ SRC_DIR = src
|
|||||||
SRC_FILES = $(shell find ${SRC_DIR} -type f -name \*.java)
|
SRC_FILES = $(shell find ${SRC_DIR} -type f -name \*.java)
|
||||||
BUILD_DIR = build
|
BUILD_DIR = build
|
||||||
DEST_DIR = ${BUILD_DIR}/classes
|
DEST_DIR = ${BUILD_DIR}/classes
|
||||||
LIB_DIR = ${TRICK_HOME}/libexec/trick/java/lib
|
LIB_DIR = ${TRICK_HOME}/$(LIBEXEC)/trick/java/lib
|
||||||
DIST_DIR = ${TRICK_HOME}/libexec/trick/java/dist
|
DIST_DIR = ${TRICK_HOME}/$(LIBEXEC)/trick/java/dist
|
||||||
RESOURCES_DIR = ${TRICK_HOME}/libexec/trick/java/resources
|
RESOURCES_DIR = ${TRICK_HOME}/$(LIBEXEC)/trick/java/resources
|
||||||
DOCS_API_DIR = docs/api
|
DOCS_API_DIR = docs/api
|
||||||
TEST_REPORTS_DIR = test/reports
|
TEST_REPORTS_DIR = test/reports
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user