On Thu, Oct 12, 2006 at 11:12:01PM +0000, Sylvain Le Gall wrote: > I think we should begin by the list you give, and add people who ask > for it... Ok. > >> - is it possible to make the ocamlinit target a little more > >> general. For some of my package, i need to do some more > >> substitutions (like in unison), > > > > Hard to say if you don't explain as which additional kind of > > substitution you need :-) > > So it should be nice, to be able to have some kind of : > IN_SUBST += s/@VERSION@/$(VERSION)/g; > IN_SUBST += s/@PRIORITY@/$(PRIORITY)/g; > > sed -e $(IN_SUBST) ... I object this. It has nothing at all to do with OCaml, if you want such a feature you should better try to convince cdbs maintainer to implement it there (which I think you will have hard time to, given their unwillingness to improve the control.in stuff). I see no reason why it should belong to ocaml.mk > >> - is it possible to add OCAML_STDLIB_DIR to ocamlinit, > Well i will return you the question. Since OCAML_STDLIB_DIR could be > deduce from OCAML_ABI, why do you define the variable OCAML_STDLIB_DIR ? > ;-) > > Speaking on a more serious matter, i think OCAML_STBLIB_DIR is at least > the more commonly used variable and could be a very useful substitution. Good point. So I implemented it: @OCamlStdlibDir@ is subtituted in .in files by $(OCAML_STDLIB_DIR). Unfortunately I can't commit right now (svn.debian.org seems to have problem here and I can't login via ssh), thus I attach the patch against the latest svn to this mail. Please test it. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/ If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. -!-
Index: debian/cdbs/ocaml.mk =================================================================== --- debian/cdbs/ocaml.mk (revision 3235) +++ debian/cdbs/ocaml.mk (working copy) @@ -46,7 +46,10 @@ ocamlinit: ocamlinit-stamp ocamlinit-stamp: for f in $(OCAML_IN_FILES) ; do \ - sed -e 's/@OCamlABI@/$(OCAML_ABI)/g' $$f.in > $$f ; \ + sed \ + -e 's/@OCamlABI@/$(OCAML_ABI)/g' \ + -e 's/@OCamlStdlibDir@/$(OCAML_STDLIB_DIR)/g' \ + $$f.in > $$f ; \ done touch $@ clean:: Index: debian/cdbs/ocaml-vars.mk =================================================================== --- debian/cdbs/ocaml-vars.mk (revision 3235) +++ debian/cdbs/ocaml-vars.mk (working copy) @@ -26,11 +26,13 @@ _cdbs_class_ocaml = 1 # current OCaml ABI version (ATM 3.09.2). -# Used internally by ocaml.mk, may be useful to debian/rules writers as well +# Used internally by ocaml.mk (substituted for @OCamlABI@ in $(OCAML_IN_FILES) +# below), may be useful to debian/rules writers as well OCAML_ABI := $(shell /usr/bin/ocamlc -version) # OCaml standard library location. -# For debian/rules writers. +# Used internally by ocaml.mk (substituted for @OCamlStdlibDir@ in +# $(OCAML_IN_FILES) below), may be useful to debian/rules writers as well OCAML_STDLIB_DIR := $(shell /usr/bin/ocamlc -where) # list of .in files contained (non-recursively) in debian/ that requires
Attachment:
signature.asc
Description: Digital signature