Commit 466b1feb authored by POGODALLA Sylvain's avatar POGODALLA Sylvain

Fixes to be comptaible with dypgen-20080901

parent 7696d4ba
......@@ -8,7 +8,7 @@ LIBSOPT = $(patsubst %.cmo,%.cmx,$(LIBS:.cma=.cmxa))
I_PREVIOUS_DIRS = $(foreach dir,$(PREVIOUS_DIRS), -I $(dir))
LOCAL_ML := $(ML)
LOCAL_MLI = $(foreach mli,$(ML:.ml=.mli),$(filter $(mli),$(wildcard *.mli)))
LOCAL_MLI = $(foreach mli,$(ML:.ml=.mli),$(filter $(mli),$(wildcard *.mli))) $(DYP:%.dyp=%.mli)
LOCAL_CMO := $(ML:%.ml=%.cmo)
LOCAL_CMX := $(ML:%.ml=%.cmx)
MLI = $(foreach mli,$(ML:.ml=.mli),$(filter $(mli),$(wildcard *.mli)))
......@@ -26,6 +26,9 @@ PP = $(OCAMLPP)
EXE = $(EXE_SOURCES:%.ml=%)
EXEOPT = $(EXE_SOURCES:%.ml=%.opt)
CAMLLEX_ML=$(CAMLLEX:%.mll=%.ml)
DYP_ML=$(DYP:%.dyp=%.ml)
DYP_MLI=$(DYP:%.dyp=%.mli)
# generic rules :
#################
......@@ -65,6 +68,22 @@ endif
%.cmx : %.ml $(PREVIOUS_FILES:.ml=.cmx) $(PREVIOUS_MLIS)
ocamlopt.opt $(PROFILEOPT) $(PP) -c $(LIBDIR) $(OPTFLAGS) $<
#DYPGEN_EXE = dypgen.opt
#DYPGEN_EXE = $(DYPPATH)/dypgen/dypgen --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
DYPGEN_EXE = dypgen.opt --no-pp --no-obj-type --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
%.mli : %.dyp
$(DYPGEN_EXE) --noemit-token-type $<
%.ml : %.dyp
$(DYPGEN_EXE) --noemit-token-type $<
%.ml : %.mll
ocamllex.opt $<
# Dependancy graphs and types
##################
......@@ -88,7 +107,8 @@ clean:
ifdef EXE
@rm -f $(EXE) $(EXEOPT)
endif
@rm -f *.cm[ioax]* *.o *.a *~ *.annot depend .targets
# echo $(CAMLLEX_ML) $(DYP_ML) $(DYP_MLI)
@rm -f *.cm[ioax]* *.o *.a *~ *.annot depend .targets $(CAMLLEX_ML) $(DYP_ML) $(DYP_MLI) $(DYP:%.dyp=%.extract_type) $(DYP:%.dyp=%.ml.temp)
@rm -f *.dot *.ps *.log
@rm -rf doc
@find . -name "*#[0-9]*" -exec printf "\n\nWARNING: I did not erase the file %s. It probably is a file automatically generated by so6 because of a conflict. Please check if the conflict was resolved, and manually erase it\n\n" {} \;
......@@ -99,7 +119,7 @@ superclean: clean
@rm -i #*
depend: $(LOCAL_MLI) $(LOCAL_ML) $(EXE_SOURCES)
depend: $(filter-out $(DYP_ML) $(DYP_MLI),$(LOCAL_MLI) $(LOCAL_ML) $(EXE_SOURCES))
rm -f depend
@(ocamldep.opt $(PP) $(I_PREVIOUS_DIRS) $^ > depend)||(printf "\n\n****** WARNING: DEPEND FILE NOT GENERATED *******\n\n\n" ;rm depend)
......
......@@ -8,7 +8,7 @@ LIBSOPT = $(patsubst %.cmo,%.cmx,$(LIBS:.cma=.cmxa))
I_PREVIOUS_DIRS = $(foreach dir,$(PREVIOUS_DIRS), -I $(dir))
LOCAL_ML := $(ML)
LOCAL_MLI = $(foreach mli,$(ML:.ml=.mli),$(filter $(mli),$(wildcard *.mli)))
LOCAL_MLI = $(foreach mli,$(ML:.ml=.mli),$(filter $(mli),$(wildcard *.mli))) $(DYP:%.dyp=%.mli)
LOCAL_CMO := $(ML:%.ml=%.cmo)
LOCAL_CMX := $(ML:%.ml=%.cmx)
MLI = $(foreach mli,$(ML:.ml=.mli),$(filter $(mli),$(wildcard *.mli)))
......@@ -26,6 +26,9 @@ PP = $(OCAMLPP)
EXE = $(EXE_SOURCES:%.ml=%)
EXEOPT = $(EXE_SOURCES:%.ml=%.opt)
CAMLLEX_ML=$(CAMLLEX:%.mll=%.ml)
DYP_ML=$(DYP:%.dyp=%.ml)
DYP_MLI=$(DYP:%.dyp=%.mli)
# generic rules :
#################
......@@ -65,6 +68,22 @@ endif
%.cmx : %.ml $(PREVIOUS_FILES:.ml=.cmx) $(PREVIOUS_MLIS)
@OCAMLCOPT@ $(PROFILEOPT) $(PP) -c $(LIBDIR) $(OPTFLAGS) $<
#DYPGEN_EXE = @DYPGEN@
#DYPGEN_EXE = $(DYPPATH)/dypgen/dypgen --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
DYPGEN_EXE = @DYPGEN@ --no-pp --no-obj-type --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
%.mli : %.dyp
$(DYPGEN_EXE) --noemit-token-type $<
%.ml : %.dyp
$(DYPGEN_EXE) --noemit-token-type $<
%.ml : %.mll
@OCAMLLEX@ $<
# Dependancy graphs and types
##################
......@@ -88,7 +107,8 @@ clean:
ifdef EXE
@rm -f $(EXE) $(EXEOPT)
endif
@rm -f *.cm[ioax]* *.o *.a *~ *.annot depend .targets
# echo $(CAMLLEX_ML) $(DYP_ML) $(DYP_MLI)
@rm -f *.cm[ioax]* *.o *.a *~ *.annot depend .targets $(CAMLLEX_ML) $(DYP_ML) $(DYP_MLI) $(DYP:%.dyp=%.extract_type) $(DYP:%.dyp=%.ml.temp)
@rm -f *.dot *.ps *.log
@rm -rf doc
@find . -name "*#[0-9]*" -exec printf "\n\nWARNING: I did not erase the file %s. It probably is a file automatically generated by so6 because of a conflict. Please check if the conflict was resolved, and manually erase it\n\n" {} \;
......@@ -99,7 +119,7 @@ superclean: clean
@rm -i #*
depend: $(LOCAL_MLI) $(LOCAL_ML) $(EXE_SOURCES)
depend: $(filter-out $(DYP_ML) $(DYP_MLI),$(LOCAL_MLI) $(LOCAL_ML) $(EXE_SOURCES))
rm -f depend
@(@OCAMLDEP@ $(PP) $(I_PREVIOUS_DIRS) $^ > depend)||(printf "\n\n****** WARNING: DEPEND FILE NOT GENERATED *******\n\n\n" ;rm depend)
......
......@@ -31,6 +31,9 @@ PREVIOUS_DIRS = ../utils ../logic
#ML = error.ml abstract_syntax.ml interface.ml environment.ml entry.ml parser.ml lexer.ml data_parsing.ml
ML = error.ml interface.ml environment.ml entry.ml syntactic_data_structures.ml token.ml lexer.ml parser.ml interactive.ml
DYP = parser.dyp
CAMLLEX = lexer.mll
EXE_SOURCES = test.ml
####################################
......@@ -41,54 +44,27 @@ EXE_SOURCES = test.ml
include ../Makefile.common
#DYPGEN_EXE = dypgen.opt
#DYPGEN_EXE = $(DYPPATH)/dypgen/dypgen --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
DYPGEN_EXE = dypgen.opt --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
# #DYPGEN_EXE = dypgen.opt
# #DYPGEN_EXE = $(DYPPATH)/dypgen/dypgen --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
# DYPGEN_EXE = dypgen.opt --no-pp --no-obj-type --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
parser.ml : parser.dyp
$(DYPGEN_EXE) --noemit-token-type $<
# parser.ml : parser.dyp
# $(DYPGEN_EXE) --noemit-token-type $<
#parser.ml : parser.dyp
# $(DYPGEN_EXE) --noemit-token-type $<
# #parser.ml : parser.dyp
# # $(DYPGEN_EXE) --noemit-token-type $<
lexer.ml : lexer.mll
ocamllex.opt $<
# lexer.ml : lexer.mll
# ocamllex.opt $<
parser.ml: ../utils/utils.cmi token.cmi syntactic_data_structures.cmi \
lexer.cmo error.cmi environment.cmi entry.cmi \
../logic/abstract_syntax.cmi
parser.cmi: token.cmi error.cmi environment.cmi ../logic/abstract_syntax.cmi
parser.cmo: ../utils/utils.cmi token.cmi syntactic_data_structures.cmi \
lexer.cmo error.cmi environment.cmi entry.cmi \
../logic/abstract_syntax.cmi parser.cmi
lexer.cmo error.cmi environment.cmi entry.cmi \
../logic/abstract_syntax.cmi parser.cmi
parser.cmx: ../utils/utils.cmx token.cmx syntactic_data_structures.cmx \
lexer.cmx error.cmx environment.cmx entry.cmx \
../logic/abstract_syntax.cmx parser.cmi
token.cmi: ../logic/abstract_syntax.cmi
token.cmo: ../logic/abstract_syntax.cmi token.cmi
token.cmx: ../logic/abstract_syntax.cmx token.cmi
error.cmo: ../utils/utils.cmi error.cmi
error.cmx: ../utils/utils.cmx error.cmi
environment.cmi: interface.cmi ../logic/abstract_syntax.cmi
environment.cmo: ../utils/utils.cmi interface.cmi error.cmi \
../logic/abstract_syntax.cmi environment.cmi
environment.cmx: ../utils/utils.cmx interface.cmx error.cmx \
../logic/abstract_syntax.cmx environment.cmi
syntactic_data_structures.cmi: interface.cmi ../logic/abstract_syntax.cmi
syntactic_data_structures.cmo: ../utils/utils.cmi ../utils/tries.cmi \
../utils/table.cmi error.cmi ../logic/abstract_syntax.cmi \
syntactic_data_structures.cmi
syntactic_data_structures.cmx: ../utils/utils.cmx ../utils/tries.cmx \
../utils/table.cmx error.cmx ../logic/abstract_syntax.cmx \
syntactic_data_structures.cmi
lexer.cmo: ../utils/utils.cmi token.cmi error.cmi entry.cmi
lexer.cmx: ../utils/utils.cmx token.cmx error.cmx entry.cmx
interface.cmi: ../logic/lambda.cmi error.cmi ../logic/abstract_syntax.cmi
lexer.cmx error.cmx environment.cmx entry.cmx \
../logic/abstract_syntax.cmx parser.cmi
......@@ -31,6 +31,9 @@ PREVIOUS_DIRS = ../utils ../logic
#ML = error.ml abstract_syntax.ml interface.ml environment.ml entry.ml parser.ml lexer.ml data_parsing.ml
ML = error.ml interface.ml environment.ml entry.ml syntactic_data_structures.ml token.ml lexer.ml parser.ml interactive.ml
DYP = parser.dyp
CAMLLEX = lexer.mll
EXE_SOURCES = test.ml
####################################
......@@ -41,55 +44,28 @@ EXE_SOURCES = test.ml
include ../Makefile.common
#DYPGEN_EXE = @DYPGEN@
#DYPGEN_EXE = $(DYPPATH)/dypgen/dypgen --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
DYPGEN_EXE = @DYPGEN@ --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
# #DYPGEN_EXE = @DYPGEN@
# #DYPGEN_EXE = $(DYPPATH)/dypgen/dypgen --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
# DYPGEN_EXE = @DYPGEN@ --no-pp --no-obj-type --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)"
parser.ml : parser.dyp
$(DYPGEN_EXE) --noemit-token-type $<
# parser.ml : parser.dyp
# $(DYPGEN_EXE) --noemit-token-type $<
#parser.ml : parser.dyp
# $(DYPGEN_EXE) --noemit-token-type $<
# #parser.ml : parser.dyp
# # $(DYPGEN_EXE) --noemit-token-type $<
lexer.ml : lexer.mll
@OCAMLLEX@ $<
# lexer.ml : lexer.mll
# @OCAMLLEX@ $<
parser.ml: ../utils/utils.cmi token.cmi syntactic_data_structures.cmi \
lexer.cmo error.cmi environment.cmi entry.cmi \
../logic/abstract_syntax.cmi
parser.dyp: parser.cmo
parser.cmi: token.cmi error.cmi environment.cmi ../logic/abstract_syntax.cmi
parser.cmo: ../utils/utils.cmi token.cmi syntactic_data_structures.cmi \
lexer.cmo error.cmi environment.cmi entry.cmi \
../logic/abstract_syntax.cmi parser.cmi
lexer.cmo error.cmi environment.cmi entry.cmi \
../logic/abstract_syntax.cmi parser.cmi
parser.cmx: ../utils/utils.cmx token.cmx syntactic_data_structures.cmx \
lexer.cmx error.cmx environment.cmx entry.cmx \
../logic/abstract_syntax.cmx parser.cmi
token.cmi: ../logic/abstract_syntax.cmi
token.cmo: ../logic/abstract_syntax.cmi token.cmi
token.cmx: ../logic/abstract_syntax.cmx token.cmi
error.cmo: ../utils/utils.cmi error.cmi
error.cmx: ../utils/utils.cmx error.cmi
environment.cmi: interface.cmi ../logic/abstract_syntax.cmi
environment.cmo: ../utils/utils.cmi interface.cmi error.cmi \
../logic/abstract_syntax.cmi environment.cmi
environment.cmx: ../utils/utils.cmx interface.cmx error.cmx \
../logic/abstract_syntax.cmx environment.cmi
syntactic_data_structures.cmi: interface.cmi ../logic/abstract_syntax.cmi
syntactic_data_structures.cmo: ../utils/utils.cmi ../utils/tries.cmi \
../utils/table.cmi error.cmi ../logic/abstract_syntax.cmi \
syntactic_data_structures.cmi
syntactic_data_structures.cmx: ../utils/utils.cmx ../utils/tries.cmx \
../utils/table.cmx error.cmx ../logic/abstract_syntax.cmx \
syntactic_data_structures.cmi
lexer.cmo: ../utils/utils.cmi token.cmi error.cmi entry.cmi
lexer.cmx: ../utils/utils.cmx token.cmx error.cmx entry.cmx
interface.cmi: ../logic/lambda.cmi error.cmi ../logic/abstract_syntax.cmi
lexer.cmx error.cmx environment.cmx entry.cmx \
../logic/abstract_syntax.cmx parser.cmi
parser.ml: ../utils/utils.cmi token.cmi syntactic_data_structures.cmi \
This diff is collapsed.
......@@ -27,6 +27,9 @@ PREVIOUS_DIRS = ../utils ../logic ../grammars ../lambda.sylvain
ML = scripting_errors.ml functions.ml script_lexer.ml script_parser.ml
DYP = script_parser.dyp
CAMLLEX = script_lexer.mll
EXE_SOURCES = test.ml
####################################
......@@ -37,40 +40,14 @@ EXE_SOURCES = test.ml
include ../Makefile.common
script_parser.ml : script_parser.dyp
@DYPGEN@ --ocamlc "$(LIBDIR) $(I_PREVIOUS_DIRS)" --noemit-token-type $<
script_lexer.ml : script_lexer.mll
@OCAMLLEX@ $<
script_parser.cmi: script_lexer.cmo ../grammars/environment.cmi \
../logic/abstract_syntax.cmi
script_parser.ml: scripting_errors.cmi script_lexer.cmo functions.cmi \
../grammars/error.cmi ../grammars/environment.cmi \
../logic/abstract_syntax.cmi
script_parser.cmo: scripting_errors.cmi script_lexer.cmo functions.cmi \
../grammars/error.cmi ../grammars/environment.cmi \
../logic/abstract_syntax.cmi script_parser.cmi
../logic/abstract_syntax.cmi script_parser.cmi
script_parser.cmx: scripting_errors.cmx script_lexer.cmx functions.cmx \
../grammars/error.cmx ../grammars/environment.cmx \
../logic/abstract_syntax.cmx script_parser.cmi
script_lexer.cmo: scripting_errors.cmi ../grammars/error.cmi \
../logic/abstract_syntax.cmi
script_lexer.cmx: scripting_errors.cmx ../grammars/error.cmx \
../logic/abstract_syntax.cmx
scripting_errors.cmo: ../grammars/error.cmi ../logic/abstract_syntax.cmi \
scripting_errors.cmi
scripting_errors.cmx: ../grammars/error.cmx ../logic/abstract_syntax.cmx \
scripting_errors.cmi
functions.cmi: ../grammars/environment.cmi
functions.cmo: ../utils/utils.cmi scripting_errors.cmi ../grammars/parser.cmi \
../grammars/environment.cmi functions.cmi
functions.cmx: ../utils/utils.cmx scripting_errors.cmx ../grammars/parser.cmx \
../grammars/environment.cmx functions.cmi
../logic/abstract_syntax.cmx script_parser.cmi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment