bug 6903 78/78/2
Allan CORNET [Wed, 14 Apr 2010 13:51:22 +0000 (15:51 +0200)]
Change-Id: Iecfa0fb0442bf23353b51ccacc6b5059ff2326b1

scilab/CHANGES_5.3.X
scilab/modules/scicos/.gitignore
scilab/modules/scicos/src/translator/compilation/makefile.mak [deleted file]
scilab/modules/scicos/src/translator/exceptionHandling/makefile.mak [deleted file]
scilab/modules/scicos/src/translator/instantiation/makefile.mak [deleted file]
scilab/modules/scicos/src/translator/makefile.mak
scilab/modules/scicos/src/translator/parsing/makefile.mak [deleted file]
scilab/modules/scicos/src/translator/translation/makefile.mak [deleted file]
scilab/modules/scicos/tests/nonreg_tests/bug_6903.tst [new file with mode: 0644]

index 2c93f3d..3edd61b 100644 (file)
@@ -6,7 +6,7 @@ Performance:
 ============
 
 * Faster access to primitive table (internal). This change improves the overall
-speed of Scilab.
+  speed of Scilab.
 
 
 FFTW:
@@ -25,13 +25,13 @@ Documentation:
 ==============
 
 * It is now possible to use LaTeX inline in the documentation. Thanks to 
- Calixte Denizet for this feature. (See bug #4329)
+  Calixte Denizet for this feature. (See bug #4329)
 
 * bug 6630 fixed - JavaHelp does not update existing image files when 
                    building help.
 
 * bug 6852 fixed - JavaHelp did not center the LaTeX formulas containing an
-                  attribute align="center" 
+                   attribute align="center" 
 
 Xcos:
 =====
@@ -45,7 +45,7 @@ Xcos:
 * The default palettes can now be manipulated by the user.
 
 * LaTeX formulas can be used on any TextBlock using the Scilab tag based 
-description.
+  description.
 
 * builnewblock.sci rewritten to use scilab dynamic link module tools.
 
@@ -58,12 +58,14 @@ description.
 
 * bug 6672 fixed - "Code generation" failed if superblock had 
                    some gain blocks.
-                   
+
 * bug 6674 fixed - modelica generic block did not work.
 
 * bug 6668 fixed - Xcos modelica demos did not work with the new 
                    modelica compiler.
 
+* bug 6903 fixed - modelicat calls ocamlrun (wrong dependency on Windows).                   
+
 Compilation:
 ============
 
@@ -101,7 +103,7 @@ Matlab to Scilab conversion tools:
 
 * Conversion updated with new Scilab functions:
   - 'filesep' now converted by 'filesep' instead of 'pathconvert'.
-  
+
 Tests:
 ======
 
@@ -152,7 +154,7 @@ Removed functions (previously declared as obsolete):
 * 'with_gtk' replaced by 'getversion'.
 
 * 'readc_' replaced by 'input'.
+
 Bug fixes:
 ==========
 
index 7153b95..4b9a02b 100644 (file)
@@ -68,7 +68,12 @@ src/translator/translation/libraryManager.cmo
 src/translator/translation/translator.cmo
 src/translator/translation/versiondate.cmo
 
-
+# .tmp files generated on Windows
+src/translator/translation/*.obj
+src/translator/parsing/*.obj
+src/translator/compilation/*.obj
+src/translator/instantiation/*.obj
+src/translator/exceptionHandling/*.obj
 
 
 #
diff --git a/scilab/modules/scicos/src/translator/compilation/makefile.mak b/scilab/modules/scicos/src/translator/compilation/makefile.mak
deleted file mode 100644 (file)
index 1832bec..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#  Scicos
-#
-#  Copyright (C) INRIA - scilab 
-#  Copyright (C) DIGITEO - 2009 - Allan CORNET
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# See the file ./license.txt
-
-!IF "$(OCAMLLIB)" == ""
-OCAMLPATH=C:\Program Files\Objective Caml
-!ELSE
-OCAMLPATH=$(OCAMLLIB)\..
-!ENDIF
-
-OCAMLPATHBIN=$(OCAMLPATH)\bin
-OCAMLPATHLIB=$(OCAMLPATH)\lib
-OCAMLC=ocamlc
-OCAMLOPT=ocamlopt
-OCAMLDEP=ocamldep
-CAMLP4=camlp4
-OCAMLYACC=ocamlyacc
-OCAMLLEX=ocamllex
-RM=del
-
-all::
-       $(OCAMLC) -g -I ..\parsing -c types.ml
-       $(OCAMLC) -g -I ..\parsing -c nameResolve.ml
-       $(OCAMLC) -g -I ..\parsing -a -o compilation.cma types.cmo nameResolve.cmo
-
-       
-clean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
-       
-distclean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
-       
\ 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 (file)
index 48f4abb..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#  Scicos
-#
-#  Copyright (C) INRIA - scilab 
-#  Copyright (C) DIGITEO - 2009 - Allan CORNET
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# See the file ./license.txt
-
-!IF "$(OCAMLLIB)" == ""
-OCAMLPATH=C:\Program Files\Objective Caml
-!ELSE
-OCAMLPATH=$(OCAMLLIB)\..
-!ENDIF
-
-OCAMLPATHBIN=$(OCAMLPATH)\bin
-OCAMLPATHLIB=$(OCAMLPATH)\lib
-OCAMLC=ocamlc
-OCAMLOPT=ocamlopt
-OCAMLDEP=ocamldep
-CAMLP4=camlp4
-OCAMLYACC=ocamlyacc
-OCAMLLEX=ocamllex
-RM=del
-
-all::
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c ..\parsing\parser.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c ..\compilation\nameResolve.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c ..\instantiation\instantiation.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c errorDico.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c msgDico.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c ..\parsing\linenum.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -c exceptHandler.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ../instantiation -a -o exceptionHandling.cma errorDico.cmo msgDico.cmo exceptHandler.cmo
-       
-clean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
-       
-distclean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(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 (file)
index d29cea6..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#  Scicos
-#
-#  Copyright (C) INRIA - scilab 
-#  Copyright (C) DIGITEO - 2009 - Allan CORNET
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# See the file ./license.txt
-
-!IF "$(OCAMLLIB)" == ""
-OCAMLPATH=C:\Program Files\Objective Caml
-!ELSE
-OCAMLPATH=$(OCAMLLIB)\..
-!ENDIF
-
-OCAMLPATHBIN=$(OCAMLPATH)\bin
-OCAMLPATHLIB=$(OCAMLPATH)\lib
-OCAMLC=ocamlc
-OCAMLOPT=ocamlopt
-OCAMLDEP=ocamldep
-CAMLP4=camlp4
-OCAMLYACC=ocamlyacc
-OCAMLLEX=ocamllex
-RM=del
-
-all::
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -c instantiation.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -a -o instantiation.cma instantiation.cmo
-
-       
-clean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
-       
-distclean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
index cf806ba..c3d0821 100644 (file)
 #
 # See the file ./license.txt
 
-MAKE=nmake /f makefile.mak
+!IF "$(OCAMLLIB)" == ""
+OCAMLPATH=C:\Program Files\Objective Caml
+!ELSE
+OCAMLPATH=$(OCAMLLIB)\..
+!ENDIF
 
-all::
-       @cd parsing
-       @$(MAKE) all
-       @cd ..
+OCAMLPATHBIN=$(OCAMLPATH)\bin
+OCAMLPATHLIB=$(OCAMLPATH)\lib
+OCAMLC=ocamlc
+OCAMLOPT=ocamlopt
+OCAMLDEP=ocamldep
+CAMLP4=camlp4
+OCAMLYACC=ocamlyacc
+OCAMLLEX=ocamllex
+RM=del
+EXEC=modelicat.exe
+INCLUDEPATHS=-I ./compilation -I ./exceptionHandling -I ./parsing -I ./instantiation -I ./translation
 
-       @cd compilation
-       @$(MAKE) all
-       @cd ..
-       
-       @cd instantiation
-       @$(MAKE) all
-       @cd ..  
-       
-       @cd exceptionHandling
-       @$(MAKE) all
-       @cd ..  
-       
-       @cd translation
-       @$(MAKE) all
-       @cd ..  
-       
+all::
+       $(OCAMLYACC) parsing/parser.mly
+       $(RM) parsing\parser.mli
+       $(OCAMLLEX) parsing/lexer.mll
+       $(OCAMLC) $(INCLUDEPATHS) -c parsing/syntax.ml parsing/parser.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c parsing/parser.ml parsing/lexer.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c parsing/lexer.ml parsing/linenum.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c parsing/linenum.ml compilation/types.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c compilation/types.ml compilation/nameResolve.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c compilation/nameResolve.ml instantiation/instantiation.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c instantiation/instantiation.ml exceptionHandling/msgDico.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/msgDico.ml exceptionHandling/errorDico.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/errorDico.ml exceptionHandling/exceptHandler.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c exceptionHandling/exceptHandler.ml translation/libraryManager.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c translation/libraryManager.ml translation/codeGeneration.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c translation/codeGeneration.ml 
+       $(OCAMLC) $(INCLUDEPATHS) -c translation/versiondate.ml translation/translator.ml
+       $(OCAMLC) $(INCLUDEPATHS) -c translation/translator.ml parsing/syntax.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/syntax.ml parsing/parser.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/parser.ml parsing/lexer.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/lexer.ml parsing/linenum.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c parsing/linenum.ml compilation/types.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c compilation/types.ml compilation/nameResolve.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c compilation/nameResolve.ml instantiation/instantiation.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c instantiation/instantiation.ml exceptionHandling/msgDico.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/msgDico.ml exceptionHandling/errorDico.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/errorDico.ml exceptionHandling/exceptHandler.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c exceptionHandling/exceptHandler.ml translation/libraryManager.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c translation/libraryManager.ml translation/codeGeneration.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c translation/codeGeneration.ml 
+       $(OCAMLOPT) $(INCLUDEPATHS) -c translation/versiondate.ml translation/translator.ml
+       $(OCAMLOPT) $(INCLUDEPATHS) -c translation/translator.ml
+       $(OCAMLOPT) -o $(EXEC) $(INCLUDEPATHS) nums.cmxa ./parsing/syntax.cmx ./parsing/parser.cmx \
+           ./parsing/lexer.cmx ./parsing/linenum.cmx ./compilation/types.cmx ./compilation/nameResolve.cmx \
+           ./instantiation/instantiation.cmx ./exceptionHandling/msgDico.cmx ./exceptionHandling/errorDico.cmx \
+           ./exceptionHandling/exceptHandler.cmx ./translation/libraryManager.cmx ./translation/codeGeneration.cmx \
+           ./translation/versiondate.cmx ./translation/translator.cmx 
+       @copy $(EXEC) ..\..\..\..\bin\$(EXEC)
+       $(RM) parsing\parser.ml
+       $(RM) parsing\lexer.ml
 clean::
-       @cd compilation
-       @$(MAKE) clean
-       @cd ..
-       
-       @cd instantiation
-       @$(MAKE) clean
-       @cd ..  
-       
-       @cd exceptionHandling
-       @$(MAKE) clean
-       @cd ..  
-       
-       @cd translation
-       @$(MAKE) clean
-       @cd ..  
-       
-distclean::    
-       @cd compilation
-       @$(MAKE) distclean
-       @cd ..
-       
-       @cd instantiation
-       @$(MAKE) distclean
-       @cd ..  
-       
-       @cd exceptionHandling
-       @$(MAKE) distclean
-       @cd ..  
+       @-del /s *.cmi
+       @-del /s *.cmo
+       @-del /s *.cmx
+       @-del /s *.cma
+       @-del /s *.obj
+       @-del $(EXEC)
        
-       @cd translation
-       @$(MAKE) distclean
-       @cd ..  
-       
\ No newline at end of file
+distclean::
+       @-del /s *.cmi
+       @-del /s *.cmo
+       @-del /s *.cmx
+       @-del /s *.cma
+       @-del /s *.obj
+       @-del $(EXEC)
+       @-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 (file)
index 255ed92..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#  Scicos
-#
-#  Copyright (C) INRIA - scilab 
-#  Copyright (C) DIGITEO - 2009 - Allan CORNET
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# See the file ./license.txt
-
-!IF "$(OCAMLLIB)" == ""
-OCAMLPATH=C:\Program Files\Objective Caml
-!ELSE
-OCAMLPATH=$(OCAMLLIB)\..
-!ENDIF
-
-OCAMLPATHBIN=$(OCAMLPATH)\bin
-OCAMLPATHLIB=$(OCAMLPATH)\lib
-OCAMLC=ocamlc
-OCAMLOPT=ocamlopt
-OCAMLDEP=ocamldep
-CAMLP4=camlp4
-OCAMLYACC=ocamlyacc
-OCAMLLEX=ocamllex
-RM=del
-
-all::
-       $(OCAMLC) -g  -c syntax.ml
-       $(OCAMLC) -g  -c linenum.ml
-       $(OCAMLYACC) parser.mly
-       $(RM) parser.mli
-       $(OCAMLC) -g -c parser.ml
-       $(OCAMLLEX) lexer.mll
-       $(OCAMLC) -g -c lexer.ml
-       $(OCAMLC) -g -a -o parsing.cma syntax.cmo linenum.cmo parser.cmo lexer.cmo
-       
-clean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
-       
-distclean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
-       
diff --git a/scilab/modules/scicos/src/translator/translation/makefile.mak b/scilab/modules/scicos/src/translator/translation/makefile.mak
deleted file mode 100644 (file)
index d236188..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#  Scicos
-#
-#  Copyright (C) INRIA - scilab 
-#  Copyright (C) DIGITEO - 2009 - Allan CORNET
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# See the file ./license.txt
-
-!IF "$(OCAMLLIB)" == ""
-OCAMLPATH=C:\Program Files\Objective Caml
-!ELSE
-OCAMLPATH=$(OCAMLLIB)\..
-!ENDIF
-
-OCAMLPATHBIN=$(OCAMLPATH)\bin
-OCAMLPATHLIB=$(OCAMLPATH)\lib
-OCAMLC=ocamlc
-OCAMLOPT=ocamlopt
-OCAMLDEP=ocamldep
-CAMLP4=camlp4
-OCAMLYACC=ocamlyacc
-OCAMLLEX=ocamllex
-RM=del
-EXEC=modelicat.exe
-
-all::
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c ..\compilation\types.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c codeGeneration.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c ..\parsing\lexer.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c libraryManager.ml
-       $(OCAMLC) -g -I ..\parsing -I ..\compilation -I ..\instantiation -I ..\exceptionHandling -c versiondate.ml
-       $(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
-       @copy  $(EXEC) ..\..\..\..\..\bin\$(EXEC)
-
-clean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
-       @-$(RM) $(EXEC)
-       @-$(RM) ..\..\..\..\bin\$(EXEC)
-       
-distclean::
-       @-$(RM) *.cmo
-       @-$(RM) *.cma
-       @-$(RM) *.cmi
-
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 (file)
index 0000000..1b05cc5
--- /dev/null
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 6903 -->
+//
+// <-- INTERACTIVE TEST -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6903
+//
+// <-- Short Description -->
+// modelica translator calls ocaml compiler
+// Cannot exec ocamlrun
+
+// !!! check that ocaml is not installed on your pc !!!
+
+// start demos --> Xcos --> Modelica demos --> RLC circuit
+// it must works