Re: [AD] Mingw Makefile problem under 2k

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


On Wed, Mar 28, 2001 at 05:45:10AM +0200, Henrik Stokseth wrote:
> On Wednesday 28 March 2001 15:17, Peter Wang wrote:
> 
> > (I'm guessing)  I forget if mingw32 make reverts to the original
> > directory after each line.
> 
> all ports of gnu make that i know does that.

Except the djgpp port (at least, it didn't several years ago).
There was a bit of controversy about this back then; I think the
reason for it was that DOS has a current directory per drive,
rather than per program -- so if you run a program that changes
directory, you shell's directory changes too.  In Unix this is
not the case, which is why makefiles (are meant to) work how
they do, forgetting directory changes between lines.

I'm not sure how this applies to Windows though, because it
obviously has the concept of each program having its own current
directory (for multitasking).  I think within a shell though it
will revert to the DOS way.

In any case, I'm very much against using this weird feature --
it's safest to write your code so that commands which require a
changed directory are on the same line as the directory change.
I guess for maximum compatibility you should also restore the
old directory at the end of the line, but this is ugly, make
should do that for you. :(


On Wed, Mar 28, 2001 at 05:50:55PM -0500, Bob wrote:
> Yes, I have sh.exe in my DJGPP directory. And (just recently) added it
> to the Mingw directory (the Mingw port of course). Since then,
> compilation works.
> It's kinda of weird that the same GNU tools wouldn't work together...

It could be related to long command lines -- djgpp uses special
workarounds to pass long command lines, while Mingw32 doesn't
need any (Windows supports longer command lines automatically).
So all calls backwards and forwards between djgpp and Mingw32
will have their command lines truncated to ~127 characters.

George



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