Commit Graph

199 Commits

Author SHA1 Message Date
Derek Bankieris
3e3bc02cd2 Correct TRICK_CONVERT_SWIG_FLAGS in Makefile_swig
Fixes #770
2019-05-10 15:30:17 -05:00
Derek Bankieris
e6509df362 Improve scoping of SWIG %template directives
Refs #768 & Refs #769
2019-05-10 15:19:33 -05:00
dbankieris
ef1d105bfb
Improve parsing of base-clauses in S_define
A base-clause is the stuff in an inheritance list after the colon in a
class declaration.
https://en.cppreference.com/w/cpp/language/derived_class

Closes #723
Closes #733
2019-05-08 08:41:50 -05:00
Alex Lin
4d82c1589d Python init code does not work when using SWIG 4.0 #760
Forgot to reverse the import order for modules users are adding to
namespaces.  Interesting, the unit tests only failed on the Mac for
this.
2019-05-03 09:14:05 -05:00
Derek Bankieris
497f50e152 Immediately add file to md5s after check
Fixes #753
2019-04-11 08:55:41 -05:00
Derek Bankieris
bde2ec5158 Lift get_paths into its own module
Fixes #752
2019-04-09 13:28:16 -05:00
Scott Fennell
49e243b54a
Merge branch 'master' into VERBOSE-synonym 2019-04-02 13:34:52 -05:00
Scott Fennell
644a9a0e00 #741 add VERBOSE synonym everywhere 2019-03-21 09:28:52 -05:00
Alex Lin
41f151f2ee Adding doxygen style python module desgnation.
Adding another file to example that shows 2 files in same namespace.
2019-03-14 09:33:50 -05:00
Alex Lin
62948308b6 Adding back a lost capability, but better this time. The user can now
specify a python module name where the class and functions will be
visible in python.  With care the user can mimic the C++ namespaces their
models reside in, but it isn't perfect nor automatic.  It's still pretty
neat.
2019-03-13 16:17:08 -05:00
Alex Lin
bd4c25d927 convert_swig incorrectly excluding files #717
Added another grep to remove blank paths after abs_path is run.  abs_path will return blank if a path does not exist.  We want to remove that from the result.
2018-12-04 13:18:38 -06:00
Scott Fennell
6d5ce8d7bb #712 add TRICK_CPFLAGS to trick-gte output 2018-12-03 09:49:46 -06:00
Alex Lin
ca99386026 Trick S_define parser should return nonzero when it fails to find included header #694
Added S_source.hh as a dependency to S_main.exe.
2018-11-14 09:51:25 -06:00
Scott Fennell
422dcaacef remove runtime dependancy on java.se.ee 2018-11-05 14:32:02 -06:00
Scott Fennell
f2fdd33986 newline end of file 2018-11-05 14:05:39 -06:00
Scott Fennell
c34d2c6947 move dependance on java.se.ee to third party jars to support java 11 2018-11-05 14:01:52 -06:00
jmpenn
c112290265
Replace iText Java PDF library with PDFBox. (#664) 2018-09-04 16:59:06 -05:00
Scott Fennell
d42f75c507
Merge pull request #640 from nasa/swig-flags
#618 add TRICK_SWIG_FLAGS, TRICK_SYSTEM_SWIG_FLAGS, TRICK_SWIG_CFLAGS, TRICK_SYSTEM_SWIG_CFLAGS...
2018-07-09 10:45:39 -05:00
Scott Fennell
bf7ce2db3c #618 revert/remove TRICK_SYSTEM_SWIG_FLAGS. Wiki and trickify.mk update still required 2018-06-29 11:06:50 -05:00
anon
ef634c9f48 #618 add TRICK_SWIG_FLAGS, TRICK_SYSTEM_SWIG_FLAGS, TRICK_SWIG_CFLAGS, TRICK_SYSTEM_SWIG_CFLAGS. *_FLAGS are swig options, *_CFLAGS are g++ compiler options for swig objects. TRICK_SYSTEM_* options should not be changed by trick users 2018-06-27 13:58:44 -05:00
Derek Bankieris
e14e6bc1ec Fix make_makefile_src on CentOS 6
Closes #632
2018-06-21 11:40:00 -05:00
Derek Bankieris
3172be86b1 Fix special treatment of "src" AGAIN
Great feature. Really, I love it.

Refs #627
2018-06-11 13:10:36 -05:00
Derek Bankieris
a0faa289df Restore support for "batch compiling"
In LIBRARY DEPENDENCIES, any file ending in ".a" will cause all
files in that directory and any contained "src" directory to be
compiled. What a terrible "feature".

Refs #627
2018-06-11 13:10:36 -05:00
Derek Bankieris
98b621fd6e In "src", look for makefile_overrides one level up
I don't like this "feature", but it's baggage we're stuck with for now.

Refs #626
2018-06-11 13:10:36 -05:00
Derek Bankieris
334273fa81 Make everything about make_makefile_src better
Fixes #626 #627
2018-06-11 13:10:36 -05:00
Derek Bankieris
ea0878af26 Fix "objects:" in makefile_overrides
Fixes #626
2018-06-11 13:10:36 -05:00
abrogley
1015f6ec90 Retry curl operations to avoid transient failures. (#622) 2018-05-30 16:29:57 -05:00
Derek Bankieris
b6f06e01c1 Ignore unordered_map in convert_swig
Fixes #620
2018-05-16 14:20:25 -05:00
Scott Fennell
ba2df0757e #604 #490 add java.se.ee to application at runtime. (#605) 2018-04-23 17:10:49 -05:00
Alex Lin
8938c3b7b2 Clang no longer supports -Wno-unused-but-set-variable #600
Removed the compile time flag.
2018-04-12 08:41:25 -05:00
Scott Fennell
86eb23c7de #521 added unit tests to build and 3rd party XML formatter that does not rely on ant 2018-03-14 10:29:44 -05:00
Alex Lin
8be09638e7 make_makefile_swig sometimes goes into infinite loop #561
Found a similar loop in make_makefile_src that can go into an infinite loop.
2018-02-09 10:14:49 -06:00
Alex Lin
3ac538775b make_makefile_swig sometimes goes into infinite loop #561
Added a check to see if array has elements before we shift an empty array.
2018-02-09 09:38:58 -06:00
Derek Bankieris
4b2f6e660f Support use of MAKEFILE_LIST in makefile_overrides
Refs #544
2018-02-07 09:11:24 -06:00
Derek Bankieris
58103ff889 Purge empty/whitespace before calling abs_path
Fixes #542
2018-01-11 13:54:38 -06:00
Alex Lin
c694700148 Add environment variable to ignore types from ICG processing #535
Added a new environment variable TRICK_ICG_IGNORE_TYPES.  Class/struct/enum
types found in this semicolon delimited list will not have attributes written
out.
2017-12-19 10:02:41 -06:00
Derek Bankieris
da7a79e897 Invoke qualified lookup of add_job in SimObjects
Fixes #532
2017-12-13 07:58:20 -06:00
Alex Lin
5285f1a72e Symbolic links rise again #530
Found more places where symbolic links cause havoc.  Also added back a #define
that was removed in parameter_types.h and added back the messaging routines to
the list swig processes.
2017-12-12 10:17:24 -06:00
Derek Bankieris
29bd27e931 Restore (module="sim_services") to Trick %imports
Fixes #510
2017-11-03 10:22:38 -05:00
Thadeus Fleming
143d0f2c41 Make object .d files order-only prerequisites
This will ensure objects are rebuilt only due to a missing dependency
file, not a newer one.

Fixes #501.
2017-11-02 12:34:48 -05:00
Thadeus Fleming
b3f03e3fc4 Improve handling of sim object member initializers
Rather than just searching for the first pair of curly braces to find a
sim object's constructor, parse any member initializer list that is
present. Fixes #443.
2017-10-16 15:22:19 -05:00
Alex Lin
de012dde71 Feature request: Support checkpointing and logging of std::array #480
Added std::array as an STL type Trick recognizes.  We can now create io code
that can save and restore std::arrays like std::vectors and other similar
types. Like other STL types, an std::array cannot be logged or viewed in
trick-tv.
2017-09-27 16:01:52 -05:00
Alex Lin
86007c70cd convert_swig mishandles struct templates #468
The new regular expression added a pair of parentheses without the "?:"
substring to ignore the match.  I added the "?:"
2017-08-21 14:07:31 -05:00
David Hammen
8a42a9adcd Fixes #468 2017-08-09 09:14:35 -05:00
Christopher LaChance
7ef539f331 Replaced smartmatch operator with string equality operation. 2017-08-01 15:33:23 -05:00
Derek Bankieris
0bb5995397 Standardize missing S_define include error message
trick_print is not flexible enough for the kind of formatting I want to
do, so I added a new function, trick_formatted_print, that takes
alternating control sequences and strings to allow any kind of
formatting in the console. Like trick_print, it also prints to a file
with the control sequences removed.

Refs #436
2017-05-24 13:10:21 -05:00
Derek Bankieris
56bdafc68b Correct file extension regex in make_makefile_swig
Refs #426
2017-05-23 10:43:54 -05:00
Derek Bankieris
e25a1b6a1f Skip unsupported extensions in make_makefile_swig
There were a lot of places we would need to perform this check,
so just remove them from the list of files to process from the start.
Remove dead code. Refactor.
Refs #426
2017-05-17 14:22:20 -05:00
Derek Bankieris
d417b1bdf1 Ignore unsupported extension in make_makefile_swig
Refs #426
2017-05-16 15:31:07 -05:00
Alex Lin
a11e51cce7 Sim build doesn't stop on error #421
When I added the "tee" commands to split off command outputs to
a file and the screen, I forgot that the exit status of the make commands
takes the exit status of "tee" which does not ususally have an error and
masks any error in the actual compilation.  I added an exit ${PIPESTATUS[0]}
which returns the exit status of the compilation.
2017-05-15 13:36:06 -05:00
Alex Lin
b2ebe157ed Lost the MAKE_out file when we updated simulation makefiles #412
Added echos to all compile commands to append to MAKE_out.  tee'd
the output of the compile command so that it will go to both the MAKE_out
file and the screen.
2017-04-18 10:26:58 -05:00
Derek Bankieris
3affc2080e convert_swig: don't skip EXT_LIB paths for %import
When converting #include to %import statements, we should only skip
paths on TRICK_EXCLUDE and TRICK_SWIG_EXCLUDE, not TRICK_EXT_LIB_DIRS.

Refs #392
2017-04-04 09:25:35 -05:00
Derek Bankieris
a749118ce7 Remove -I$(<D) from Makefile_src rules
Refs #408
2017-03-31 09:24:39 -05:00
Derek Bankieris
2db341cff8 Revert (almost all of) 2e4c3286
Sadly, we cannot yet require SWIG 2.0.

Refs #400
2017-03-28 15:59:08 -05:00
Derek Bankieris
b53c52ac33 Separate ICG & SWIG exclusion constructs
Refs #392
2017-03-27 15:19:43 -05:00
Derek Bankieris
73cbbd96cd Refactor ICG to report skipped files consistently
Refs #394
2017-03-15 15:53:56 -05:00
Derek Bankieris
2e4c3286a3 Automatically generate dependencies with SWIG
Like gcc, swig supports all those -M options. Use them to automatically
manage *_py.cpp dependencies.
Add dependency generation to trickify.mk as well.
2017-03-14 13:38:09 -05:00
Derek Bankieris
e39d57461c Remove unused variables in make_makefile_src
Refs #360
2017-03-14 08:45:41 -05:00
Alex Lin
7c78187abf Using ccache seems to work but prints warnings #390
Found a place in the makefile where TRICK_CC was not being set correctly.
Also found a case in gte.pm where we are not handling ccache properly.
2017-03-13 15:11:57 -05:00
Alex Lin
85f2435af7 S_overrides.mk is included twice when building #360
All .i files for SWIG must be created before SWIG is run.  Added an
order only rule to make sure this happens.
2017-02-28 14:15:34 -06:00
Derek Bankieris
9974e7698d Use -Wno-unused-parameter when compiling SWIG code
Refs #360
2017-02-27 08:56:09 -06:00
Derek Bankieris
ca4dce3582 Fix newline spacing & restore MODEL_OBJECTS header
Refs #360
2017-02-24 09:09:31 -06:00
Alex Lin
b2f8c9894e S_overrides.mk is included twice when building #360
Moving targets to the more correct makefile like defining S_MAIN should
be in make_makefile_src.  Moved the makefile_overrides rules read from
directories into their own makefile.
2017-02-24 08:44:34 -06:00
Derek Bankieris
738959eba1 Add missing prerequisites on dependency files
Refs #360
2017-02-23 16:02:32 -06:00
Alex Lin
31f0ea95ad S_overrides.mk is included twice when building #360
Moved some rules from trick-CP to convert_swig.  Using alternative pattern
rules in Makefile_src I believe is faster.
2017-02-23 14:05:38 -06:00
Derek Bankieris
e6ad95f493 Grand Make Dependency Graph, part 1
Refs #360
2017-02-23 13:26:28 -06:00
Alex Lin
02617bf7da S_overrides.mk is included twice when building #360
Changed some order only dependencies to actual dependencies.  Added a
check in make_makefile_src for new files that should trigger recreating
Makefile_src.
2017-02-22 08:44:12 -06:00
Alex Lin
337139cacb S_overrides.mk is included twice when building #360
A different approach.  Instead of trying to limit the number of times
S_overrides.mk is included, combine the makefiles so only one
call to make is made.
2017-02-09 09:46:58 -06:00
Derek Bankieris
29bdbee8fa Revert 150ea9f
We've agreed that the long-term solution is to refactor the makefiles so
we don't use recursive make. Until then, continue double including
S_overrides.mk so that the $(S_MAIN) target is available in
S_overrides.mk. Resolve #360 by having Trickified libraries use
target-specific variables (ironically, on $(S_MAIN)) to avoid
duplication of the -whole-archive option.
2017-02-06 15:25:18 -06:00
Derek Bankieris
4146b440b8 Make trick (Python package) a namespace package
Namespace packages are a mechanism for splitting a single Python
package across multiple directories on disk. With the addition of
$(TRICK_HOME)/pymods/trick, there now exists a package named 'trick' at
$(TRICK_HOME)/pymods and in each SIM_* directory. This change allows sims
to import modules from both locations.

Refs #365
2017-01-20 10:30:21 -06:00
Alex Lin
c796522d92 Check link dependencies against exclude flags #351
Added the directories in TRICK_EXT_LIB_DIRS to the directories in
TRICK_EXCLUDE to exclude all source files that are to be built
in libraries.
2017-01-12 14:33:39 -06:00
Alex Lin
0140b0b966 Add ability to use doxygen style library dependencies in S_define file. #373
Added a regular expression to collect the library dependencies in the S_define
file.
2017-01-10 08:09:19 -06:00
Derek Bankieris
7a08829d3d Introduce makefile variable TRICK_SYSTEM_LDFLAGS
Like other TRICK_SYSTEM variables, users should not modify this.

This renders TRICK_LDFLAGS and TRICK_USER_LINK_LIBS redundant. While we
would like to eventually remove TRICK_USER_LINK_LIBS, it's not likely to
ever actually happen.

Refs #369
2016-12-14 12:36:21 -06:00
Derek Bankieris
150ea9f094 Remove double include of S_overrides.mk
Refs #360
2016-12-07 14:19:52 -06:00
Derek Bankieris
c1af5ba0e2 Correct class declaration regex
The pattern looking for inheritance should be optional #332
2016-10-26 08:51:04 -05:00
Derek Bankieris
b9ede7432a Correct class declaration regex #332 2016-10-25 15:36:45 -05:00
Derek Bankieris
055a7337e4 Match entire class declaration at once
The previous commit fixed the original issue, but matched templated
classes incorrectly. This should handle all cases. #332
2016-10-25 12:51:51 -05:00
Derek Bankieris
73816bbd9a Corrected regex to match classes that don't inherit #332 2016-10-25 12:36:18 -05:00
Alex Lin
f1cbacd646 ICG exclude of class member variables now defines incorrect memory offsets in io_src #311
This changes back the default behavior to not use offsetof in io_src code.
Added a flag to ICG, -c or --compat15, to globally generate offsetof statements.
Added an ENV variable that can be used to generate offsetof statements by file or directory.
Added in a warning if classes parsed at ICG time are different in size than at runtime.
2016-10-21 13:13:43 -05:00
Derek Bankieris
f5e223cee9 Standardize output format #326 2016-10-21 10:06:23 -05:00
Derek Bankieris
dae2b0e1c3 Corrected SWIG ignore warning number #326 2016-10-19 14:48:28 -05:00
Derek Bankieris
4db4427f5d Ignore SWIG nested class warnings #326 2016-10-19 14:42:50 -05:00
Derek Bankieris
2fb06cf133 Got rid of the individual io, py, and model conglomerate objects #326
Link all of the objects as part of the S_MAIN target using the link lists.
Renamed some variables and files to make them more self-descriptive.
2016-10-18 13:06:42 -05:00
Derek Bankieris
51c544a5d7 Replaced the per directory, per extension bookkeeping with pattern rules and a single list of model object files (#326).
Also, I went ahead and removed lex and yacc support since it didn't fit with the new approach and hasn't worked for over a year (#102).
2016-10-13 13:30:41 -05:00
Derek Bankieris
f3fc813234 Narrowed the scope of a static pattern rule 2016-10-12 13:57:43 -05:00
Derek Bankieris
4eafabe1f1 Fix support for source file extension .c++ #326 2016-10-12 13:55:51 -05:00
Derek Bankieris
86ee472a84 More build output format normalization #326 2016-10-12 10:52:31 -05:00
Derek Bankieris
efb20e7d5f Prepend the execution of S_MAIN with ./ #326 2016-10-11 13:25:07 -05:00
Derek Bankieris
abc7072918 Return the rediculous "feature" of automagically including -I$(PWD)/../include in the compiler flags 2016-10-06 15:37:43 -05:00
Derek Bankieris
47c8c2efb9 Removed dead code 2016-10-06 15:04:16 -05:00
Derek Bankieris
f161ddb18c Made everything about Trick's build process better 2016-10-06 13:54:06 -05:00
Alex Lin
2eadf217a9 c preprocessor statements don't work in Trick header blocks in header files #317
Copied the block of code that sends header file comments through the preprocessor from
15.x to trunk.  This block was left out and is now used by both headers and source files.
2016-09-26 08:35:26 -05:00
Derek Bankieris
ba59606b1d Added TRICK_PYTHON_PATH environment variable #313 2016-09-16 09:20:11 -05:00
Alex Lin
858602fe01 New STL framework doesn't support const #293
So using consts as arguments to STLs causes errors in our io code and SWIG.
Added a check for const template arguments and going to ignore them for
both ICG and what we input to SWIG.
2016-08-25 08:42:43 -05:00
Alex Lin
ca02209d8f man pages completely out of date #253
Created man pages for each executable we have in bin.  Updated the
couple of man pages we did have in there.  Modified trick-CP
to accept arguments.  Updated the version number reported by ICG
as well.
2016-08-02 09:56:43 -05:00
Alex Lin
ae9555b4a6 convert_swig puts double double quotes at end of full path includes
When extracting include files full path file names fall through all
of the logic that strips quotes off of the path.  This leads to double
double quotes in the output.  Added an else statement that catches
all other include files and strips the quotes off of pathnames.

refs #267
2016-07-07 13:41:54 -05:00
Alex Lin
4ab584ed55 Support using Python 3
Fixed the configure script to allow the user to specify using a python3
interpreter.  Had to change the the way to load the swig generated python modules.
Also had to change code dealing with python strings, oct, long, and
boolean operations.

refs #258
2016-06-28 13:44:21 -05:00
Alex Lin
1224c43e7f Set and use LD in our makefiles correctly.
Set LD in our makefiles to the ld executable found by configure.
Changed the final sim link to use TRICK_CPPC as the link command since
it was using the compiler anyways.  Changed the places where we use "ld" to
use LD.

refs #131
2016-06-27 12:48:35 -05:00
Derek Bankieris
14d4c94b2e refs #256 Pass -Djava.net.preferIPv4Stack=true when launching Java GUIs to eliminate socket error. 2016-06-22 12:33:29 -05:00
Alex Lin
fb4601734f Need to include SimTime.hh for ICG and swig processing.
Added the sim time header files to files_to_ICG.hh and sim_services.i so it will be processed.

refs #247
2016-06-15 16:11:09 -05:00