Commit Graph

114 Commits

Author SHA1 Message Date
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