Mail Archives: djgpp/2001/02/21/11:02:11
It's a mistake to take this discussion off the news group. Posting to
the group lets much more pairs of eyes see the problem, and more brains
think about it. You might have your solution sooner if you keep the
discussion here.
On Wed, 21 Feb 2001, Eddy Ilg wrote:
> ComSpec=C:\WIN2000\system32\cmd.exe
Does W2K come with command.com as well? If so, try this:
set MAKESHELL=c:/win2000/system32/command.com
and then run Make again.
> Path=C:\WIN2000\system32;C:\WIN2000;C:\WIN2000\System32\Wbem;D:\PROGRA~1\ULT
> RAE~1;d:\djgpp\bin;d:\tm\bin;d:\devbin\tm;d:\devbin\tm\bin;d:\devbin;d:\devbin\B
> D32;d:\devbin\MRI\mcc68k;d:\devbin\MRI\asm68k;D:\Programme2k\Microsoft Visual
> Studio\Common\Tools\WinNT;D:\Programme2k\Microsoft Visual Studio\Common\MSDev98\Bin;D:
> \Programme2k\Microsoft Visual Studio\Common\Tools;D:\Programme2k\Microsoft
> Visual
> Studio\VC98\bin;d:\devstudio\sharedide\bin\ide;d:\devstudio\sharedide\bin;d:
> \d
> evstudio\vc\bin;d.\devstudio\sharedide\bin\ide;d.\devstudio\sharedide\bin;d.
> \dev
> studio\vc\bin;C:/DJGPP/bin;
I don't like this PATH: it's too long and the DJGPP bin subdirectory is
too far from its start (it's also present twice, for no good reason).
Are you sure you are running the DJGPP port of Make? Can it be that
there's some other make.exe somewhere along your PATH?
Can you make PATH shorter and move d:\djgpp\bin to its beginning?
> I recognized that SHELL is not set at all. COMSPEC is set to
> C:\WIN2000\system32\cmd.exe and I think that is filne.
> To change that I did:
You don't have to set SHELL, Make will default to COMSPEC.
> main.obj: src\main.c
> cd src; gcc -c main.c -o main.obj
The first line is wrong: you should be using a forward slash, not a
backslash, like this:
main.obj: src/main.c
or two backslashes in a row, like this:
main.obj: src\\main.c
> I also tried leaving out the cd:
> ----------------------------------------------------------------------
> E:\test>make -d main2.obj
> gcc -c main.c -o main2.obj
>
> E:\test>
> ----------------------------------------------------------------------
> Now that works. What really seems to make problems is the cd command.
What happens if you replace "cd src" with some other command, but still
leave two commands with a semi-colon on that line?
What happens if you leave only "cd src" and remove the gcc invocation?
If your theory about cd is right, the first of these two tests will work,
while the second will fail.
> I also
> tried putting one in the main2.obj dependency (the one that worked) and as
> soon as I do that it fails as well.
Sorry, I don't understand: what did you try to put and where did you put
it?
> Another funny thing is that -d option does not do anything. And I cannot
> understand why make says "** error -1 ** DELETING main.obj".
This is normal with GNU Make: if it fails to rebuild a target, it removes
it, to avoid leaving a possibly corrupted file around (a failed command
might have produced a bad main.obj).
> Is there maybe a programmer that you or I can ask what this means?
All the programmers who know what this means are on this forum, so you
get as much attention as you can ;-)
- Raw text -