Commit ad716ac0 authored by POGODALLA Sylvain's avatar POGODALLA Sylvain

Delete automatically generated files

parent 830443c6
PHONY: config byte opt clean superclean install
BINARIES=acgc acgc.opt acg acg.opt
prefix = /usr/local
exec_prefix = ${prefix}
byte opt:
$(MAKE) -C src $@
for file in $(BINARIES); do find . -name "$$file" -exec cp {} . \; ; done
all: byte opt
superclean clean:
if test "$@" = clean ; then $(MAKE) -C config $@ ; fi
$(MAKE) -C src $@
rm -rf *.log *~ autom4te.cache
find . -name "*~" -exec rm -f {} \;
-for file in $(BINARIES); do rm $$file ; done
install:
for file in $(BINARIES); do if test -x $$file ; then cp $$file ${exec_prefix}/bin/. ; fi ; done
uninstall:
for file in $(BINARIES); do if test -x ${exec_prefix}/bin/$$file ; then rm ${exec_prefix}/bin/$$file ; fi ; done
# Part for the auto configuration
config: configure
configure: config/configure.ac
cd $(<D) && autoconf && mv configure .. & cd ..
clean:
rm -rf *.log config.* autom4te.cache *~
\ No newline at end of file
PHONY: test
SUBDIRS= utils logic grammars acg-data scripting lambda
byte:
$(foreach dir,$(SUBDIRS),$(MAKE) -r -S -C $(dir) byte;)
opt:
$(foreach dir,$(SUBDIRS),$(MAKE) -r -S -C $(dir) opt;)
superclean clean:
rm -rf *~ *.log
$(foreach dir,$(SUBDIRS),$(MAKE) -r -S -C $(dir) $@;)
PREVIOUS_FILES = $(foreach dir,$(PREVIOUS_DIRS),$(addprefix $(dir)/,$(shell sed -n -e 's/^ML *= *\(.*\)/\1/p' $(dir)/Makefile)))
PREVIOUS_MLIS = $(foreach mli,$(PREVIOUS_FILES:.ml=.mli),$(filter $(mli),$(foreach dir,$(PREVIOUS_DIRS),$(wildcard $(dir)/*.mli))))
LIBDIR += $(foreach dir,$(PREVIOUS_DIRS), -I $(dir))
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))) $(DYP:%.dyp=%.mli)
LOCAL_CMO := $(ML:%.ml=%.cmo)
LOCAL_CMX := $(ML:%.ml=%.cmx)
MLI = $(foreach mli,$(ML:.ml=.mli),$(filter $(mli),$(wildcard *.mli)))
ML := $(PREVIOUS_FILES) $(ML)
MLI := $(PREVIOUS_MLIS) $(MLI)
CMO = $(ML:.ml=.cmo)
CMI = $(ML:.ml=.cmi)
CMX = $(ML:.ml=.cmx)
.PHONY : all byte opt clean $(PRELIMINARY) superclean
.PRECIOUS : $(DYP:%.dyp=%.ml %.mli) $(CAMLLEX:%.mll=%.ml)
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 :
#################
# Makes byte the default goal
byte : $(PRELIMINARY) $(LOCAL_CMO) $(EXE)
byte_mli : $(PRELIMINARY) $(LOCAL_MLI:%.mli=%.cmi)
opt : $(PRELIMINARY) $(LOCAL_CMX) $(EXEOPT)
ifdef EXE_SOURCES
$(EXE) : $(CMO)
ocamlc.opt -o $@ $(LIBDIR) $(LIBS) $(BYTEFLAGS) $^
endif
ifdef EXE_SOURCES
$(EXEOPT) : $(CMX)
ocamlopt.opt -o $@ $(LIBDIR) $(LIBSOPT) $(OPTFLAGS) $^
endif
../%.cmi : ../%.mli
$(foreach dir,$(PREVIOUS_DIRS),$(MAKE) -r -S -C $(dir) byte_mli;)
%.cmi : %.mli
ocamlc.opt $(PP) -c $(LIBDIR) $(LIBS) $(BYTEFLAGS) $<
../%.cmo : ../%.ml
$(foreach dir,$(PREVIOUS_DIRS),$(MAKE) -r -S -C $(dir) byte;)
# $(MAKE) -r -S -C $(@D) $(@F)
../%.cmx : ../%.ml
$(foreach dir,$(PREVIOUS_DIRS),$(MAKE) -r -S -C $(dir) opt;)
# $(MAKE) $(PP) -r -S -C $(@D) $(@F)
%.cmo : %.ml $(PREVIOUS_FILES:.ml=.cmo) $(PREVIOUS_MLIS)
ocamlc.opt $(PP) -c $(LIBDIR) $(BYTEFLAGS) $<
%.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
##################
dep : depend.ps
types : types.ps
depend.ps : DEP_FLAG = -dot-reduce
types.ps : DEP_FLAG = -dot-types
depend.ps : depend.dot
dot -Tps -o $@ $<
%.dot : $(CMO)
# ocamldoc.opt $(PP) $(LIBDIR) -o $@ -dot $(DEP_FLAG) $(ML)
ocamldoc.opt $(PP) $(LIBDIR) -o $@ -dot $(DEP_FLAG) $(ML)
# clean and depend
##################
clean:
ifdef EXE
@rm -f $(EXE) $(EXEOPT)
endif
# 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" {} \;
@find . -name "#*" -exec printf "\n\nWARNING: I did not erase the file %s. It probably is a file automatically generated by (X)Emacs as backup. Please check if it can be erased\n\n" {} \;
superclean: clean
@rm -i *#[0-9]*
@rm -i #*
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)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),superclean)
ifneq ($(MAKECMDGOALS),depend)
ifneq ($(MAKECMDGOALS),config)
-include depend
endif
endif
endif
endif
# documentation rules
#####################
doc : $(CMO) $(MLI) $(ML)
mkdir -p doc
ocamldoc.opt $(PP) $(OCAMLDOC_FLAGS) $(LIBDIR) -d $@ $(filter %.mli,$^) $(filter %.ml,$^)
# ocamldoc.opt $(PP) $(OCAMLDOC_FLAGS) $(LIBDIR) -d $@ $(filter %.mli,$^)
.targets:
-rm -f $@
@($(foreach exe,$(EXE),echo $(exe) : $(exe:%=%.cmo)>>$@;))
@($(foreach exe,$(EXE),echo $(exe:%=%.opt) : $(exe:%=%.cmx)>>$@;))
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),superclean)
ifneq ($(MAKECMDGOALS),config)
ifdef EXE_SOURCES
include .targets
endif
endif
endif
endif
DEBUGFLAG = -g
OCAMLCPOPT = -p fm
# All warnings are treated as errors
WARNINGS = -w yz -warn-error A
COMMONFLAGS= $(WARNINGS) -dtypes
BYTEFLAGS = $(COMMONFLAGS) $(DEBUGFLAG)
OPTFLAGS = $(COMMONFLAGS)
LFLAGS= -a
TITLE="The ACG Development Toolkit Documentation"
OCAMLDOC_FLAGS = -sort -keep-code -html -t $(TITLE)
#CAMLDOC_FLAGS = -html -t $(TITLE)
LIBS = camlp4.cma
LIBDIR = -I +camlp4
OCAMLPP = -pp "camlp4o pa_extend.cmo pa_macro.cmo $(DEBUGFLAGS) -loc loc"
# Make byte the very first target
byte:
config:
pushd ../.. && ./configure && popd
###############################################
# #
# Makefile for directories with no executable #
# #
###############################################
include ../Makefile.master
###############################
# #
# Set the following variables #
# #
###############################
# Used libraries
LIBS += dyp.cma str.cma
# The corresponding directories
# (if not in the main ocaml lib directory,
# ex. -I +campl4
LIBDIR = -I +dypgen -I +camlp4
# Directories to which the current source files depend on
PREVIOUS_DIRS = ../utils ../logic ../grammars
# Source files in the right order of dependance
ML = signature.ml lexicon.ml
EXE_SOURCES = acgc.ml
####################################
# #
# End of the configuration section #
# #
####################################
include ../Makefile.common
###############################################
# #
# Makefile for directories with no executable #
# #
###############################################
include ../Makefile.master
###############################
# #
# Set the following variables #
# #
###############################
# Used libraries
LIBS += dyp.cma str.cma
DYPPATH = /home/pogodall/import/ocaml/dypgen
DYPGEN_LIB = +dypgen
#DYPGEN_LIB = $(DYPPATH)/dyplib
# The corresponding directories
# (if not in the main ocaml lib directory,
# ex. -I +campl4
LIBDIR = -I $(DYPGEN_LIB) -I +camlp4
# Directories to which the current source files depend on
PREVIOUS_DIRS = ../utils ../logic
# Source files in the right order of dependance
#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 acg_token.ml lexer.ml parser.ml interactive.ml
DYP = parser.dyp
CAMLLEX = lexer.mll
####################################
# #
# End of the configuration section #
# #
####################################
include ../Makefile.common
# #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 $<
# lexer.ml : lexer.mll
# ocamllex.opt $<
parser.ml: ../utils/utils.cmi acg_token.cmi syntactic_data_structures.cmi \
lexer.cmi error.cmi environment.cmi entry.cmi \
../logic/abstract_syntax.cmi
parser.cmo: ../utils/utils.cmi acg_token.cmi syntactic_data_structures.cmi \
lexer.cmo error.cmi environment.cmi entry.cmi \
../logic/abstract_syntax.cmi parser.cmi
parser.cmx: ../utils/utils.cmx acg_token.cmx syntactic_data_structures.cmx \
lexer.cmx error.cmx environment.cmx entry.cmx \
../logic/abstract_syntax.cmx parser.cmi
parser.ml: ../utils/utils.cmi acg_token.cmi syntactic_data_structures.cmi \
###############################################
# #
# Makefile for directories with no executable #
# #
###############################################
include ../Makefile.master
###############################
# #
# Set the following variables #
# #
###############################
# Used libraries
LIBS += dyp.cma str.cma
# The corresponding directories
# (if not in the main ocaml lib directory,
# ex. -I +campl4
LIBDIR = -I +dypgen -I +camlp4
# Directories to which the current source files depend on
PREVIOUS_DIRS = ../utils ../logic ../grammars
# Source files in the right order of dependance
ML = utilitaires.ml display.ml typechecker.ml sign.ml
EXE_SOURCES = test.ml
####################################
# #
# End of the configuration section #
# #
####################################
include ../Makefile.common
parser.ml : parser.dyp
dypgen.opt $<
lexer.ml : lexer.mll
ocamllex.opt $<
###############################################
# #
# Makefile for directories with no executable #
# #
###############################################
include ../Makefile.master
###############################
# #
# Set the following variables #
# #
###############################
# Used libraries
LIBS += dyp.cma
# The corresponding directories
# (if not in the main ocaml lib directory,
# ex. -I +campl4
LIBDIR = -I +dypgen -I +camlp4
# Directories to which the current source files depend on
PREVIOUS_DIRS = ../utils
# Source files in the right order of dependance
#ML = error.ml abstract_syntax.ml interface.ml environment.ml entry.ml parser.ml lexer.ml data_parsing.ml
ML = abstract_syntax.ml lambda.ml
EXE_SOURCES =
####################################
# #
# End of the configuration section #
# #
####################################
include ../Makefile.common
###############################################
# #
# Makefile for directories with no executable #
# #
###############################################
include ../Makefile.master
###############################
# #
# Set the following variables #
# #
###############################
# Used libraries
LIBS += gramlib.cma str.cma
# The corresponding directories
# (if not in the main ocaml lib directory,
# ex. +campl4
LIBDIR = -I +camlp4
# Directories to which the current source files depend on
PREVIOUS_DIRS =
# Source files in the right order of dependance
ML = utils.ml table.ml tries.ml
# Uncomment the next line and put the name of the exe of this directory, if relevant
# EXE_SOURCES =
####################################
# #
# End of the configuration section #
# #
####################################
include ../Makefile.common
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