Skip to content

Commit 2a05971

Browse files
authored
Merge pull request #683 from nasa/trick-cp-help
#677 Add trick-cp --help message
2 parents d6da626 + e17509b commit 2a05971

1 file changed

Lines changed: 79 additions & 1 deletion

File tree

bin/trick-CP

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
use File::Basename ;
77
use Cwd ;
88
use Cwd 'abs_path';
9+
use Pod::Usage ;
10+
use Pod::Text ;
911

1012
$trick_bin = dirname(abs_path($0)) ;
1113
$trick_home = dirname($trick_bin) ;
@@ -21,6 +23,8 @@ foreach $argnum (0 .. $#ARGV) {
2123
$makefileAddArgs = $makefileAddArgs . " debug ";
2224
} elsif ($arg =~ /-t/ ) {
2325
$makefileAddArgs = $makefileAddArgs . " test ";
26+
} elsif($arg=~ /-h/ ) {
27+
pod2usage(-sections => "NAME|SYNOPSIS|DESCRIPTION|OPTIONS|FILES", -verbose => 99) ;
2428
} else {
2529
$ENV{TRICK_CPFLAGS} .= " $arg" ;
2630
}
@@ -45,6 +49,81 @@ if ( -f "S_define" ) {
4549
print "S_define does not exist" ;
4650
exit 1 ;
4751
}
52+
53+
# trick-CP help message
54+
55+
=pod
56+
57+
=head1 NAME
58+
59+
trick-CP - Trick Configuration Processor
60+
61+
=head1 SYNOPSIS
62+
63+
trick-CP [OPTION]...
64+
65+
=head1 DESCRIPTION
66+
67+
trick-CP is the Trick environment Configuration Processor. trick-CP
68+
parses the simulation definition file, S_define, searching for math
69+
models to include in the simulation. trick-CP will search for the math
70+
models within the search paths included in TRICK_CFLAGS and
71+
TRICK_CXXFLAGS environment variables. trick-CP will generate code to
72+
call math models listed in the S_define file and will generate a make‐
73+
file to build these math models.
74+
75+
=head1 OPTIONS
76+
77+
=over 8
78+
79+
=item B<-g> | B<--debug>
80+
81+
Print the S_define file as it is processed by trick-CP. (This
82+
may help the user find problems with his/her simulation configu‐
83+
ration).
84+
85+
=item B<-h> | B<--help>
86+
87+
Print the trick-CP help message (this message)
88+
89+
=item B<-o> | B<--outfile> I<FILE_NAME>
90+
91+
Send CP output to FILE_NAME
92+
93+
=item B<-p> | B<--no-python>
94+
95+
Exclude python input processor from simulation.
96+
97+
=item B<-t>
98+
99+
Create a unit test simulation where TRICK_UNIT_TEST is defined during compilation
100+
101+
=item B<-v> | B<--verbose>
102+
103+
Set the verbose level. Valid entries are 0-3
104+
105+
=back
106+
107+
=head1 FILES
108+
109+
=over 8
110+
111+
=item B<build/S_source.cpp>
112+
113+
The simulation-specific executive source code file.
114+
115+
=item B<build/S_library_list>
116+
117+
The simulation-specific object code link list file.
118+
119+
=item B<S_default.dat>
120+
121+
The simulation-specific default initialization data file.
122+
123+
=back
124+
125+
=cut
126+
48127
__END__
49128
# CP found at SUB_TRICK_BIN
50129
@@ -196,4 +275,3 @@ distclean: clean
196275
197276
apocalypse: clean
198277
@echo "I love the smell of napalm in the morning"
199-

0 commit comments

Comments
 (0)