diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-11-09 12:02:04 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-11-09 12:02:04 +0000 |
commit | 566dc80134a61ef7909315ddc902da511741e5f1 (patch) | |
tree | dda5abfbf25a7828b8119229ff62c0d8735a8890 /perl_checker.src/Makefile | |
parent | f77da0ea13e278254462c123518881e1dc19085a (diff) | |
download | perl-MDK-Common-566dc80134a61ef7909315ddc902da511741e5f1.tar perl-MDK-Common-566dc80134a61ef7909315ddc902da511741e5f1.tar.gz perl-MDK-Common-566dc80134a61ef7909315ddc902da511741e5f1.tar.bz2 perl-MDK-Common-566dc80134a61ef7909315ddc902da511741e5f1.tar.xz perl-MDK-Common-566dc80134a61ef7909315ddc902da511741e5f1.zip |
*** empty log message ***
Diffstat (limited to 'perl_checker.src/Makefile')
-rw-r--r-- | perl_checker.src/Makefile | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/perl_checker.src/Makefile b/perl_checker.src/Makefile new file mode 100644 index 0000000..0dc65c2 --- /dev/null +++ b/perl_checker.src/Makefile @@ -0,0 +1,84 @@ +CSLC = ocamlcp -p a +CSLC = ocamlc +CSLOPT = ocamlopt +CSLDEP = ocamldep +CSLLEX = ocamllex +CSLYACC = ocamlyacc +CSLFLAGS = -w A -g +CSLOPTFLAGS = + +LEX_FILES = $(wildcard *.mll) +YACC_FILES = $(wildcard *.mly) +TMP_MLFILES = $(YACC_FILES:%.mly=%.ml) $(LEX_FILES:%.mll=%.ml) +TMP_MLIFILES = $(YACC_FILES:%.mly=%.mli) + +ALL_PROGS = perl_checker + +PROG_OBJS_WITH_CMI = parser.cmo print.cmo perl_checker.cmo +PROG_OBJS = common.cmo flags.cmo info.cmo $(LEX_FILES:%.mll=%.cmo) $(PROG_OBJS_WITH_CMI) +CMA_FILES = + +PROG_OBJX_WITH_CMI = $(PROG_OBJS_WITH_CMI:%.cmo=%.cmx) +PROG_OBJX = $(PROG_OBJS:%.cmo=%.cmx) +CMXA_FILES = $(CMA_FILES:%.cma=%.cmxa) + +.PHONY: depend tags clean + +default: .compiling TAGS $(ALL_PROGS) + rm -f .compiling + +all: perl_checker + +perl_checker: .depend $(PROG_OBJS) + $(CSLC) -custom $(CSLFLAGS) $(LIBDIRS) -o $@ $(CMA_FILES) $(PROG_OBJS) + cp -f perl_checker perl_checker_debug + +perl_checker_opt: .depend $(PROG_OBJX) + $(CSLOPT) $(CSLOPTFLAGS) $(LIBDIRS) -o $@ $(CMXA_FILES) $(PROG_OBJX) + +.compiling: + touch $@ + +# Common rules +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly + +%.ml: %.mll types.cmi parser.cmi + $(CSLLEX) $< + +%.mli %.ml: %.mly + $(CSLYACC) $< + +$(PROG_OBJS_WITH_CMI): %.cmo: %.cmi + +$(PROG_OBJX_WITH_CMI): %.cmx: %.cmi + +%.cmo: %.ml + $(CSLC) $(CSLFLAGS) -c $< + +%.cmx: %.ml + $(CSLOPT) $(CSLOPTFLAGS) -c $< + +.mli.cmi: + $(CSLC) $(CSLFLAGS) -c $< + +clean: + rm -f $(ALL_PROGS) *~ *.o *.cm[iox] $(TMP_MLIFILES) $(TMP_MLFILES) .depend .compiling TAGS gmon.out ocamlprof.dump + +tags: + ocamltags *.ml + +TAGS: + ocamltags *.ml + +# Dependencies +depend: .depend +.depend: + $(CSLDEP) $(INCLUDES) *.mli *.mll *.ml > .depend + +# missing dependencies: +perl_checker.cmo: lexer.cmi +perl_checker.cmx: lexer.cmi +lexer.cmx: common.cmi +lexer.cmo: common.cmi + +-include .depend |