[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ocaml-sha



Hi,
When I get the upstream's sources "as is" the Makefile doesn't work.
Which is fixed with the patch in join piece.

Then the original (patched) makefile produces:
 - sha1.{cma,cmxa}
 - sha256.{cma,cmxa}
 - sha512.{cma,cmxa}
 - and additional command line progs
 (the sha.cmx seems to be usefull to build the progs, so maybe it
  should be packaged with this build ? (im not fluent with functors yet))

I don't own 100% reading the debian package svn/git yet, but as long as I 
understand in debian the original makefile is not used at all, and replaced 
by a very simple one that uses OCamlMakefile.  Which seems to result that in 
Debian this lib is compiled as a single sha.cma / sha.cmxa file 
(with sha{1,256,512}.cmi per modules).
(and the cmd-line progs are not compiled but probably the users won't care 
this)

First do I have understood rigth what the debian package does ?
(if not sorry for the noise)

If yes, what would you recommand me to do for mandriva ? 
- replicate the debian build for unification (or because it's a better build),
  or use the patched upstream makefile to respect the upstream build ?

Or should I don't care at all for these kinds of issues, because these are 
non-issues and chose any of these 2 options ?

-- 
Thanks
--- ocaml_sha-1.4-orig/Makefile	2006-12-02 01:37:54.000000000 +0100
+++ ocaml_sha-1.4-fix/Makefile	2009-01-29 15:34:34.000000000 +0100
@@ -1,5 +1,7 @@
 CC = gcc
-CFLAGS = -Wall -O3 -funroll-loops
+OCAML_PATH = $(shell ocamlc -where)
+OCAML_INCS = -I "$(OCAML_PATH)"
+CFLAGS = -Wall -O3 -funroll-loops $(OCAML_INCS)
 OCAMLC = ocamlc
 OCAMLOPT = ocamlopt
 
@@ -14,7 +16,7 @@
 
 bins: $(PROGRAMS)
 
-sha1sum: sha1.cmxa sha256.cmxa sha512.cmxa shasum.cmx
+sha1sum: sha.cmx sha1.cmxa sha256.cmxa sha512.cmxa shasum.cmx
 	$(OCAMLOPT) $(OCAMLOPTFLAGS) -o $@ $+
 
 sha256sum: sha1sum

Reply to: