caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Build number and date in OCaml?
@ 2013-04-09 11:38 Étienne André
  2013-04-09 12:18 ` Jeremie Dimino
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Étienne André @ 2013-04-09 11:38 UTC (permalink / raw)
  To: caml-list

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

Hi,

I've been using OCaml for a couple of years, but without using any advanced
feature; so my question may be a little naive.
Is there any way to insert easily the current date and time of compiling,
as well as, e.g., an incremental build number in an OCaml program?
So that it is printed at runtime, e.g., in the program header.

I quite stupidly used the Unix.gettimeofday() function before realizing
that it is of course executed at runtime.

Of course, I could do it using an external script that would modify the
OCaml source code before compiling, but is there any native OCaml feature
for achieving this in a cleaner manner?

Thank you,
--
Étienne André
Université Paris 13, Sorbonne Paris Cité
http://www-lipn.univ-paris13.fr/~andre

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

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

end of thread, other threads:[~2013-04-12 14:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-09 11:38 [Caml-list] Build number and date in OCaml? Étienne André
2013-04-09 12:18 ` Jeremie Dimino
2013-04-10  8:49 ` Julien Signoles
2013-04-10  9:08   ` David Allsopp
2013-04-11 13:00 ` Alain Frisch
2013-04-12 14:38   ` Daniel Weil

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).