Re: [AD] Differentiating between platforms

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


"Charles Wardlaw" <kattford@xxxxxxxxxx> writes:

> I like the idea, especially since it would probably fix the problems that
> arise when trying to compile the Watcom version.  However, why put it in the
> obj directory since that gets cleaned?  You could easily have the fixXXX.bat
> files generate the simple header for each compiler when they're run and
> place the header in the include directory.  Just have the pregen'd #included
> at the top of the highest header, before anything else is said.
> 
> Comments?

In this case (one header for all platforms), make will rebuild the
whole library if you switch between platforms (between DJGPP/Windows
for example), because almost all source files will depend on this
header, and it will get new timestamp each time you switch between
platforms.

Generating this header in somewhere/platform directory is IMHO
acceptable, because when cleaning, make will remove object files
anyway, so rebuilding will be necessary, regardless of header
timestamp.

But these headers will hardly ever change, they will not contain
information about user's system, or anything that should be obtained
at the time of running make, so we can just create them in the
directories which are not cleaned (for example
include/allegro/platform, or similar). 

-- 
Michael Bukin



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/