[Top][All Lists]

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

RE: How can I pass $@ to Makefile?

From: Arthur Schwarz
Subject: RE: How can I pass $@ to Makefile?
Date: Thu, 28 May 2015 13:41:27 -0700

So let's try this with your make rule.  The lines starting with a
"+" character are the actual commands being executed by the shell:

  % make SHELL='sh -x'
  echo '#!/bin/bash'                                  >
  + echo '#!/bin/bash'
  echo "echo $# ' [' $@ ']'>> test3.log" >>
  + echo 'echo 0 '\'' ['\''  '\'']'\''>> test3.log'
  echo "echo I am a test script        >> test3.log" >>
  + echo 'echo I am a test script        >> test3.log'

(to get snarky) I saw the problem before. The issue is that the $#/$@
expands inside make (when is executed and not in the shell script.
I can do this if I put the script into the appropriate directory and take
creation out of I know this. I just wish there was another way.

reply via email to

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