help-make
[Top][All Lists]
Advanced

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

Re: switching current working directory inside a makefile


From: Greg Chicares
Subject: Re: switching current working directory inside a makefile
Date: Thu, 29 May 2008 17:06:33 +0000
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

On 2008-05-29 16:50Z, mangetsu wrote:
> 
> subst K: D:\wibble\wobble
> cd /D K:
> Z:\tools\program.exe
> 
> 'cd /D K:' executes without errors, but the next line,
> 'z:\tools\program.exe' is still called from the directory where the makefile
> is located.

Each command in a makefile is executed in its own shell.
To execute three subcommands in the same shell, write
them all as a single command. For instance, if your shell
uses ';' as a subcommand separator, you might write

        subst K: D:\wibble\wobble; \
        cd /D K:; \
        Z:\tools\program.exe




reply via email to

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