In a pure scons-style system, the defines are passed on the command line or in 
the environment, no?
Both have problems scaling to a large number of defines.

From: Gregg Reynolds [mailto:[email protected]]
Sent: Wednesday, July 6, 2016 4:17 PM
To: Dave Thaler <dthaler at microsoft.com>
Cc: iotivity-dev at lists.iotivity.org
Subject: Re: [dev] New Project and maintainer in IoTivity



On Wed, Jul 6, 2016 at 5:55 PM, Dave Thaler via iotivity-dev <iotivity-dev at 
lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>> wrote:

1)      No platform-specific defines appear on the command line, but only 
appear inside config.h

2)      #include ?config.h? always occurs before any #ifdef?s in code.

3)      Platform_features.h gets replaced by config.h stuff

4)      A few platforms (as close to 0 as possible) have their own config.h 
variants when the toolchain cannot generate config.h? the master config.h might 
have something like (pseudocode)

If OS is (say) tizen

                Include config_tizen.h

Else

                Rest of normal config.h stuff

5)      Platform-specific ifdefs should ideally not appear in any generic code, 
but be confined to code inside a PAL layer.
We did some of that in the windows-port branch for example, where we created 
Windows versions of pthreads, usleep, etc.
so as to remove ifdefs throughout normal code

My 2 cents: if you're using scons, then config.h is utterly pointless.  The 
*only* reason config.h exists in configure/make systems is to transfer info 
from the configure phase to the make phase.  There is no justification for it 
in a scons system.

-Gregg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160706/7c3a979f/attachment.html>

Reply via email to