build-script.tmplt 2.03 KB
Newer Older
1 2 3
#!/bin/bash -e

# This script will build your system
Maxime Perrotin's avatar
Maxime Perrotin committed
4 5
# DO NOT EDIT THIS FILE
# Generated by TASTE on @_Now_@
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

# If you need additional pre-processing, there are three hook files
# that you can provide and that are called dring the build:
# user_init_pre.sh, user_init_post.sh and user_init_last.sh
# These files will never get overwritten by TASTE.
# Inside these files you may set some environment variables:
#    C_INCLUDE_PATH=/usr/include/xenomai/analogy/:${C_INCLUDE_PATH}
#    unset USE_POHIC

CWD=$(pwd)

if [ -t 1 ] ; then
    COLORON="\e[1m\e[32m"
    COLOROFF="\e[0m"
else
    COLORON=""
    COLOROFF=""
fi

INFO="${COLORON}[INFO]${COLOROFF}"

if [ -f user_init_pre.sh ]
then
    echo -e "${INFO} Executing user-defined init script"
    source user_init_pre.sh
fi

# By default, use PolyORB-HI-C runtime
USE_POHIC=1

# Set Debug mode by default
DEBUG_MODE=--debug

Maxime Perrotin's avatar
Maxime Perrotin committed
39
INTERFACEVIEW=@_Interface_View_Path_@
40 41

# Output path were the user code was generated
Maxime Perrotin's avatar
Maxime Perrotin committed
42
SKELS=@_Output_Path_@
43

44
@@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
45
@_Generate_Code_@
46
@@END_TABLE@@
47

48
@@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
49
@_Zip_Code_@
50
@@END_TABLE@@
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78

if [ -f ConcurrencyView.pro ]
then
    ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro "
elif [ -f ConcurrencyView_Properties.aadl ]
then
    ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView_Properties.aadl "
fi

if [ -f user_init_post.sh ]
then
    echo -e "${INFO} Executing user-defined post-init script"
    source user_init_post.sh
fi

if [ -f additionalCommands.sh ]
then
    source additionalCommands.sh
fi

if [ ! -z "$USE_POHIC" ]
then
    OUTPUTDIR=binary.c
    ORCHESTRATOR_OPTIONS+=" --with-polyorb-hi-c "
else
    OUTPUTDIR=binary.ada
fi

79 80 81 82 83 84
cd "$CWD" && \
assert-builder-ocarina.py \
   --fast      \
   --aadlv2    \
   --keep-case \
   $DEBUG_MODE \
Maxime Perrotin's avatar
Maxime Perrotin committed
85
   --interfaceView  "$INTERFACEVIEW"   \
86 87 88
   --deploymentView "$DEPLOYMENTVIEW"  \
   -o "$OUTPUTDIR" \
@@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
89
   @_REPLACE((\n)/):Functions_@
90
@@END_TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
91
   @_CodeCoverage_@ \
92 93 94 95 96 97 98 99
    $ORCHESTRATOR_OPTIONS

if [ -f user_init_last.sh ]
then
    echo -e "${INFO} Executing user-defined post-build script"
    source user_init_last.sh
fi
# End of build script