Re: [AD] Building Allegro for MSVC using the latest Cygwin is broken

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


Wait, shouldn't we rethink this? The runner could know what compiler to use
(specifically, if it needs to use Watcom or MSVC) just by looking at what
compiler name it was past.

Do you mean by checking to see if "link" is the first thing that has
been passed on the passed-in command-line? If so, then the MSVC path
would be pre-pended.


Even if that were not so, it could know it
because Allegro was configured (well, fix.bated) for a specific compiler.
So there shouldn't be any confusion as far as I can see.

Do variables defined in makefiles (such as "PLATFORM") get passed to the
environment that runner.exe is running in? If not, and we chose not to
let runner.exe check the start of the command-line for 'link', then
PLATFORM would have to be passed in on the command-line to runner.exe
and that would involve modifying the makefiles in all the places where
runner.exe is used.

Another solution would involve passing "-DUSE_MSVC" when compiling
runner.c if PLATFORM is MSVC. Then, if USE_MSVC is #defined, runner.c
can safely assume it is going to work with MSVC. Now that I think about
it, the MSVCDir environment variable could be passed with -D when
compiling runner.c

I've just searched my Allegro directory for occurences of $(RUNNER) and
found that the runner built from runner.c is only used in the MSVC and
WATCOM builds. I've also found that none of Watcom's EXEs have names
that clash with MSVC's EXEs, so it should be safe to pre-pend the
MSVCDir if the command-line starts with 'link'.

Also, the mingw32 build uses a separate runner program, but that is
compiled from a different C file (runnergw.c), but ends up being called
runner.exe. This is only built if CROSSCOMPILE has been set, but I'm
wondering if mingw's runner should be called runnergw.exe to avoid any
clashes if multiple versions of Allegro are being built.



AE.





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