Mail Archives: geda-user/2015/07/14/06:56:26
Hi,
On Tue, 14 Jul 2015, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com] wrote:
>
> Hi, geda users and devs.
>
> Recently, some issues with the FreeBSD port were solved. (This may
> apply to other systems as well.)
>
> The only question suspended is about non-portable 'date -d'
> invocation [1]. As it turns out, compilation works with gnu make
> but breaks with BSD make.
>
> So I believe we have two options:
> - leave it in the current state and recommend users to compile
> geda-gaf using GNU make (I don't like this option)
> - fix the date invocation somehow (I don't know how to
> gracefully do it for all platforms)
>
> Any ideas?
One of my hobby projects is the second generation of a configuration
system (./configure stuff). What I learned from the first generation was
exactly this: you can't trust even the simplest utils will work
consistently across systems. Not even echo.
My solution is to use C89 for the configuration system, and simply do not
target systems that don't comply with C89.
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.
Regards,
Igor2
- Raw text -