From b917e8c5db3bc32c3cd10468cb84477a31273284 Mon Sep 17 00:00:00 2001 From: Allan CORNET Date: Wed, 6 Jan 2010 12:56:26 +0100 Subject: [PATCH] encoding --- scilab/modules/scicos/src/translator/Makefile | 142 +++++------ .../scicos/src/translator/compilation/Makefile | 184 +++++++------- .../src/translator/exceptionHandling/Makefile | 192 +++++++-------- .../scicos/src/translator/instantiation/Makefile | 198 +++++++-------- .../modules/scicos/src/translator/parsing/Makefile | 226 +++++++++--------- .../scicos/src/translator/translation/Makefile | 252 ++++++++++---------- 6 files changed, 597 insertions(+), 597 deletions(-) diff --git a/scilab/modules/scicos/src/translator/Makefile b/scilab/modules/scicos/src/translator/Makefile index 5e8ca09..4f46277 100644 --- a/scilab/modules/scicos/src/translator/Makefile +++ b/scilab/modules/scicos/src/translator/Makefile @@ -1,71 +1,71 @@ -# -# Translator from Modelica 2.x to flat Modelica -# -# Copyright (C) 2005 – 2007 Imagine S.A. -# For more information or commercial use please contact us at www.amesim.com -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# - -all: release - - -release: - $(MAKE) opt RELEASE=yes - -debug: - $(MAKE) bytecode RELEASE=no - -depend: - $(MAKE) depends RELEASE=yes - -depends: - cd parsing ; $(MAKE) depend - cd compilation ; $(MAKE) depend - cd instantiation ; $(MAKE) depend - cd exceptionHandling ; $(MAKE) depend - cd translation ; $(MAKE) depend - -opt: - $(MAKE) depend - cd parsing ; $(MAKE) opt RELEASE=$(RELEASE) - cd compilation ; $(MAKE) opt RELEASE=$(RELEASE) - cd instantiation ; $(MAKE) opt RELEASE=$(RELEASE) - cd exceptionHandling ; $(MAKE) opt RELEASE=$(RELEASE) - cd translation ; $(MAKE) opt RELEASE=$(RELEASE) - -custom: - $(MAKE) depend - cd parsing ; $(MAKE) bytecode RELEASE=$(RELEASE) - cd compilation ; $(MAKE) bytecode RELEASE=$(RELEASE) - cd instantiation ; $(MAKE) bytecode RELEASE=$(RELEASE) - cd exceptionHandling ; $(MAKE) bytecode RELEASE=$(RELEASE) - cd translation ; $(MAKE) custom RELEASE=$(RELEASE) - -bytecode: - $(MAKE) depend - cd parsing ; $(MAKE) bytecode RELEASE=$(RELEASE) - cd compilation ; $(MAKE) bytecode RELEASE=$(RELEASE) - cd instantiation ; $(MAKE) bytecode RELEASE=$(RELEASE) - cd exceptionHandling ; $(MAKE) bytecode RELEASE=$(RELEASE) - cd translation ; $(MAKE) bytecode RELEASE=$(RELEASE) - -clean: - cd parsing ; $(MAKE) clean - cd compilation ; $(MAKE) clean - cd instantiation ; $(MAKE) clean - cd exceptionHandling ; $(MAKE) clean - cd translation ; $(MAKE) clean +# +# Translator from Modelica 2.x to flat Modelica +# +# Copyright (C) 2005 – 2007 Imagine S.A. +# For more information or commercial use please contact us at www.amesim.com +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# + +all: release + + +release: + $(MAKE) opt RELEASE=yes + +debug: + $(MAKE) bytecode RELEASE=no + +depend: + $(MAKE) depends RELEASE=yes + +depends: + cd parsing ; $(MAKE) depend + cd compilation ; $(MAKE) depend + cd instantiation ; $(MAKE) depend + cd exceptionHandling ; $(MAKE) depend + cd translation ; $(MAKE) depend + +opt: + $(MAKE) depend + cd parsing ; $(MAKE) opt RELEASE=$(RELEASE) + cd compilation ; $(MAKE) opt RELEASE=$(RELEASE) + cd instantiation ; $(MAKE) opt RELEASE=$(RELEASE) + cd exceptionHandling ; $(MAKE) opt RELEASE=$(RELEASE) + cd translation ; $(MAKE) opt RELEASE=$(RELEASE) + +custom: + $(MAKE) depend + cd parsing ; $(MAKE) bytecode RELEASE=$(RELEASE) + cd compilation ; $(MAKE) bytecode RELEASE=$(RELEASE) + cd instantiation ; $(MAKE) bytecode RELEASE=$(RELEASE) + cd exceptionHandling ; $(MAKE) bytecode RELEASE=$(RELEASE) + cd translation ; $(MAKE) custom RELEASE=$(RELEASE) + +bytecode: + $(MAKE) depend + cd parsing ; $(MAKE) bytecode RELEASE=$(RELEASE) + cd compilation ; $(MAKE) bytecode RELEASE=$(RELEASE) + cd instantiation ; $(MAKE) bytecode RELEASE=$(RELEASE) + cd exceptionHandling ; $(MAKE) bytecode RELEASE=$(RELEASE) + cd translation ; $(MAKE) bytecode RELEASE=$(RELEASE) + +clean: + cd parsing ; $(MAKE) clean + cd compilation ; $(MAKE) clean + cd instantiation ; $(MAKE) clean + cd exceptionHandling ; $(MAKE) clean + cd translation ; $(MAKE) clean diff --git a/scilab/modules/scicos/src/translator/compilation/Makefile b/scilab/modules/scicos/src/translator/compilation/Makefile index 59ccaf7..17e32cc 100644 --- a/scilab/modules/scicos/src/translator/compilation/Makefile +++ b/scilab/modules/scicos/src/translator/compilation/Makefile @@ -1,92 +1,92 @@ -# -# Translator from Modelica 2.x to flat Modelica -# -# Copyright (C) 2005 - 2007 Imagine S.A. -# For more information or commercial use please contact us at www.amesim.com -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# - -OCAMLDEP=ocamldep -OCAMLC=ocamlc -OCAMLOPT=ocamlopt -CAMLP4=camlp4 -INCLUDES=-I ../parsing -ifeq ($(RELEASE),yes) -OCAMLFLAGS=$(INCLUDES) -else -OCAMLFLAGS=-g $(INCLUDES) -endif -OCAMLOPTFLAGS=$(INCLUDES) -LIBS= -LIBSOPT=$(LIBS:.cma=.cmxa) -SRCS=types.ml nameResolve.ml - - -OBJS=$(SRCS:.ml=.cmo) -OBJSOPT=$(SRCS:.ml=.cmx) -LIB=compilation.cma -LIBOPT=$(LIB:.cma=.cmxa) - -.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi - -%.cmo: %mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) - rm -f $(@:.cmo=.tmp) - -%.cmi: %.mpi - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) - rm -f $(@:.cmi=.tmp) - -%.cmx: %.mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) - rm -f $(@:.cmx=.tmp) - -%.cmo: %.ml - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmi: %.mli - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmx: %.ml - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< - -all: bytecode - -opt: $(OBJSOPT) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) $(OBJSOPT) - -bytecode: $(OBJS) - $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS) - - -depend: - $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend - --include .depend - -clean: - rm -f *.cmxa - rm -f *.cm[aiox] - rm -f *.o - rm -f *.obj - rm -f *.a - rm -f *.lib - rm -f *~ - +# +# Translator from Modelica 2.x to flat Modelica +# +# Copyright (C) 2005 - 2007 Imagine S.A. +# For more information or commercial use please contact us at www.amesim.com +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# + +OCAMLDEP=ocamldep +OCAMLC=ocamlc +OCAMLOPT=ocamlopt +CAMLP4=camlp4 +INCLUDES=-I ../parsing +ifeq ($(RELEASE),yes) +OCAMLFLAGS=$(INCLUDES) +else +OCAMLFLAGS=-g $(INCLUDES) +endif +OCAMLOPTFLAGS=$(INCLUDES) +LIBS= +LIBSOPT=$(LIBS:.cma=.cmxa) +SRCS=types.ml nameResolve.ml + + +OBJS=$(SRCS:.ml=.cmo) +OBJSOPT=$(SRCS:.ml=.cmx) +LIB=compilation.cma +LIBOPT=$(LIB:.cma=.cmxa) + +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi + +%.cmo: %mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) + rm -f $(@:.cmo=.tmp) + +%.cmi: %.mpi + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) + rm -f $(@:.cmi=.tmp) + +%.cmx: %.mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) + rm -f $(@:.cmx=.tmp) + +%.cmo: %.ml + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmi: %.mli + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmx: %.ml + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< + +all: bytecode + +opt: $(OBJSOPT) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) $(OBJSOPT) + +bytecode: $(OBJS) + $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS) + + +depend: + $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend + +-include .depend + +clean: + rm -f *.cmxa + rm -f *.cm[aiox] + rm -f *.o + rm -f *.obj + rm -f *.a + rm -f *.lib + rm -f *~ + diff --git a/scilab/modules/scicos/src/translator/exceptionHandling/Makefile b/scilab/modules/scicos/src/translator/exceptionHandling/Makefile index f3c4360..0e34908 100644 --- a/scilab/modules/scicos/src/translator/exceptionHandling/Makefile +++ b/scilab/modules/scicos/src/translator/exceptionHandling/Makefile @@ -1,96 +1,96 @@ -# -# Translator from Modelica 2.x to flat Modelica -# -# Copyright (C) 2005 - 2007 Imagine S.A. -# For more information or commercial use please contact us at www.amesim.com -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# - -OCAMLDEP=ocamldep -OCAMLC=ocamlc -OCAMLOPT=ocamlopt -CAMLP4=camlp4 -INCLUDES=-I ../parsing -I ../compilation -I ../instantiation - -ifeq ($(RELEASE),yes) -OCAMLFLAGS=$(INCLUDES) -else -OCAMLFLAGS=-g $(INCLUDES) -endif - -OCAMLOPTFLAGS=$(INCLUDES) -LIBS= -LIBSOPT=$(LIBS:.cma=.cmxa) - -SRCS=errorDico.ml msgDico.ml exceptHandler.ml - - -OBJS=$(SRCS:.ml=.cmo) -OBJSOPT=$(SRCS:.ml=.cmx) -LIB=exceptionHandling.cma -LIBOPT=$(LIB:.cma=.cmxa) - -.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi - -%.cmo: %mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) - rm -f $(@:.cmo=.tmp) - -%.cmi: %.mpi - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) - rm -f $(@:.cmi=.tmp) - -%.cmx: %.mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) - rm -f $(@:.cmx=.tmp) - -%.cmo: %.ml %.cmi - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmi: %.mli - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmx: %.ml - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< - - -all: bytecode - -opt: $(OBJSOPT) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) \ - $(OBJSOPT) - -bytecode: $(OBJS) - $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS) - -depend: - $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend - --include .depend - -clean: - rm -f *.cmxa - rm -f *.cm[aiox] - rm -f *.o - rm -f *.obj - rm -f *.a - rm -f *.lib - rm -f *~ - rm -rf doc +# +# Translator from Modelica 2.x to flat Modelica +# +# Copyright (C) 2005 - 2007 Imagine S.A. +# For more information or commercial use please contact us at www.amesim.com +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# + +OCAMLDEP=ocamldep +OCAMLC=ocamlc +OCAMLOPT=ocamlopt +CAMLP4=camlp4 +INCLUDES=-I ../parsing -I ../compilation -I ../instantiation + +ifeq ($(RELEASE),yes) +OCAMLFLAGS=$(INCLUDES) +else +OCAMLFLAGS=-g $(INCLUDES) +endif + +OCAMLOPTFLAGS=$(INCLUDES) +LIBS= +LIBSOPT=$(LIBS:.cma=.cmxa) + +SRCS=errorDico.ml msgDico.ml exceptHandler.ml + + +OBJS=$(SRCS:.ml=.cmo) +OBJSOPT=$(SRCS:.ml=.cmx) +LIB=exceptionHandling.cma +LIBOPT=$(LIB:.cma=.cmxa) + +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi + +%.cmo: %mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) + rm -f $(@:.cmo=.tmp) + +%.cmi: %.mpi + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) + rm -f $(@:.cmi=.tmp) + +%.cmx: %.mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) + rm -f $(@:.cmx=.tmp) + +%.cmo: %.ml %.cmi + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmi: %.mli + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmx: %.ml + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< + + +all: bytecode + +opt: $(OBJSOPT) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) \ + $(OBJSOPT) + +bytecode: $(OBJS) + $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS) + +depend: + $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend + +-include .depend + +clean: + rm -f *.cmxa + rm -f *.cm[aiox] + rm -f *.o + rm -f *.obj + rm -f *.a + rm -f *.lib + rm -f *~ + rm -rf doc diff --git a/scilab/modules/scicos/src/translator/instantiation/Makefile b/scilab/modules/scicos/src/translator/instantiation/Makefile index 3437160..a4c493c 100644 --- a/scilab/modules/scicos/src/translator/instantiation/Makefile +++ b/scilab/modules/scicos/src/translator/instantiation/Makefile @@ -1,99 +1,99 @@ -# -# Translator from Modelica 2.x to flat Modelica -# -# Copyright (C) 2005 - 2007 Imagine S.A. -# For more information or commercial use please contact us at www.amesim.com -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# - -OCAMLDEP=ocamldep -OCAMLC=ocamlc -OCAMLOPT=ocamlopt -CAMLP4=camlp4 -INCLUDES=-I ../parsing -I ../compilation -ifeq ($(RELEASE),yes) -OCAMLFLAGS=$(INCLUDES) -else -OCAMLFLAGS=-g $(INCLUDES) -endif -OCAMLOPTFLAGS=$(INCLUDES) -LIBS= -LIBSOPT=$(LIBS:.cma=.cmxa) -SRCS=instantiation.ml -DOCS=instantiation.mli - -OBJS=$(SRCS:.ml=.cmo) -OBJSOPT=$(SRCS:.ml=.cmx) -LIB=instantiation.cma -LIBOPT=$(LIB:.cma=.cmxa) - -.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi - -%.cmo: %mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) - rm -f $(@:.cmo=.tmp) - -%.cmi: %.mpi - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) - rm -f $(@:.cmi=.tmp) - -%.cmx: %.mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) - rm -f $(@:.cmx=.tmp) - -%.cmo: %.ml - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmi: %.mli - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmx: %.ml - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< - -all: bytecode - -opt: $(OBJSOPT) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) \ - $(OBJSOPT) - -bytecode: $(OBJS) - $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS) - -doc: $(DOCS) - mkdir -p doc - $(OCAMLC) $(INCLUDES) -c $(DOCS) - ocamldoc $(INCLUDES) -html -d doc $(DOCS) - ocamldoc $(INCLUDES) -dot -o doc/dependencies.out $(DOCS) - -depend: - $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend - --include .depend - -clean: - rm -f *.cmxa - rm -f *.cm[aiox] - rm -f *.o - rm -f *.obj - rm -f *.a - rm -f *.lib - rm -f *~ - rm -rf doc - +# +# Translator from Modelica 2.x to flat Modelica +# +# Copyright (C) 2005 - 2007 Imagine S.A. +# For more information or commercial use please contact us at www.amesim.com +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# + +OCAMLDEP=ocamldep +OCAMLC=ocamlc +OCAMLOPT=ocamlopt +CAMLP4=camlp4 +INCLUDES=-I ../parsing -I ../compilation +ifeq ($(RELEASE),yes) +OCAMLFLAGS=$(INCLUDES) +else +OCAMLFLAGS=-g $(INCLUDES) +endif +OCAMLOPTFLAGS=$(INCLUDES) +LIBS= +LIBSOPT=$(LIBS:.cma=.cmxa) +SRCS=instantiation.ml +DOCS=instantiation.mli + +OBJS=$(SRCS:.ml=.cmo) +OBJSOPT=$(SRCS:.ml=.cmx) +LIB=instantiation.cma +LIBOPT=$(LIB:.cma=.cmxa) + +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi + +%.cmo: %mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) + rm -f $(@:.cmo=.tmp) + +%.cmi: %.mpi + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) + rm -f $(@:.cmi=.tmp) + +%.cmx: %.mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) + rm -f $(@:.cmx=.tmp) + +%.cmo: %.ml + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmi: %.mli + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmx: %.ml + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< + +all: bytecode + +opt: $(OBJSOPT) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) \ + $(OBJSOPT) + +bytecode: $(OBJS) + $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS) + +doc: $(DOCS) + mkdir -p doc + $(OCAMLC) $(INCLUDES) -c $(DOCS) + ocamldoc $(INCLUDES) -html -d doc $(DOCS) + ocamldoc $(INCLUDES) -dot -o doc/dependencies.out $(DOCS) + +depend: + $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend + +-include .depend + +clean: + rm -f *.cmxa + rm -f *.cm[aiox] + rm -f *.o + rm -f *.obj + rm -f *.a + rm -f *.lib + rm -f *~ + rm -rf doc + diff --git a/scilab/modules/scicos/src/translator/parsing/Makefile b/scilab/modules/scicos/src/translator/parsing/Makefile index 98d0ae5..c457a42 100644 --- a/scilab/modules/scicos/src/translator/parsing/Makefile +++ b/scilab/modules/scicos/src/translator/parsing/Makefile @@ -1,113 +1,113 @@ -# -# Translator from Modelica 2.x to flat Modelica -# -# Copyright (C) 2005 - 2007 Imagine S.A. -# For more information or commercial use please contact us at www.amesim.com -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# - -OCAMLDEP=ocamldep -OCAMLC=ocamlc -OCAMLOPT=ocamlopt -CAMLP4=camlp4 -INCLUDES= - -ifeq ($(RELEASE),yes) -OCAMLFLAGS=$(INCLUDES) -else -OCAMLFLAGS=-g $(INCLUDES) -endif - -OCAMLOPTFLAGS=$(INCLUDES) -LIBS= -LIBSOPT=$(LIBS:.cma=.cmxa) -SRCS=syntax.ml linenum.ml parser.ml lexer.ml - - -OBJS=$(SRCS:.ml=.cmo) -OBJSOPT=$(SRCS:.ml=.cmx) -LIB=parsing.cma -LIBOPT=$(LIB:.cma=.cmxa) - -.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi - -%.cmo: %mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) - rm -f $(@:.cmo=.tmp) - -%.cmi: %.mpi - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) - rm -f $(@:.cmi=.tmp) - -%.cmx: %.mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) - rm -f $(@:.cmx=.tmp) - -%.cmo: %.ml - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmi: %.mli - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmx: %.ml - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< - -%.ml %.mli: %.mly - ocamlyacc $(<) - rm -f $(<:.mly=.mli) - -%.ml: %.mll - ocamllex $(<) -all: bytecode - -opt: $(OBJSOPT) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) $(OBJSOPT) - -bytecode: $(OBJS) - $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS) - -parser.ml : parser.mly - ocamlyacc parser.mly - rm -f parser.mli - -lexer.ml : lexer.mll - ocamllex lexer.mll - -linenum.ml : linenum.mll - ocamllex linenum.mll - -depend: - $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend - --include .depend - -clean: - rm -f *.cmxa - rm -f *.cm[aiox] - rm -f *.o - rm -f *.obj - rm -f *.a - rm -f *.lib - rm -f parser.mli - rm -f parser.output - rm -f lexer.mli - rm -f linenum.mli - rm -f *~ - +# +# Translator from Modelica 2.x to flat Modelica +# +# Copyright (C) 2005 - 2007 Imagine S.A. +# For more information or commercial use please contact us at www.amesim.com +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# + +OCAMLDEP=ocamldep +OCAMLC=ocamlc +OCAMLOPT=ocamlopt +CAMLP4=camlp4 +INCLUDES= + +ifeq ($(RELEASE),yes) +OCAMLFLAGS=$(INCLUDES) +else +OCAMLFLAGS=-g $(INCLUDES) +endif + +OCAMLOPTFLAGS=$(INCLUDES) +LIBS= +LIBSOPT=$(LIBS:.cma=.cmxa) +SRCS=syntax.ml linenum.ml parser.ml lexer.ml + + +OBJS=$(SRCS:.ml=.cmo) +OBJSOPT=$(SRCS:.ml=.cmx) +LIB=parsing.cma +LIBOPT=$(LIB:.cma=.cmxa) + +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi + +%.cmo: %mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) + rm -f $(@:.cmo=.tmp) + +%.cmi: %.mpi + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) + rm -f $(@:.cmi=.tmp) + +%.cmx: %.mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) + rm -f $(@:.cmx=.tmp) + +%.cmo: %.ml + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmi: %.mli + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmx: %.ml + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< + +%.ml %.mli: %.mly + ocamlyacc $(<) + rm -f $(<:.mly=.mli) + +%.ml: %.mll + ocamllex $(<) +all: bytecode + +opt: $(OBJSOPT) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $(LIBOPT) $(LFLAGS) $(LIBSOPT) $(OBJSOPT) + +bytecode: $(OBJS) + $(OCAMLC) $(OCAMLFLAGS) -a -o $(LIB) $(LFLAGS) $(LIBS) $(OBJS) + +parser.ml : parser.mly + ocamlyacc parser.mly + rm -f parser.mli + +lexer.ml : lexer.mll + ocamllex lexer.mll + +linenum.ml : linenum.mll + ocamllex linenum.mll + +depend: + $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend + +-include .depend + +clean: + rm -f *.cmxa + rm -f *.cm[aiox] + rm -f *.o + rm -f *.obj + rm -f *.a + rm -f *.lib + rm -f parser.mli + rm -f parser.output + rm -f lexer.mli + rm -f linenum.mli + rm -f *~ + diff --git a/scilab/modules/scicos/src/translator/translation/Makefile b/scilab/modules/scicos/src/translator/translation/Makefile index c752844..862d4a3 100644 --- a/scilab/modules/scicos/src/translator/translation/Makefile +++ b/scilab/modules/scicos/src/translator/translation/Makefile @@ -1,131 +1,131 @@ -# -# Translator from Modelica 2.x to flat Modelica -# -# Copyright (C) 2005 - 2007 Imagine S.A. -# For more information or commercial use please contact us at www.amesim.com -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# - -EXE=translator -OCAMLDEP=ocamldep -OCAMLC=ocamlc -OCAMLOPT=ocamlopt -CAMLP4=camlp4 -INCLUDES=-I ../parsing -I ../compilation -I ../instantiation -I ../exceptionHandling - -ifeq ($(RELEASE),yes) -OCAMLFLAGS=$(INCLUDES) -else -OCAMLFLAGS=-g $(INCLUDES) -endif - -OCAMLOPTFLAGS=$(INCLUDES) -LIBS=../parsing/parsing.cma ../compilation/compilation.cma \ - ../instantiation/instantiation.cma ../exceptionHandling/exceptionHandling.cma \ - unix.cma -LIBSOPT=$(LIBS:.cma=.cmxa) - -SRCS=codeGeneration.ml libraryManager.ml versiondate.ml - - -OBJS=$(SRCS:.ml=.cmo) -OBJSOPT=$(SRCS:.ml=.cmx) - -# Avoid problems with svn command -LANG:=C -export LANG - -SVNLASTCHANGEDATESTR:=$(shell svn info .. | grep "Last Changed Date:") -SVNLASTCHANGEREVSTR:=$(shell svn info .. | grep "Last Changed Rev:") - -.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi - -%.cmo: %mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) - rm -f $(@:.cmo=.tmp) - -%.cmi: %.mpi - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) - $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) - rm -f $(@:.cmi=.tmp) - -%.cmx: %.mlp - $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) - rm -f $(@:.cmx=.tmp) - -%.cmo: %.ml %.cmi - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmi: %.mli - $(OCAMLC) $(OCAMLFLAGS) -c $< - -%.cmx: %.ml - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< - - -all: bytecode - -opt: $(OBJSOPT) +# +# Translator from Modelica 2.x to flat Modelica +# +# Copyright (C) 2005 - 2007 Imagine S.A. +# For more information or commercial use please contact us at www.amesim.com +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# + +EXE=translator +OCAMLDEP=ocamldep +OCAMLC=ocamlc +OCAMLOPT=ocamlopt +CAMLP4=camlp4 +INCLUDES=-I ../parsing -I ../compilation -I ../instantiation -I ../exceptionHandling + +ifeq ($(RELEASE),yes) +OCAMLFLAGS=$(INCLUDES) +else +OCAMLFLAGS=-g $(INCLUDES) +endif + +OCAMLOPTFLAGS=$(INCLUDES) +LIBS=../parsing/parsing.cma ../compilation/compilation.cma \ + ../instantiation/instantiation.cma ../exceptionHandling/exceptionHandling.cma \ + unix.cma +LIBSOPT=$(LIBS:.cma=.cmxa) + +SRCS=codeGeneration.ml libraryManager.ml versiondate.ml + + +OBJS=$(SRCS:.ml=.cmo) +OBJSOPT=$(SRCS:.ml=.cmx) + +# Avoid problems with svn command +LANG:=C +export LANG + +SVNLASTCHANGEDATESTR:=$(shell svn info .. | grep "Last Changed Date:") +SVNLASTCHANGEREVSTR:=$(shell svn info .. | grep "Last Changed Rev:") + +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mlp .mpi + +%.cmo: %mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmo=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -impl $(@:.cmo=.tmp) + rm -f $(@:.cmo=.tmp) + +%.cmi: %.mpi + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -intf $< > $(@:.cmi=.tmp) + $(OCAMLC) $(OCAMLFLAGS) -c -intf $(@:.cmi=.tmp) + rm -f $(@:.cmi=.tmp) + +%.cmx: %.mlp + $(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< > $(@:.cmx=.tmp) + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -impl $(@:.cmx=.tmp) + rm -f $(@:.cmx=.tmp) + +%.cmo: %.ml %.cmi + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmi: %.mli + $(OCAMLC) $(OCAMLFLAGS) -c $< + +%.cmx: %.ml + $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< + + +all: bytecode + +opt: $(OBJSOPT) $(OCAMLOPT) -verbose $(OCAMLOPTFLAGS) -o $(EXE) $(LFLAGS) $(LIBSOPT) $(OBJSOPT) translator.ml cp $(EXE) ../../../ rm -f $(EXE) - -bytecode: $(OBJS) - $(OCAMLC) $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(OBJS) translator.ml - -custom: $(OBJS) - $(OCAMLC) -verbose -custom $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(OBJS) translator.ml - -depend: version $(SRCS) - $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend - -versiontarget : -ifeq ("$(strip $(SVNLASTCHANGEDATESTR))", "") -ifeq ("$(strip $(wildcard versiondate.ml))", "") - @echo "***********************************************" - @echo "*** Could not expand the SVN version date *****" - @echo "*** using the template file as it is *****" - @echo "*** The build date will not be correct *****" - @echo "***********************************************" - cp -p versiondate.ml.tmpl versiondate.ml -else - @echo "***********************************************" - @echo "*** Reusing existing versiondate.ml ******" - @echo "***********************************************" -endif -else - sed -e '/let/s/AUTO_UPDATE_DATE/$(SVNLASTCHANGEDATESTR)/' -e '/let/s/AUTO_UPDATE_REV/$(SVNLASTCHANGEREVSTR)/' < versiondate.ml.tmpl > versiondate.ml -endif - -version: - $(MAKE) versiontarget - -versiondate.ml: $(filter-out versiondate.ml, $(SRCS)) - $(MAKE) versiontarget - --include .depend - -clean: - rm -f *.cmxa - rm -f *.cm[aiox] - rm -f *.o - rm -f *.obj + +bytecode: $(OBJS) + $(OCAMLC) $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(OBJS) translator.ml + +custom: $(OBJS) + $(OCAMLC) -verbose -custom $(OCAMLFLAGS) -o $(EXE) $(LFLAGS) $(LIBS) $(OBJS) translator.ml + +depend: version $(SRCS) + $(OCAMLDEP) $(INCLUDES) $(SRCS:.ml=.mli) $(SRCS) > .depend + +versiontarget : +ifeq ("$(strip $(SVNLASTCHANGEDATESTR))", "") +ifeq ("$(strip $(wildcard versiondate.ml))", "") + @echo "***********************************************" + @echo "*** Could not expand the SVN version date *****" + @echo "*** using the template file as it is *****" + @echo "*** The build date will not be correct *****" + @echo "***********************************************" + cp -p versiondate.ml.tmpl versiondate.ml +else + @echo "***********************************************" + @echo "*** Reusing existing versiondate.ml ******" + @echo "***********************************************" +endif +else + sed -e '/let/s/AUTO_UPDATE_DATE/$(SVNLASTCHANGEDATESTR)/' -e '/let/s/AUTO_UPDATE_REV/$(SVNLASTCHANGEREVSTR)/' < versiondate.ml.tmpl > versiondate.ml +endif + +version: + $(MAKE) versiontarget + +versiondate.ml: $(filter-out versiondate.ml, $(SRCS)) + $(MAKE) versiontarget + +-include .depend + +clean: + rm -f *.cmxa + rm -f *.cm[aiox] + rm -f *.o + rm -f *.obj rm -f $(EXE) - rm -f *~ + rm -f *~ -- 1.7.9.5