ocs
Foo1
,
Foo2
and Foo3
. You might want to put these
structures in a subsystem foo
so you have them at hand for
consistent refinement as well as easy access. You can do so by
following these steps:
foo
.
This might be somewhere in your
home directory - if your subsystem is private - or some other place, if
you want to share your code with others.
Foo1.sign
through
Foo3.impl
) reside in the (newly created)
foo
directory.
SysDefs
with the following contents (the example below uses cat
,
whose input is terminated by ^D
):
$ cd foo foo $ cat > SysDefs SYSKIND=sub NODENAME=foo STRUCTS=Foo1 Foo2 Foo3 ^D foo $Note that it is important that the value assigned to NODENAME is equal to the base name of the current directory.
ocs
in the foo
directory, a
library will be created (provided the Opal sources are
context-correct). This results in (a) new file(s) libfoo.*
within
the subdirectory foo/OCS
.
Remark: by running"ocs -sub foo Foo1,Foo2,Foo3"
a fileSysDefs.foo
will be created which can be renamedSysDefs
.
foo
and bar
(which
have been created as above). Simply add the line(s)
GENSUBSYS= \ -s path-to-foo/foo \ -s path-to-bar/bar \ $(GENSTDSYS)to the corresponding
SysDefs
file.
If you have a whole hierarchy of libraries, these must be listed in a top-down manner. Finally, the standard libraries must be supplied by $(GENSTDSYS).
Remark: inclusion of libraries can also be done viaocs
command-line options, e.g."ocs -top HelloWorld hello -s path-to-foo/foo -s path-to-bar/bar"
.