downgrading make version

Dave Korn
Thu Sep 21 09:04:00 GMT 2006

On 21 September 2006 06:05, Christopher Layne wrote:

> On Thu, Sep 21, 2006 at 12:57:58AM -0400, Christopher Faylor wrote:
>>> (CP) = \cp
>>> install: $(PROGS)
>>> \cp nda.exe mtk.exe sda.exe /home/mast/CYGMOD/bin
>>> make: \cp: Command not found
>> The above is not valid makefile syntax but if I make obvious
>> corrections, I get the same thing on Linux.  I don't know what you were
>> expecting \cp to be translated to, but it shouldn't, IMO, be interpreted
>> as a MS-DOS path.
> Within a shell, one may also use \command to override an alias. Either way,
> Makefile isn't a shell so it's bogus there.

  Actually, make invokes a shell if it detects any metacharacters on the
commandline.    We need to take a look at that sh_chars_sh or whatever it's
called variable and verify whether or not it includes backslash and why.

  FWIW, you can work-around it by appending "| cat" to the end of the command
line.  That forces make to invoke bash:

dk@rainbow /tmp> cat mf
CP = \cp

install: $(PROGS)
        $(CP) $(PROGS) $(INSTBINDIR)

dk@rainbow /tmp> diff -u mf mf2
--- mf  2006-09-21 10:00:14.498410000 +0100
+++ mf2 2006-09-21 10:02:17.826535000 +0100
@@ -3,5 +3,5 @@
 CP = \cp

 install: $(PROGS)
-       $(CP) $(PROGS) $(INSTBINDIR)
+       $(CP) $(PROGS) $(INSTBINDIR) | cat

dk@rainbow /tmp> make -f mf
\cp foo ./bin
make: \cp: Command not found
mf:6: *** [install] Error 127

#0  install at /tmp/mf:6
Command-line arguments:
        "-f mf"
dk@rainbow /tmp> make -f mf2
\cp foo ./bin | cat
dk@rainbow /tmp>

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list