Source

orakuda / pa / OMakefile

Full commit
OCAMLPACKS[] = pcre camlp4

HAS_EXTENSION=
match $(string $(shell ocamlc -version))
case $"camlp4-lexer-plug"
    HAS_EXTENSION=true
    export
default
    HAS_EXTENSION=false
    export

FILES[] =
	xlexer
	lexrex
	pa_regexp
	pa_hash
	lexformat
	pa_format
	pa_sprintf
	pa_command
	pa_top
	pa_cformat

if $(HAS_EXTENSION)
    FILES[] += pa_extlex
    export

LIB = pa_orakuda

NO_INSTALL=true # installed from ../OMakefile
MyOCamlLibrary($(LIB), $(FILES))

OCAMLDEPFLAGS=-pp camlp4of
OCAMLPPFLAGS=-pp camlp4of

.PHONY: top_test test

# CR jfuruse: pcre dir is hard coded
top_test: pa_orakuda.cma ../orakuda.cmo
	ocaml -I .. -I +camlp4 dynlink.cma camlp4o.cma pa_orakuda.cma unix.cma -I $(shell ocamlfind query pcre) pcre.cma orakuda.cmo

test: pa_orakuda.cma
	camlp4o -printer OCaml -I . pa_orakuda.cma test_pa_orakuda.ml  

# install: pa_orakuda.cma pa_orakuda.cmxa
# 	ocamlfind remove pa_orakuda
# 	ocamlfind install pa_orakuda pa*.cmo pa*.cmx pa*.cmi pa*.cma pa*.cmxa