Revert "Scicos OCaml part: generated bytecode executables" 29/14029/2
Vincent COUVERT [Fri, 14 Mar 2014 15:05:36 +0000 (16:05 +0100)]
Fails to compile under some platforms using clang:
Error: Files src/xml2modelica/xMLParser.cmx and src/xml2modelica/linenum.cmx
       make inconsistent assumptions over interface Linenum

This reverts commit 3ac381e3feb30edd39955b8b217e4fe9c2792b95.

Change-Id: I54a1203ef800c664a92f8a2fdb26addaca429312

scilab/modules/scicos/.gitignore
scilab/modules/scicos/Makefile.in
scilab/modules/scicos/Makefile.modelica.am

index 00bdf74..89cc584 100644 (file)
@@ -1,7 +1,4 @@
-# ignore some generated files
-
 modelicac
-modelicac.ocamlc
 *.cmi
 *.cma
 *.cmo
@@ -23,13 +20,11 @@ src/modelica_compiler/*.obj
 *.mli
 
 XML2Modelica
-XML2Modelica.ocamlc
 xml2modelica.exe
 
 
 #translator
 modelicat
-modelicat.ocamlc
 modelicat.exe
 src/translator/*/*.a
 src/translator/parsing/lexer.ml
index 630e634..ebf4ad8 100644 (file)
@@ -3300,38 +3300,38 @@ distclean-local:
 
 @OCAML_TRUE@@XCOS_TRUE@%.cmo: %.ml %.cmi
 @OCAML_TRUE@@XCOS_TRUE@        @if echo "$<"|grep src/translator; then \
-@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -c $<; \
-@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE_modelicat)  -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE_modelicat)  -c $<; \
 @OCAML_TRUE@@XCOS_TRUE@        else \
-@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -c $<; \
-@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE)  -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE)  -c $<; \
 @OCAML_TRUE@@XCOS_TRUE@        fi
 
 @OCAML_TRUE@@XCOS_TRUE@.ml.cmx:
 @OCAML_TRUE@@XCOS_TRUE@        @if echo "$<"|grep src/translator; then \
-@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLOPT) $(INCLUDE_modelicat) $(OCAMLOPTFLAGS) -c $<; \
-@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLOPT) $(INCLUDE_modelicat) $(OCAMLOPTFLAGS) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLOPT) $(INCLUDE_modelicat) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLOPT) $(INCLUDE_modelicat) -c $<; \
 @OCAML_TRUE@@XCOS_TRUE@        else \
-@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLOPT) $(INCLUDE) $(OCAMLOPTFLAGS) -c $<; \
-@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLOPT) $(INCLUDE) $(OCAMLOPTFLAGS) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLOPT) $(INCLUDE) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLOPT) $(INCLUDE) -c $<; \
 @OCAML_TRUE@@XCOS_TRUE@        fi
 
 @OCAML_TRUE@@XCOS_TRUE@.mli.cmi:
 @OCAML_TRUE@@XCOS_TRUE@        @if echo "$<"|grep src/translator; then \
-@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -c $<; \
-@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE_modelicat) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE_modelicat) -c $<; \
 @OCAML_TRUE@@XCOS_TRUE@        else \
-@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -c $<; \
-@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE) -c $<; \
+@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE) -c $<; \
 @OCAML_TRUE@@XCOS_TRUE@        fi
 
 @OCAML_TRUE@@XCOS_TRUE@.ml.mli:
 @OCAML_TRUE@@XCOS_TRUE@        @if echo "$<"|grep src/translator; then \
-@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -i $< > $@; \
-@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -i $< > $@; \
+@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE_modelicat) -i $< > $@; \
+@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE_modelicat) -i $< > $@; \
 @OCAML_TRUE@@XCOS_TRUE@        else \
-@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -i $< > $@; \
-@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -i $< > $@; \
+@OCAML_TRUE@@XCOS_TRUE@                echo $(OCAMLC) $(INCLUDE) -i $< > $@; \
+@OCAML_TRUE@@XCOS_TRUE@                $(OCAMLC) $(INCLUDE) -i $< > $@; \
 @OCAML_TRUE@@XCOS_TRUE@        fi
 
 @OCAML_TRUE@@XCOS_TRUE@.mll.ml:
@@ -3342,23 +3342,14 @@ distclean-local:
 
 # Build the binaries
 
-@OCAML_TRUE@@XCOS_TRUE@modelicac: $(MLS:.ml=.cmx)
-@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLOPT) -o $@ $(INCLUDE) $(OCAMLOPTFLAGS) $(OCAMLLIBS:.cma=.cmxa) $^
+@OCAML_TRUE@@XCOS_TRUE@modelicac:$(MLIS:.mli=.cmi) $(MLS:.ml=.cmo) $(MLS:.ml=.cmx)
+@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLOPT) -o modelicac $(INCLUDE) $(OCAMLLIBS:.cma=.cmxa) $(MLS:.ml=.cmx)
 
-@OCAML_TRUE@@XCOS_TRUE@modelicac.ocamlc: $(MLS:.ml=.cmo)
-@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLC) -o $@ $(INCLUDE) $(OCAMLOPTFLAGS) $(OCAMLLIBS) $^
+@OCAML_TRUE@@XCOS_TRUE@XML2Modelica: $(MLS_XML2Modelica:.ml=.cmo) $(MLS_XML2Modelica:.ml=.cmx) 
+@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLOPT) -o XML2Modelica $(INCLUDE) $(OCAMLLIBS:.cma=.cmxa) $(MLS_XML2Modelica:.ml=.cmx) 
 
-@OCAML_TRUE@@XCOS_TRUE@XML2Modelica: $(MLS_XML2Modelica:.ml=.cmx) 
-@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLOPT) -o $@ $(INCLUDE) $(OCAMLCFLAGS) $(OCAMLLIBS:.cma=.cmxa) $^
-
-@OCAML_TRUE@@XCOS_TRUE@XML2Modelica.ocamlc: $(MLS_XML2Modelica:.ml=.cmo)
-@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLC) -o $@ $(INCLUDE) $(OCAMLCFLAGS) $(OCAMLLIBS) $^
-
-@OCAML_TRUE@@XCOS_TRUE@modelicat: $(MLS_SPECIFIC_PRE_modelicat:.ml=.cmx) $(MLS_modelicat:.ml=.cmx)
-@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLOPT) -o $@ $(INCLUDE_modelicat) $(OCAMLOPTFLAGS) $(OCAMLLIBS:.cma=.cmxa) $^
-
-@OCAML_TRUE@@XCOS_TRUE@modelicat.ocamlc: $(MLS_SPECIFIC_PRE_modelicat:.ml=.cmo) $(MLS_modelicat:.ml=.cmo)
-@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLC) -o $@ $(INCLUDE_modelicat) $(OCAMLOPTFLAGS) $(OCAMLLIBS) $^
+@OCAML_TRUE@@XCOS_TRUE@modelicat: $(MLIS_modelicat:.mli=.cmi) $(MLS_modelicat:.ml=.cmo) $(MLS_modelicat:.ml=.cmx)
+@OCAML_TRUE@@XCOS_TRUE@        $(OCAMLOPT) -o modelicat $(INCLUDE_modelicat) $(OCAMLLIBS:.cma=.cmxa) $(MLS_SPECIFIC_PRE_modelicat:.ml=.cmx) $(MLS_modelicat:.ml=.cmx) 
 
 #BUILT_SOURCES = depend
 
index d4807e4..56149a2 100644 (file)
@@ -95,40 +95,42 @@ SUFFIXES += .ml .mli .mll .mly .cmo .cmi .cmx
 
 %.cmo: %.ml %.cmi
        @if echo "$<"|grep src/translator; then \
-               echo $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -c $<; \
-               $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -c $<; \
+               echo $(OCAMLC) $(INCLUDE_modelicat)  -c $<; \
+               $(OCAMLC) $(INCLUDE_modelicat)  -c $<; \
        else \
-               echo $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -c $<; \
-               $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -c $<; \
+               echo $(OCAMLC) $(INCLUDE)  -c $<; \
+               $(OCAMLC) $(INCLUDE)  -c $<; \
        fi
 
 .ml.cmx:
        @if echo "$<"|grep src/translator; then \
-               echo $(OCAMLOPT) $(INCLUDE_modelicat) $(OCAMLOPTFLAGS) -c $<; \
-               $(OCAMLOPT) $(INCLUDE_modelicat) $(OCAMLOPTFLAGS) -c $<; \
+               echo $(OCAMLOPT) $(INCLUDE_modelicat) -c $<; \
+               $(OCAMLOPT) $(INCLUDE_modelicat) -c $<; \
        else \
-               echo $(OCAMLOPT) $(INCLUDE) $(OCAMLOPTFLAGS) -c $<; \
-               $(OCAMLOPT) $(INCLUDE) $(OCAMLOPTFLAGS) -c $<; \
+               echo $(OCAMLOPT) $(INCLUDE) -c $<; \
+               $(OCAMLOPT) $(INCLUDE) -c $<; \
        fi
 
+
 .mli.cmi:
        @if echo "$<"|grep src/translator; then \
-               echo $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -c $<; \
-               $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -c $<; \
+               echo $(OCAMLC) $(INCLUDE_modelicat) -c $<; \
+               $(OCAMLC) $(INCLUDE_modelicat) -c $<; \
        else \
-               echo $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -c $<; \
-               $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -c $<; \
+               echo $(OCAMLC) $(INCLUDE) -c $<; \
+               $(OCAMLC) $(INCLUDE) -c $<; \
        fi
 
 .ml.mli:
        @if echo "$<"|grep src/translator; then \
-               echo $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -i $< > $@; \
-               $(OCAMLC) $(INCLUDE_modelicat) $(OCAMLCFLAGS) -i $< > $@; \
+               echo $(OCAMLC) $(INCLUDE_modelicat) -i $< > $@; \
+               $(OCAMLC) $(INCLUDE_modelicat) -i $< > $@; \
        else \
-               echo $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -i $< > $@; \
-               $(OCAMLC) $(INCLUDE) $(OCAMLCFLAGS) -i $< > $@; \
+               echo $(OCAMLC) $(INCLUDE) -i $< > $@; \
+               $(OCAMLC) $(INCLUDE) -i $< > $@; \
        fi
 
+
 .mll.ml:
        $(OCAMLLEX) $<
 
@@ -137,23 +139,16 @@ SUFFIXES += .ml .mli .mll .mly .cmo .cmi .cmx
 
 # Build the binaries
 
-modelicac: $(MLS:.ml=.cmx)
-       $(OCAMLOPT) -o $@ $(INCLUDE) $(OCAMLOPTFLAGS) $(OCAMLLIBS:.cma=.cmxa) $^
-
-modelicac.ocamlc: $(MLS:.ml=.cmo)
-       $(OCAMLC) -o $@ $(INCLUDE) $(OCAMLOPTFLAGS) $(OCAMLLIBS) $^
+modelicac:$(MLIS:.mli=.cmi) $(MLS:.ml=.cmo) $(MLS:.ml=.cmx)
+       $(OCAMLOPT) -o modelicac $(INCLUDE) $(OCAMLLIBS:.cma=.cmxa) $(MLS:.ml=.cmx)
 
-XML2Modelica: $(MLS_XML2Modelica:.ml=.cmx) 
-       $(OCAMLOPT) -o $@ $(INCLUDE) $(OCAMLCFLAGS) $(OCAMLLIBS:.cma=.cmxa) $^
 
-XML2Modelica.ocamlc: $(MLS_XML2Modelica:.ml=.cmo)
-       $(OCAMLC) -o $@ $(INCLUDE) $(OCAMLCFLAGS) $(OCAMLLIBS) $^
+XML2Modelica: $(MLS_XML2Modelica:.ml=.cmo) $(MLS_XML2Modelica:.ml=.cmx) 
+       $(OCAMLOPT) -o XML2Modelica $(INCLUDE) $(OCAMLLIBS:.cma=.cmxa) $(MLS_XML2Modelica:.ml=.cmx) 
 
-modelicat: $(MLS_SPECIFIC_PRE_modelicat:.ml=.cmx) $(MLS_modelicat:.ml=.cmx)
-       $(OCAMLOPT) -o $@ $(INCLUDE_modelicat) $(OCAMLOPTFLAGS) $(OCAMLLIBS:.cma=.cmxa) $^
+modelicat: $(MLIS_modelicat:.mli=.cmi) $(MLS_modelicat:.ml=.cmo) $(MLS_modelicat:.ml=.cmx)
+       $(OCAMLOPT) -o modelicat $(INCLUDE_modelicat) $(OCAMLLIBS:.cma=.cmxa) $(MLS_SPECIFIC_PRE_modelicat:.ml=.cmx) $(MLS_modelicat:.ml=.cmx) 
 
-modelicat.ocamlc: $(MLS_SPECIFIC_PRE_modelicat:.ml=.cmo) $(MLS_modelicat:.ml=.cmo)
-       $(OCAMLC) -o $@ $(INCLUDE_modelicat) $(OCAMLOPTFLAGS) $(OCAMLLIBS) $^
 
 CLEANFILES = $(BASE_PATH)/*/*.cmi \
        $(BASE_PATH)/*/*.o \