Commit 2f293d07 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add option for non-dll targets

parent 7200c986
...@@ -16,7 +16,7 @@ Author: Maxime.Perrotin@esa.int ...@@ -16,7 +16,7 @@ Author: Maxime.Perrotin@esa.int
__author__ = "Maxime Perrotin" __author__ = "Maxime Perrotin"
__license__ = "LGPL v3" __license__ = "LGPL v3"
__version__ = "1.0.3" __version__ = "1.0.4"
__url__ = "http://taste.tuxfamily.org" __url__ = "http://taste.tuxfamily.org"
import os import os
...@@ -53,7 +53,7 @@ build: ...@@ -53,7 +53,7 @@ build:
.PHONY: all clean build .PHONY: all clean build
''' '''
def parse_input_files(pr_files, ppty_file): def parse_input_files(pr_files, ppty_file, simu=True):
''' Invoke opengeode to parse the SDL models and use the expression ''' Invoke opengeode to parse the SDL models and use the expression
parser to analyse the properties (stop conditions) ''' parser to analyse the properties (stop conditions) '''
...@@ -122,7 +122,7 @@ def parse_input_files(pr_files, ppty_file): ...@@ -122,7 +122,7 @@ def parse_input_files(pr_files, ppty_file):
proc.content.start.transition.terminators = [decision] proc.content.start.transition.terminators = [decision]
process.content.inner_procedures.append(proc) process.content.inner_procedures.append(proc)
idx += 1 idx += 1
opengeode.AdaGenerator.generate(process, simu=True) opengeode.AdaGenerator.generate(process, simu=simu)
# gather asn.1 files and modules # gather asn.1 files and modules
asn1_files = ' '.join(ast[0].asn1_filenames) asn1_files = ' '.join(ast[0].asn1_filenames)
...@@ -142,6 +142,8 @@ def cli(): ...@@ -142,6 +142,8 @@ def cli():
parser = argparse.ArgumentParser(version=version) parser = argparse.ArgumentParser(version=version)
parser.add_argument('-g', '--verbose', action='store_true', default=False, parser.add_argument('-g', '--verbose', action='store_true', default=False,
help='Display debug information') help='Display debug information')
parser.add_argument('-d', '--no_dll', action='store_true', default=False,
help='Generate standalone Ada code (not for DLL use)')
parser.add_argument('-s', '--spec', dest='spec', default='./spec', parser.add_argument('-s', '--spec', dest='spec', default='./spec',
help='Path and filename of the property list (one per line)') help='Path and filename of the property list (one per line)')
parser.add_argument('models', metavar='file.pr', type=str, nargs='*', parser.add_argument('models', metavar='file.pr', type=str, nargs='*',
...@@ -164,7 +166,7 @@ def cli(): ...@@ -164,7 +166,7 @@ def cli():
log.debug('Property file: {}'.format(options.spec)) log.debug('Property file: {}'.format(options.spec))
try: try:
parse_input_files(options.models, options.spec) parse_input_files(options.models, options.spec, not options.no_dll)
except IOError as err: except IOError as err:
log.error(str(err)) log.error(str(err))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment