[Nut-upsdev] [Nut-upsuser] Belkin F6C1100-UNV
Eric S. Raymond
esr at thyrsus.com
Tue May 29 02:17:03 UTC 2007
Arjen de Korte <nut+devel at de-korte.org>:
> > (2) the second option is to let make create/update a *.c file that
> > either exports a function (as in Eric's patch) or a static string.
> > In this case, when you do "svn update", only once source has to be
> > recompiled, but all targets still have to be re-linked. This is
> > faster than (1), but re-linking everything in driver/* still takes a
> > long time.
>
> I'm afraid this is probably the best solution, since I realized the
> dependencies sometimes don't end with what is needed for compilation and
> linking of a binary. For instance, the files for hotplug/udev are not a
> dependency for any driver, yet we still want to see which version they
> are. The same goes for several other files. So after all it may be best to
> just update the SVN revision identification of every binary if something
> is updated, since this is the only way to display the version for some
> files.
You are recapitualating my thinking here.
> I think the best option is to
>
> #define UPS_VERSION (upsversion())
>
> and add the *.c file where we define that function to the list of
> dependencies for all binaries. In contrast to Eric's original patch,
> changing lots of sources is probably not needed (nor desireable) if we use
> a macro.
I considered this. I ended up replacing UPS_VERSION with the function calls
because I'm uncomfortable with the use of an argumentless macro to hide
a function call. This sort of thing has all the opacity of an abstraction
without any of the usual benefits.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
More information about the Nut-upsdev
mailing list