automake
[Top][All Lists]
Advanced

[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' test3.abc
  echo '#!/bin/bash'                                  > test3.abc
  + echo '#!/bin/bash'
  echo "echo test3.abc $# ' [' $@ ']'>> test3.log" >> test3.abc
  + echo 'echo test3.abc 0 '\'' ['\''  '\'']'\''>> test3.log'
  echo "echo I am a test script        >> test3.log" >> test3.abc
  + 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 test.abc: 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 Makefile.am. I know this. I just wish there was another way.




reply via email to

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