summaryrefslogtreecommitdiffstats
path: root/scilab/modules/scicos
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-04-14 15:51:22 +0200
committerAllan CORNET <allan.cornet@scilab.org>2010-04-14 16:26:01 +0200
commit6f50b60a1bb494226678394ecc1c058b4c971e28 (patch)
treebd4c5fbce026ab872b9d09195c91d2709bca40f5 /scilab/modules/scicos
parentcc66fb4f35011dd936b0adac35d60653369fe293 (diff)
downloadscilab-6f50b60a1bb494226678394ecc1c058b4c971e28.zip
scilab-6f50b60a1bb494226678394ecc1c058b4c971e28.tar.gz
bug 6903
Change-Id: Iecfa0fb0442bf23353b51ccacc6b5059ff2326b1
Diffstat (limited to 'scilab/modules/scicos')
-rw-r--r--scilab/modules/scicos/.gitignore7
-rw-r--r--scilab/modules/scicos/src/translator/compilation/makefile.mak53
-rw-r--r--scilab/modules/scicos/src/translator/exceptionHandling/makefile.mak56
-rw-r--r--scilab/modules/scicos/src/translator/instantiation/makefile.mak51
-rw-r--r--scilab/modules/scicos/src/translator/makefile.mak123
-rw-r--r--scilab/modules/scicos/src/translator/parsing/makefile.mak57
-rw-r--r--scilab/modules/scicos/src/translator/translation/makefile.mak59
-rw-r--r--scilab/modules/scicos/tests/nonreg_tests/bug_6903.tst22
8 files changed, 98 insertions, 330 deletions
diff --git a/scilab/modules/scicos/.gitignore b/scilab/modules/scicos/.gitignore
index 7153b95..4b9a02b 100644
--- a/scilab/modules/scicos/.gitignore
+++ b/scilab/modules/scicos/.gitignore
@@ -68,7 +68,12 @@ src/translator/translation/libraryManager.cmo
68src/translator/translation/translator.cmo 68src/translator/translation/translator.cmo
69src/translator/translation/versiondate.cmo 69src/translator/translation/versiondate.cmo
70 70
71 71# .tmp files generated on Windows
72src/translator/translation/*.obj
73src/translator/parsing/*.obj
74src/translator/compilation/*.obj
75src/translator/instantiation/*.obj
76src/translator/exceptionHandling/*.obj
72 77
73 78
74# 79#
diff --git a/scilab/modules/scicos/src/translator/compilation/makefile.mak b/scilab/modules/scicos/src/translator/compilation/makefile.mak
deleted file mode 100644
index 1832bec..0000000
--- a/scilab/modules/scicos/src/translator/compilation/makefile.mak
+++ /dev/null
@@ -1,53 +0,0 @@
1# Scicos
2#
3# Copyright (C) INRIA - scilab
4# Copyright (C) DIGITEO - 2009 - Allan CORNET
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19#
20# See the file ./license.txt
21
22!IF "$(OCAMLLIB)" == ""
23OCAMLPATH=C:\Program Files\Objective Caml
24!ELSE
25OCAMLPATH=$(OCAMLLIB)\..
26!ENDIF
27
28OCAMLPATHBIN=$(OCAMLPATH)\bin
29OCAMLPATHLIB=$(OCAMLPATH)\lib
30OCAMLC=ocamlc
31OCAMLOPT=ocamlopt
32OCAMLDEP=ocamldep
33CAMLP4=camlp4
34OCAMLYACC=ocamlyacc
35OCAMLLEX=ocamllex
36RM=del
37
38all::
39 $(OCAMLC) -g -I ..\parsing -c types.ml
40 $(OCAMLC) -g -I ..\parsing -c nameResolve.ml
41 $(OCAMLC) -g -I ..\parsing -a -o compilation.cma types.cmo nameResolve.cmo
42
43
44clean::
45 @-$(RM) *.cmo
46 @-$(RM) *.cma
47 @-$(RM) *.cmi
48
49distclean::
50 @-$(RM) *.cmo
51 @-$(RM) *.cma
52 @-$(RM) *.cmi
53 \ No newline at end of file
diff --git a/scilab/modules/scicos/src/translator/exceptionHandling/makefile.mak b/scilab/modules/scicos/src/translator/exceptionHandling/makefile.mak
deleted file mode 100644
index 48f4abb..0000000
--- a/scilab/modules/scicos/src/translator/exceptionHandling/makefile.mak
+++ /dev/null
@@ -1,56 +0,0 @@
1# Scicos
2#
3# Copyright (C) INRIA - scilab
4# Copyright (C) DIGITEO - 2009 - Allan CORNET
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19#
20# See the file ./license.txt
21
22!IF "$(OCAMLLIB)" == ""
23OCAMLPATH=C:\Program Files\Objective Caml
24!ELSE
25OCAMLPATH=$(OCAMLLIB)\..
26!ENDIF
27
28OCAMLPATHBIN=$(OCAMLPATH)\bin
29OCAMLPATHLIB=$(OCAMLPATH)\lib
30OCAMLC=ocamlc
31OCAMLOPT=ocamlopt
32OCAMLDEP=ocamldep
33CAMLP4=camlp4
34OCAMLYACC=ocamlyacc
35OCAMLLEX=ocamllex
36RM=del
37
38all::
39 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c ..\parsing\parser.ml
40 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c ..\compilation\nameResolve.ml
41 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c ..\instantiation\instantiation.ml
42 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c errorDico.ml
43 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c msgDico.ml
44 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c ..\parsing\linenum.ml
45 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c exceptHandler.ml
46 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ../instantiation -a -o exceptionHandling.cma errorDico.cmo msgDico.cmo exceptHandler.cmo
47
48clean::
49 @-$(RM) *.cmo
50 @-$(RM) *.cma
51 @-$(RM) *.cmi
52
53distclean::
54 @-$(RM) *.cmo
55 @-$(RM) *.cma
56 @-$(RM) *.cmi
diff --git a/scilab/modules/scicos/src/translator/instantiation/makefile.mak b/scilab/modules/scicos/src/translator/instantiation/makefile.mak
deleted file mode 100644
index d29cea6..0000000
--- a/scilab/modules/scicos/src/translator/instantiation/makefile.mak
+++ /dev/null
@@ -1,51 +0,0 @@
1# Scicos
2#
3# Copyright (C) INRIA - scilab
4# Copyright (C) DIGITEO - 2009 - Allan CORNET
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19#
20# See the file ./license.txt
21
22!IF "$(OCAMLLIB)" == ""
23OCAMLPATH=C:\Program Files\Objective Caml
24!ELSE
25OCAMLPATH=$(OCAMLLIB)\..
26!ENDIF
27
28OCAMLPATHBIN=$(OCAMLPATH)\bin
29OCAMLPATHLIB=$(OCAMLPATH)\lib
30OCAMLC=ocamlc
31OCAMLOPT=ocamlopt
32OCAMLDEP=ocamldep
33CAMLP4=camlp4
34OCAMLYACC=ocamlyacc
35OCAMLLEX=ocamllex
36RM=del
37
38all::
39 $(OCAMLC) -g -I ..\parsing -I ..\compilation -c instantiation.ml
40 $(OCAMLC) -g -I ..\parsing -I ..\compilation -a -o instantiation.cma instantiation.cmo
41
42
43clean::
44 @-$(RM) *.cmo
45 @-$(RM) *.cma
46 @-$(RM) *.cmi
47
48distclean::
49 @-$(RM) *.cmo
50 @-$(RM) *.cma
51 @-$(RM) *.cmi
diff --git a/scilab/modules/scicos/src/translator/makefile.mak b/scilab/modules/scicos/src/translator/makefile.mak
index cf806ba..c3d0821 100644
--- a/scilab/modules/scicos/src/translator/makefile.mak
+++ b/scilab/modules/scicos/src/translator/makefile.mak
@@ -18,60 +18,77 @@
18# 18#
19# See the file ./license.txt 19# See the file ./license.txt
20 20
21MAKE=nmake /f makefile.mak 21!IF "$(OCAMLLIB)" == ""
22OCAMLPATH=C:\Program Files\Objective Caml
23!ELSE
24OCAMLPATH=$(OCAMLLIB)\..
25!ENDIF
22 26
23all:: 27OCAMLPATHBIN=$(OCAMLPATH)\bin
24 @cd parsing 28OCAMLPATHLIB=$(OCAMLPATH)\lib
25 @$(MAKE) all 29OCAMLC=ocamlc
26 @cd .. 30OCAMLOPT=ocamlopt
31OCAMLDEP=ocamldep
32CAMLP4=camlp4
33OCAMLYACC=ocamlyacc
34OCAMLLEX=ocamllex
35RM=del
36EXEC=modelicat.exe
37INCLUDEPATHS=-I ./compilation -I ./exceptionHandling -I ./parsing -I ./instantiation -I ./translation
27 38
28 @cd compilation 39all::
29 @$(MAKE) all 40 $(OCAMLYACC) parsing/parser.mly
30 @cd .. 41 $(RM) parsing\parser.mli
31 42 $(OCAMLLEX) parsing/lexer.mll
32 @cd instantiation 43 $(OCAMLC) $(INCLUDEPATHS) -c parsing/syntax.ml parsing/parser.ml
33 @$(MAKE) all 44 $(OCAMLC) $(INCLUDEPATHS) -c parsing/parser.ml parsing/lexer.ml
34 @cd .. 45 $(OCAMLC) $(INCLUDEPATHS) -c parsing/lexer.ml parsing/linenum.ml
35 46 $(OCAMLC) $(INCLUDEPATHS) -c parsing/linenum.ml compilation/types.ml
36 @cd exceptionHandling 47 $(OCAMLC) $(INCLUDEPATHS) -c compilation/types.ml compilation/nameResolve.ml
37 @$(MAKE) all 48 $(OCAMLC) $(INCLUDEPATHS) -c compilation/nameResolve.ml instantiation/instantiation.ml
38 @cd .. 49 $(OCAMLC) $(INCLUDEPATHS) -c instantiation/instantiation.ml exceptionHandling/msgDico.ml
39 50 $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/msgDico.ml exceptionHandling/errorDico.ml
40 @cd translation 51 $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/errorDico.ml exceptionHandling/exceptHandler.ml
41 @$(MAKE) all 52 $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/exceptHandler.ml translation/libraryManager.ml
42 @cd .. 53 $(OCAMLC) $(INCLUDEPATHS) -c translation/libraryManager.ml translation/codeGeneration.ml
43 54 $(OCAMLC) $(INCLUDEPATHS) -c translation/codeGeneration.ml
55 $(OCAMLC) $(INCLUDEPATHS) -c translation/versiondate.ml translation/translator.ml
56 $(OCAMLC) $(INCLUDEPATHS) -c translation/translator.ml parsing/syntax.ml
57 $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/syntax.ml parsing/parser.ml
58 $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/parser.ml parsing/lexer.ml
59 $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/lexer.ml parsing/linenum.ml
60 $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/linenum.ml compilation/types.ml
61 $(OCAMLOPT) $(INCLUDEPATHS) -c compilation/types.ml compilation/nameResolve.ml
62 $(OCAMLOPT) $(INCLUDEPATHS) -c compilation/nameResolve.ml instantiation/instantiation.ml
63 $(OCAMLOPT) $(INCLUDEPATHS) -c instantiation/instantiation.ml exceptionHandling/msgDico.ml
64 $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/msgDico.ml exceptionHandling/errorDico.ml
65 $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/errorDico.ml exceptionHandling/exceptHandler.ml
66 $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/exceptHandler.ml translation/libraryManager.ml
67 $(OCAMLOPT) $(INCLUDEPATHS) -c translation/libraryManager.ml translation/codeGeneration.ml
68 $(OCAMLOPT) $(INCLUDEPATHS) -c translation/codeGeneration.ml
69 $(OCAMLOPT) $(INCLUDEPATHS) -c translation/versiondate.ml translation/translator.ml
70 $(OCAMLOPT) $(INCLUDEPATHS) -c translation/translator.ml
71 $(OCAMLOPT) -o $(EXEC) $(INCLUDEPATHS) nums.cmxa ./parsing/syntax.cmx ./parsing/parser.cmx \
72 ./parsing/lexer.cmx ./parsing/linenum.cmx ./compilation/types.cmx ./compilation/nameResolve.cmx \
73 ./instantiation/instantiation.cmx ./exceptionHandling/msgDico.cmx ./exceptionHandling/errorDico.cmx \
74 ./exceptionHandling/exceptHandler.cmx ./translation/libraryManager.cmx ./translation/codeGeneration.cmx \
75 ./translation/versiondate.cmx ./translation/translator.cmx
76 @copy $(EXEC) ..\..\..\..\bin\$(EXEC)
77 $(RM) parsing\parser.ml
78 $(RM) parsing\lexer.ml
44clean:: 79clean::
45 @cd compilation 80 @-del /s *.cmi
46 @$(MAKE) clean 81 @-del /s *.cmo
47 @cd .. 82 @-del /s *.cmx
48 83 @-del /s *.cma
49 @cd instantiation 84 @-del /s *.obj
50 @$(MAKE) clean 85 @-del $(EXEC)
51 @cd ..
52
53 @cd exceptionHandling
54 @$(MAKE) clean
55 @cd ..
56
57 @cd translation
58 @$(MAKE) clean
59 @cd ..
60
61distclean::
62 @cd compilation
63 @$(MAKE) distclean
64 @cd ..
65
66 @cd instantiation
67 @$(MAKE) distclean
68 @cd ..
69
70 @cd exceptionHandling
71 @$(MAKE) distclean
72 @cd ..
73 86
74 @cd translation 87distclean::
75 @$(MAKE) distclean 88 @-del /s *.cmi
76 @cd .. 89 @-del /s *.cmo
77 \ No newline at end of file 90 @-del /s *.cmx
91 @-del /s *.cma
92 @-del /s *.obj
93 @-del $(EXEC)
94 @-del ..\..\..\..\bin\$(EXEC) \ No newline at end of file
diff --git a/scilab/modules/scicos/src/translator/parsing/makefile.mak b/scilab/modules/scicos/src/translator/parsing/makefile.mak
deleted file mode 100644
index 255ed92..0000000
--- a/scilab/modules/scicos/src/translator/parsing/makefile.mak
+++ /dev/null
@@ -1,57 +0,0 @@
1# Scicos
2#
3# Copyright (C) INRIA - scilab
4# Copyright (C) DIGITEO - 2009 - Allan CORNET
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19#
20# See the file ./license.txt
21
22!IF "$(OCAMLLIB)" == ""
23OCAMLPATH=C:\Program Files\Objective Caml
24!ELSE
25OCAMLPATH=$(OCAMLLIB)\..
26!ENDIF
27
28OCAMLPATHBIN=$(OCAMLPATH)\bin
29OCAMLPATHLIB=$(OCAMLPATH)\lib
30OCAMLC=ocamlc
31OCAMLOPT=ocamlopt
32OCAMLDEP=ocamldep
33CAMLP4=camlp4
34OCAMLYACC=ocamlyacc
35OCAMLLEX=ocamllex
36RM=del
37
38all::
39 $(OCAMLC) -g -c syntax.ml
40 $(OCAMLC) -g -c linenum.ml
41 $(OCAMLYACC) parser.mly
42 $(RM) parser.mli
43 $(OCAMLC) -g -c parser.ml
44 $(OCAMLLEX) lexer.mll
45 $(OCAMLC) -g -c lexer.ml
46 $(OCAMLC) -g -a -o parsing.cma syntax.cmo linenum.cmo parser.cmo lexer.cmo
47
48clean::
49 @-$(RM) *.cmo
50 @-$(RM) *.cma
51 @-$(RM) *.cmi
52
53distclean::
54 @-$(RM) *.cmo
55 @-$(RM) *.cma
56 @-$(RM) *.cmi
57
diff --git a/scilab/modules/scicos/src/translator/translation/makefile.mak b/scilab/modules/scicos/src/translator/translation/makefile.mak
deleted file mode 100644
index d236188..0000000
--- a/scilab/modules/scicos/src/translator/translation/makefile.mak
+++ /dev/null
@@ -1,59 +0,0 @@
1# Scicos
2#
3# Copyright (C) INRIA - scilab
4# Copyright (C) DIGITEO - 2009 - Allan CORNET
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19#
20# See the file ./license.txt
21
22!IF "$(OCAMLLIB)" == ""
23OCAMLPATH=C:\Program Files\Objective Caml
24!ELSE
25OCAMLPATH=$(OCAMLLIB)\..
26!ENDIF
27
28OCAMLPATHBIN=$(OCAMLPATH)\bin
29OCAMLPATHLIB=$(OCAMLPATH)\lib
30OCAMLC=ocamlc
31OCAMLOPT=ocamlopt
32OCAMLDEP=ocamldep
33CAMLP4=camlp4
34OCAMLYACC=ocamlyacc
35OCAMLLEX=ocamllex
36RM=del
37EXEC=modelicat.exe
38
39all::
40 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c ..\compilation\types.ml
41 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c codeGeneration.ml
42 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c ..\parsing\lexer.ml
43 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c libraryManager.ml
44 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c versiondate.ml
45 $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -o $(EXEC) ..\parsing\parsing.cma ../compilation/compilation.cma ../instantiation/instantiation.cma ../exceptionHandling/exceptionHandling.cma unix.cma codeGeneration.cmo libraryManager.cmo versiondate.cmo translator.ml
46 @copy $(EXEC) ..\..\..\..\..\bin\$(EXEC)
47
48clean::
49 @-$(RM) *.cmo
50 @-$(RM) *.cma
51 @-$(RM) *.cmi
52 @-$(RM) $(EXEC)
53 @-$(RM) ..\..\..\..\bin\$(EXEC)
54
55distclean::
56 @-$(RM) *.cmo
57 @-$(RM) *.cma
58 @-$(RM) *.cmi
59
diff --git a/scilab/modules/scicos/tests/nonreg_tests/bug_6903.tst b/scilab/modules/scicos/tests/nonreg_tests/bug_6903.tst
new file mode 100644
index 0000000..1b05cc5
--- /dev/null
+++ b/scilab/modules/scicos/tests/nonreg_tests/bug_6903.tst
@@ -0,0 +1,22 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2010 - DIGITEO - Allan CORNET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- Non-regression test for bug 6903 -->
9//
10// <-- INTERACTIVE TEST -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/show_bug.cgi?id=6903
14//
15// <-- Short Description -->
16// modelica translator calls ocaml compiler
17// Cannot exec ocamlrun
18
19// !!! check that ocaml is not installed on your pc !!!
20
21// start demos --> Xcos --> Modelica demos --> RLC circuit
22// it must works