Marco van de Voort wrote:
On Tue, Jun 05, 2012 at 10:02:52AM +0000, Mark Morgan Lloyd wrote:
When building a shared library (.dll or .so), is it possible to append a
timestamp? i.e. something like backend_$(IsoDate)_$(IsoTime).so for a
result like backend_2012-06-05_09:59:30.so
I did a few quick tests with $libsuffix, but can't seem to use constants or
other dates:
library libtest;
const mydate = '{$i %date%}';
const mydate2 = {$i %date%};
{$libsuffix mydate}
{$libsuffix mydate2}
{$libsuffix {$i %date%}}
begin
end.
Since afaik some preprocessor directive now expand constants (since Delphi
does), it might be worth a bugreport.
OK, but before I do that I wonder if somebody could clarify where
Lazarus should leave a .so when it is successfully built. What appears
to be happening at the moment (1.1 r37496) is that it leaves it in what
the project options refer to as the "Unit output directory" and while it
obeys "Apply conventions" it ignores the "Target file name" setting.
I'm currently using an "Execute after" command to move it to its final
location and append a timestamp, the timestamp is ISO-format so that it
sorts properly which gives the same behavious as ldconfig (i.e. when
there's a choice the most recent library is the one used).
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus