VERSION = 1.1 USE_OCAMLFIND = true OCAMLFLAGS += -dtypes FILES_COMMON = cache_aux cache_util FILES_CLIENT = cache_clnt cache_client FILES_SERVER = cache_srv cache_server cache_plex FILES_DOC = cache_client cache_server cache_plex cache_util OCAMLPACKS = rpc,netplex BYTE_ENABLED = true if $(not $(defined NATIVE_ENABLED)) NATIVE_ENABLED = true export OCamlLibrary( cache_common, $(FILES_COMMON) ) OCamlLibrary( cache_client, $(FILES_CLIENT) ) OCamlLibrary( cache_server, $(FILES_SERVER) ) section OCAML_LIBS = cache_common cache_server OCamlProgram( cached, cached ) %_aux.ml %_aux.mli: %.x ocamlrpcgen -aux -int unboxed -hyper int64 -D OCAMLRPCGEN $< %_clnt.ml %_clnt.mli: %.x ocamlrpcgen -clnt -int unboxed -hyper int64 -D OCAMLRPCGEN $< %_srv.ml %_srv.mli: %.x ocamlrpcgen -srv2 -int unboxed -hyper int64 -D OCAMLRPCGEN $< LocalOCamlGeneratedFiles(cache_clnt.mli cache_srv.mli cache_aux.mli) .DEFAULT: cache_common.cma cache_client.cma cache_server.cma META if $(NATIVE_ENABLED) .DEFAULT: cache_common.cmxa cache_client.cmxa cache_server.cmxa export META: META.in sed -e 's:@VERSION@:$(VERSION):' META.in >META .PHONY: install install: ocamlfind install cache \ META *.mli *.cmi *.cma cache.x \ -optional *.cmxa *.a .PHONY: uninstall uninstall: ocamlfind remove cache .PHONY: doc doc: rm -rf doc/html mkdir -p doc/html cp doc/style.css doc/html/ ocamlfind ocamldoc \ -package rpc,netplex \ -stars -t "Cache Reference Manual" -intro doc/index.txt \ -d doc/html -html -css-style style.css \ $(addsuffix .mli, $(FILES_DOC)) \ doc/sample_server.txt RFILES = cache_client.ml cache_client.mli \ cache_plex.ml cache_plex.mli \ cache_server.ml cache_server.mli \ cache_util.ml cache_util.mli \ cached.ml cached.conf \ cache.x LICENSE Makefile META.in OMakefile OMakeroot README \ configure _oasis setup.ml ChangeLog .PHONY: release release: if $(not $(test -d doc/html)) echo 'No documentation!'; exit 1 oasis setup rm -rf release/cache-$(VERSION) mkdir -p release/cache-$(VERSION) mkdir -p release/cache-$(VERSION)/doc mkdir -p release/cache-$(VERSION)/doc/html cp $(RFILES) release/cache-$(VERSION) cp doc/html/* release/cache-$(VERSION)/doc/html/ cd release && tar czf cache-$(VERSION).tar.gz cache-$(VERSION) _oasis: _oasis.in sed -e 's/@VERSION@/$(VERSION)/' _oasis.in >_oasis .PHONY: postconf postconf: echo 'pkg_version="$(VERSION)"' >>setup.data .PHONY: clean clean: rm -f *.opt *.run *.o *.a *.cm* *~ *.annot rm -f *_aux.ml *_aux.mli rm -f *_clnt.ml *_clnt.mli rm -f *_srv.ml *_srv.mli rm -f *.omc rm -f cached