This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: downgrading make version


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) $(PROGS) $(INSTBINDIR)
>>> 
>>> \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
PROGS=foo
INSTBINDIR=./bin
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>


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]