Commit e271b3bd authored by gerd's avatar gerd

Initial revision


git-svn-id: https://godirepo.camlcity.org/svn/lib-xstr/[email protected] e4cd5726-45db-0310-8eb3-84e3bb775810
parent f09a2adb
version = "0.1"
requires = ""
archive(byte) = "xstr.cma"
archive(native) = "xstr.cmxa"
# make all: make bytecode archive
# make opt: make native archive
# make install: install bytecode archive, and if present, native archive
# make uninstall: uninstall package
# make clean: remove intermediate files
# make distclean: remove any superflous files
# make release: cleanup, create archive, tag CVS module
# (for developers)
#----------------------------------------------------------------------
# specific rules for this package:
OBJECTS = xstr_split.cmo xstr_search.cmo xstr_match.cmo
XOBJECTS = xstr_split.cmx xstr_search.cmx xstr_match.cmx
ARCHIVE = xstr.cma
XARCHIVE = xstr.cmxa
NAME = xstr
REQUIRES =
all: $(ARCHIVE)
opt: $(XARCHIVE)
$(ARCHIVE): $(OBJECTS)
$(OCAMLC) -a -o $(ARCHIVE) $(OBJECTS)
$(XARCHIVE): $(XOBJECTS)
$(OCAMLOPT) -a -o $(XARCHIVE) $(XOBJECTS)
#----------------------------------------------------------------------
# general rules:
OPTIONS =
OCAMLC = ocamlc $(OPTIONS) $(ROPTIONS)
OCAMLOPT = ocamlopt $(OPTIONS) $(ROPTIONS)
OCAMLDEP = ocamldep $(OPTIONS)
OCAMLFIND = ocamlfind
depend: *.ml *.mli
$(OCAMLDEP) *.ml *.mli >depend
depend.pkg: Makefile
$(OCAMLFIND) use -p ROPTIONS= $(REQUIRES) >depend.pkg
.PHONY: install
install: all
{ test ! -f $(XARCHIVE) || extra="*.cmxa *.a"; }; \
$(OCAMLFIND) install $(NAME) *.mli *.cmi *.cma META $$extra
.PHONY: uninstall
uninstall:
$(OCAMLFIND) remove $(NAME)
.PHONY: clean
clean:
rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa
.PHONY: distclean
distclean: clean
rm -f *~ depend depend.pkg
RELEASE: META
awk '/version/ { print substr($$3,2,length($$3)-2) }' META >RELEASE
.PHONY: dist
dist: RELEASE
r=`head -1 RELEASE`; cd ..; gtar czf $(NAME)-$$r.tar.gz --exclude='*/CVS*' --exclude="*/depend.pkg" --exclude="*/depend" $(NAME)
.PHONY: tag-release
tag-release: RELEASE
r=`head -1 RELEASE | sed -e s/\\\./-/g`; cd ..; cvs tag -F $(NAME)-$$r $(NAME)
.PHONY: release
release: distclean
$(MAKE) tag-release
$(MAKE) dist
.ml.cmx:
$(OCAMLOPT) -c $<
.ml.cmo:
$(OCAMLC) -c $<
.mli.cmi:
$(OCAMLC) -c $<
.SUFFIXES: .cmo .cmi .cmx .ml .mli
include depend
include depend.pkg
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