Like gcc, swig supports all those -M options. Use them to automatically
manage *_py.cpp dependencies.
Add dependency generation to trickify.mk as well.
Make spends a considerable amount of time checking targets against
built-in implicit rules. Let's turn them off, enjoy some speedup, and
see if anyone was relying on them!
Refs #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.
Changed some order only dependencies to actual dependencies. Added a
check in make_makefile_src for new files that should trigger recreating
Makefile_src.
CURDIR is used to produce absolute paths in S_source.d, which allows it
to be included from external makefiles. It is specifically intended to
be included from a Trickified project's user-facing makefile. That is,
the one the user is intended to include in a sim's S_overrides.mk. This
allows the project to automatically build their Trickified object as
part of a simulation build, but only when necessary as specified by the
dependencies.
Refs #309
Trick uses dlsym to dynamically load symbols at run time. At link time,
it cannot be known which symbols will be needed. When presented with a
library, the linker will only link in symbols that are known to be
needed. Therefore, the use of -whole-archive (Linux) or -force_load
(Mac) is necessary when linking a Trickified library into a sim.
We can simplify this by partially linking into an object instead of
creating a library. The linker will link all symbols in an object
regardless of whether or not they are known to be needed.
Refs #309
Moved makefile assignment of S_MAIN out of MAkefile.common to simulation
makefile. The definition in Makefile.common was causing trouble for
autotesting because it changes TRICK_HOST_CPU.
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.
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.
Add the ability to register callbacks for errors that occur on the
asynchronous variable sampling thread. Implement __del__ and call
close in case the user forgot. Join the asynchronous sampling thread
in close before returning.
Refs #365
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
The input file that is created while running monte carlo runs is done
in 3 different places. There was no easy way to collect all of those
lines in one place, so I duplicated the lines in the dryrun function.