Mail Archives: geda-user/2015/07/14/07:54:25
On Tue, 14 Jul 2015, Peter Stuge (peter AT stuge DOT se) [via geda-user AT delorie DOT com] wrote:
> gedau AT igor2 DOT repo DOT hu wrote:
>> In your specific case, a similar trick could work. A C fewliners around
>> strftime() would be small, simple and reliable. Strftime is C89 for most
>> features (don't use timezones and you'll be fine). The C code could compile
>> with $(CC) directly into an executable in one step, without any extra
>> configuration.
>
> Windows is very different, in many ways.
>
> Also, cross-compilation support is a lot of fun to implement in a
> configuration system. Fairly mature and popular alternatives such as
> cmake still do not come close to autotools+pkg-config.
My scconfig handles cross-compilation well. The trick is to separate the
host env from the target env and make it just one of the cases when they
happen to be the same.
If you need "date -d" during compilation to include the build date in the
"about" dialog, or something similar, it's just a host thing. The strftime
suggestion works as long as you use the host C compiler (and not the
target C compiler which would be a cross-compiler in cross-compilation). I
am sure autotools supports this host/target approach (but the terminology
may differ).
Regards,
Igor2
- Raw text -