partition.tmplt 2.17 KB
Newer Older
1
2
3
4
5
@@-- The up to date list of tags available for this template is available here:
@@-- https://taste.tuxfamily.org/wiki/index.php?title=Kazoo_Templates_Documentation#templates.2Fconcurrency_view.2Fsub.2Fpartition.tmplt
@@-- If you are using vim, go over the URL and pres gx in to follow the link
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f or gf in vim to open the text doc:
@@-- $HOME/tool-inst/share/kazoo/doc/templates_concurrency_view_sub_partition.ascii
Maxime Perrotin's avatar
Maxime Perrotin committed
6
#  Build of partition @_Name_@ (common to all targets)
7
# (rule generated by templates/concurrency_view/aadl_4_makefile/partition.tmplt)
8
9
10
11
12
13
14
15
16
17
@_LOWER:Name_@:	@_REPLACE_ALL(,/ ):LOWER:Block_Names_@
  @@-- Opengeode generate intermediate ASN.1 files, they must be compiled
  @@-- (at partition level, not shared by all nodes)
  @@INLINE(	asn2dataModel -toAda -o ../dataview/Ada )( )(\n)@@
    @@TABLE@@
       @@IF@@ @_Block_Languages_@ = SDL
          ../@_LOWER:Block_Names_@/SDL/code/@_LOWER:Block_Names_@_datamodel.asn
       @@END_IF@@
    @@END_TABLE@@
  @@END_INLINE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
18

19
20
# Build of partition @_Name_@ for RTEMS (generate adainit)
# (rule generated by templates/concurrency_view/aadl_4_makefile/partition.tmplt)
Maxime Perrotin's avatar
Maxime Perrotin committed
21
@_LOWER:Name_@_rtems_ada : @_LOWER:Name_@
22
23
24
@@-- On RTEMS if using POHIC we need to have adainit created for Ada functions
	mkdir -p @_LOWER:Name_@_adainit && \
@@INLINE(    echo ')()()@@
25
26
27
28
29
30
   @@TABLE@@
      @@IF@@ @_LOWER:Block_Languages_@ = sdl or @_LOWER:Block_Languages_@ = ada
         with @_CAPITALIZE:Block_Names_@;
      @@END_IF@@
   @@END_TABLE@@
   package adainit is end adainit;' >@_LOWER:Name_@_adainit/tasteada.ads && \
31
32
@@END_INLINE@@
        cd @_LOWER:Name_@_adainit && \
Maxime Perrotin's avatar
Maxime Perrotin committed
33
@@INLINE(    )(:)( \\)@@
34
35
36
37
38
39
40
41
   ADA_INCLUDE_PATH=../../dataview/Ada
   @@TABLE'TERSE@@
      @@IF@@ @_LOWER:Block_Languages_@ = sdl
         ../../@_LOWER:Block_Names_@/SDL/code
      @@ELSIF@@ @_LOWER:Block_Languages_@ = ada
         ../../@_LOWER:Block_Names_@/Ada/src
      @@END_IF@@
   @@END_TABLE@@
42
43
@@END_INLINE@@
sparc-rtems5-gnatmake -c tasteada.ads && sparc-rtems5-gnatbind -t -n tasteada.ali -o ada-start.adb && mkdir -p ../@_LOWER:Node_Name_@/ada_code_startup && mv ada-start.* ../@_LOWER:Node_Name_@/ada_code_startup
44
45

@_Blocks_@