caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* print the version number
@ 2007-11-02  2:32 Angela Zhu
  2007-11-02 13:22 ` [Caml-list] " Gordon Henriksen
  2007-11-02 16:10 ` Basile STARYNKEVITCH
  0 siblings, 2 replies; 3+ messages in thread
From: Angela Zhu @ 2007-11-02  2:32 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

Hi,

I found the following code in some OCaml file:

    fprintf ppf "        Objective Caml version %s@.@." Config.version;

But I didn't find any file "Config.*" in the directory.
If I am using SVN to generate version number,
and I have SVN keyword "$Version$" set somewhere.
How can I get the the string and use it in a printf function?

-- 
Thanks,
Angela Zhu
------------------------------------------
Dept. of CS, Rice University
http://www.cs.rice.edu/~yz2/
------------------------------------------

[-- Attachment #2: Type: text/html, Size: 689 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] print the version number
  2007-11-02  2:32 print the version number Angela Zhu
@ 2007-11-02 13:22 ` Gordon Henriksen
  2007-11-02 16:10 ` Basile STARYNKEVITCH
  1 sibling, 0 replies; 3+ messages in thread
From: Gordon Henriksen @ 2007-11-02 13:22 UTC (permalink / raw)
  To: caml-list

On Nov 1, 2007, at 22:32, Angela Zhu wrote:

> I found the following code in some OCaml file:
>
>     fprintf ppf "        Objective Caml version %s@.@."  
> Config.version;
>
> But I didn't find any file "Config.*" in the directory.
> If I am using SVN to generate version number, and I have SVN keyword  
> "$Version$" set somewhere.
> How can I get the the string and use it in a printf function?


See lines 320-345 of the Makefile (the rule is utils/config.ml: utils/ 
config.mlp).

— Gordon


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] print the version number
  2007-11-02  2:32 print the version number Angela Zhu
  2007-11-02 13:22 ` [Caml-list] " Gordon Henriksen
@ 2007-11-02 16:10 ` Basile STARYNKEVITCH
  1 sibling, 0 replies; 3+ messages in thread
From: Basile STARYNKEVITCH @ 2007-11-02 16:10 UTC (permalink / raw)
  To: Angela Zhu; +Cc: caml-list

Angela Zhu wrote:
> 
> I found the following code in some OCaml file:
> 
>     fprintf ppf "        Objective Caml version %s@.@." Config.version;

Perhaps from the interactive toplevel?
> 
> But I didn't find any file "Config.*" in the directory.
> If I am using SVN to generate version number,
> and I have SVN keyword "$Version$" set somewhere.
> How can I get the the string and use it in a printf function?

Maybe thru Sys.ocaml_version
But I am not sure to understand what version string do you want? The 
Ocaml version string, or a version string identifying your software?


-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-02 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-02  2:32 print the version number Angela Zhu
2007-11-02 13:22 ` [Caml-list] " Gordon Henriksen
2007-11-02 16:10 ` Basile STARYNKEVITCH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).