Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
dmt
Commits
35497bd8
Commit
35497bd8
authored
Sep 03, 2019
by
Thanassis Tsiodras
Browse files
Fix multiple launches of ASN1SCC when -j is used for Python A mapper.
parent
6bcf3b24
Changes
2
Hide whitespace changes
Inline
Side-by-side
dmt/A_mappers/python_A_mapper.py
View file @
35497bd8
...
...
@@ -131,6 +131,8 @@ def OnStartup(unused_modelingLanguage: str, asnFile: str, outputDir: str, badTyp
# mono_exe = "mono " if sys.platform.startswith('linux') else ""
mono_exe
=
"mono"
makefile_text
=
'''
\
export MAKEFLAGS="-j $(grep -c ^processor /proc/cpuinfo)"
ASN1SCC:=$(shell which asn1.exe)
ASN2DATAMODEL:=asn2dataModel
GRAMMAR := %(origGrammarBase)s
...
...
@@ -144,10 +146,27 @@ $(BDIR)/$(GRAMMAR)_getset.c: $(GRAMMAR).asn
%(tab)smkdir -p $(BDIR)
%(tab)s$(ASN2DATAMODEL) -toPython -o $(BDIR) $<
$(BDIR)/asn1crt.c $(BDIR)/$(GRAMMAR).c $(BDIR)/asn1crt_encoding.c $(BDIR)/asn1crt_encoding_uper.c $(BDIR)/asn1crt_encoding_acn.c $(BDIR)/$(GRAMMAR).h $(BDIR)/asn1crt.h: $(GRAMMAR).asn
%(tab)sif [ ! -f "$(GRAMMAR).acn" ] ; then %(mono)s $(ASN1SCC) -ACND -o $(BDIR) $< ; fi
# Create the ACN file if it is missing
$(BDIR)/$(GRAMMAR).acn:
%(tab)mono $(ASN1SCC) -ACND -o $(BDIR) $(GRAMMAR).asn
# The hell of multiple outputs (see https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html )
$(BDIR)/asn1crt.c: $(GRAMMAR).asn $(GRAMMAR).acn
%(tab)s%(mono)s $(ASN1SCC) -ACN -c -uPER -equal -o $(BDIR) $< $(GRAMMAR).acn
# The hell of multiple outputs (see https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html )
$(BDIR)/$(GRAMMAR).c $(BDIR)/asn1crt_encoding.c $(BDIR)/asn1crt_encoding_uper.c $(BDIR)/asn1crt_encoding_acn.c $(BDIR)/$(GRAMMAR).h $(BDIR)/asn1crt.h: $(BDIR)/asn1crt.c
## Recover from the removal of any of these
%(tab)s@for i in $@; do
\
%(tab)s if test -f "$$i" ; then :;
\
%(tab)s else
\
%(tab)s%(tab)srm -f $< ;
\
%(tab)s%(tab)s$(MAKE) $< ;
\
%(tab)s fi ;
\
%(tab)sdone
$(BDIR)/$(GRAMMAR).c $(BDIR)/asn1crt_encoding.c $(BDIR)/asn1crt_encoding_uper.c $(BDIR)/asn1crt_encoding_acn.c $(BDIR)/$(GRAMMAR).h $(BDIR)/asn1crt.h:
$(BDIR)/DV.py: $(GRAMMAR).asn $(BDIR)/$(GRAMMAR).h
%(tab)sgrep 'REQUIRED_BYTES_FOR_.*ENCODING' $(BDIR)/$(GRAMMAR).h | awk '{print $$2 " = " $$3}' > $@
%(tab)spython learn_CHOICE_enums.py %(base)s >> $@ || rm $@
...
...
setup.py
View file @
35497bd8
...
...
@@ -11,7 +11,7 @@ from setuptools import setup, find_packages
setup
(
name
=
'dmt'
,
version
=
"2.1.
39
"
,
version
=
"2.1.
40
"
,
packages
=
find_packages
(),
author
=
'Thanassis Tsiodras'
,
author_email
=
'Thanassis.Tsiodras@esa.int'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment