[Linux-ha-dev] replicated compile-time "define"
beekhof at gmail.com
Tue Apr 25 08:03:47 MDT 2006
On 4/25/06, David Lee <t.d.lee at durham.ac.uk> wrote:
> Last week, whilst following up a portability bug about pathnames, my
> attention was drawn to "heartbeat/Makefile.am" and its:
> AM_CFLAGS = "... -DVAR_RUN_D='"$(havarrundir)"' ..."
> (about four similar "-D..." items in there).
> Variants of this are replicated across several other "Makefile.am". Such
> replication feels awkward, and has the potential to become inconsistent.
> (Indeed, as part of an experiment here, I made such an inconsistency, and
> the runtime results (naturally enough, a failure condition) left no useful
> diagnostic indication in the logs. Not nice.)
> This "-D..." stuff all seems to be ancient history, dating back to the
> autoconfiscation of the project.
> Given that almost all of these "-D..." items are now in maintained by
> configure in the generated "config.h" file, it would seem prudent and wise
> to remove these extra (and potentially inconsistent) definitions from the
> relevant "Makefile.am" files.
> As a pleasant side-effect, the size of the derived "heartbeat/Makefile.am"
> dropped by almost 50%, from 56K to 29K. Nice!
> So I propose tidying these up, trying to eliminate the "-D..." items from
> these various "Makefile.am", and also, if reasonably possible, trying to
> remove the "AM_CFLAGS=..." altogether.
> It seems to be entirely positive. Can anyone see any reason not to do
sounds like a good idea to me
More information about the Linux-HA-Dev