Post by Andy SinclairPost by RaviIn the makefile, I want to have an action to change the directory. For
cd..
But when I run "nmake changedir" it prints out "cd.." to the Dos
Window, but it doesn't switch to the parent directory
-- it just remains in the same subdirectory.
Is it possible to do this?
The current directory is changing, but only in the makefile process.
cd
cd ..
cd
The directory changes while the makefile is running, but the current
directory of the calling process is unaffected.
What are you trying to achieve?
Andy
I need to cd into the directory that contains the obj files and run a
command.
Notice that nmake is placing the "dir" command on the same line as the
"cd" command.
It looks like it is a problem with long file name directory. It works
OK with a short name directory.
Example 1:
test:
cd .\Example_DHC_Application_3.0_Data\Debug\ObjectCode\
dir
C:\>nmake test
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
cd .\Example_DHC_Application_3.0_Data\Debug\ObjectCode dir
The system cannot find the path specified.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
'0x1'
Stop.
Example 2:
test:
cd .\test
dir
C:\>nmake test
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
cd test
dir
Volume in drive C has no label.
Volume Serial Number is 5402-4822
Directory of C:\FIRMWARE\test
01/23/2008 04:02 PM <DIR> .
01/23/2008 04:02 PM <DIR> ..