make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie problems?


From: Andy Voelkel
Subject: Newbie problems?
Date: Sat, 8 Nov 2003 08:48:03 -0800

I've been trying to migrate from OPUS make to GNU make, and having
various weirdo problems, which don't seem to occur under OPUS make. I
would much appreciate any comments about any of them. Thanks in advance!

Problem #1:

I've got an implicit rule definition:

%.obj:%.c
        cl500 $(COPT) -fr$(OBJDIR) -i\progs\c54x\ -cg -i$(INCDIR) $<

The -fr flag tells the DSP compiler to put the object files in
$(OBJDIR). When I run this rule from OPUS make, it works fine. When I
run it from gmake, the object files are put in the current directory
instead of $(OBJDIR). The commands that gmake prints out to the console
as it runs look fine. If I capture this output to a file, and then run
that file as batch file outside of gmake, it works fine, and the object
files end up in the right place. I've looked at every debugging output
format I can, and I don't see any indication that anything weird is
going on behind my back. I've tried this using 4NT as a shell, as well
as cmd.exe. The results are the same.

Problem #2:

So in order to work around problem #1, I rewrote the rule:

%.obj:%.c
        cl500 $(COPT) -i\progs\c54x\ -cg -i$(INCDIR) $<
        move $@ $(OBJDIR)

When I try running this, I get the following message from gmake:

move ppm.obj ..\..\obj\ppm
process_begin: CreateProcess((null), move ppm.obj ..\..\obj\ppm, ...)
failed. make (e=2): The system cannot find the file specified.
gmake: *** [ppm.obj] Error 2

The results are the same using both 4NT and cmd.exe. Of course, if I try
saying "move ppm.obj ..\..\obj\ppm" to either type of command 
prompt, rather than using gmake to invoke it, everything works 
perfectly.

Problem #3:

So now I try: 

%.obj:%.c
        cl500 $(COPT) -i\progs\c54x\ -cg -i$(INCDIR) $<
        ren $@ $(OBJDIR)

Now the error message changes:

ren ppm.obj ..\..\obj\ppm
The syntax of the command is incorrect.
gmake: *** [ppm.obj] Error 1

The only difference between this and the previous scenario is that if I
trying saying "ren ppm.obj ..\..\obj\ppm" to 4NT, it works, 
but if I try saying it to cmd.exe, it says:

The syntax of the command is incorrect.

This is probably because "ren" under 4NT is smarter than under cmd.exe.
Perhaps there is a clue here, in that it seems that the subshell that 
is invoked under 4NT in this case may not be a 4NT shell. That's odd,
because COMSPEC is set so that subshells should be 4NT.

I'm running Windows XP.

- Andy Voelkel







reply via email to

[Prev in Thread] Current Thread [Next in Thread]