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

Re: ocaml 3.09.2 + cdbs target release for etch



On 25-10-2006, Stefano Zacchiroli <zack@debian.org> wrote:
> On Wed, Oct 25, 2006 at 06:45:15AM +0000, Sylvain Le Gall wrote:
>> I begin to use "copy of ocaml.mk" in some of my package. I have made one
>> correction to this copy, in ocamlinit/clean. It concerns mainly a 
>
> Ok, but please switch to using ocaml.mk as soon as we have the cdbs
> classes in the archive, otherwise they are pointless to have :)
>
>> (subst /,\/,$(OCamlStdLibDir)). You can find this correction in the
>> camomile/debian/rules in the svn repository.
>
> I don't get it, you seem to be replacing "slashes" with "escaped
> slashes", why? Isn't it dependent on the context where you're using the
> @OCamlStdlibDir@ stem and should be better moved to the specific usage
> of the stem?
>
> Cheers.
>

In the expression
s/@OCamlStdlibDir@/$(OCAML_STDLIB_DIR)/g

if you don't remove slashes, you get (after replacing OCAML_STDLIB_DIR),
s/@OCamlStdlibDir@//usr/lib/ocaml/3.09.2//g 
which is not a good replacement. Using my subst, you get
s/@OCamlStdlibDir@/\/usr\/lib\/ocaml\/3.09.2\//g
which is better... and the \/ will become / in the target file.

I don't think there is anything context dependent regarding this...

FYI, you could also use s,@OCamlStdlibDir@,$(OCAML_STDLIB_DIR),g i
think (but if the name contains a ","  you will have the same problem).

But in fact, the 100% portable way to do that is to copy the AC_OUTPUT
macro of autoconf, but i am a bit lazy for now.

Regards,
Sylvain Le Gall



Reply to: