home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / shell / 5452 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.6 KB

  1. Path: sparky!uunet!mcsun!Germany.EU.net!pki-nbg!pki-nbg.philips.de!ln_smr
  2. From: ln_smr@pki-nbg.philips.de (Stephen Riehm)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: Problem with sh-commands from a Makefile
  5. Message-ID: <ln_smr.727608449@pki-nbg.philips.de>
  6. Date: 21 Jan 93 09:27:29 GMT
  7. References: <1993Jan20.211940.18612@odin.diku.dk>
  8. Sender: news@pki-nbg.philips.de
  9. Reply-To: ln_smr@pki-nbg.philips.de
  10. Lines: 34
  11.  
  12. turin@diku.dk (S|ren Turin) writes:
  13.  
  14. >Hi netters.
  15.  
  16. >all    :
  17. >    (for dir in $(DIRS) ; do cd ${dir} ; make VARS=$(VARS) ; done)
  18.  
  19. >sh), i assume that i am missing something obvious. But what? Having
  20. >read man-pages for both `sh' and `make', the solution still eludes me.
  21.  
  22. almost obvious...
  23.  
  24. >I'd appreciate e-mail replys (to turin@freja.diku.dk) but will of
  25. >course read comp.unix.shell to see if anything comes up.
  26.  
  27. good, this is a common problem so I'm posting, at least you read the
  28. man pages (or at least you SAY you read the manpages.)
  29.  
  30. To access shell variables like $dir, you need to use $$dir from within
  31. Makefiles. This is because Make expands $ first, and $$ expands to $
  32. for the shell, so the shell would then see $dir (or ${dir} as you have
  33. it)
  34.  
  35. catchya
  36.  
  37. --------------------------------------------------------------------
  38. Stephen Riehm           Configuration Management          _-_|\ 
  39. ln_smr@pki-nbg.philips.de  Philips Kommunikations Industrie  /     \
  40. Work: +49 911 526 2975       Nu"rnberg, Germany             \_.-.!/
  41. Fax:  +49 911 526 3678       "I was there, now I am here!"          v 
  42. "My company speaks another language, I CAN'T speak on its behalf"
  43. PS: You may think I am joking, I can't speak the language that well so
  44.         PLEASE DON'T REPLY IN GERMAN!
  45.              - thanks -
  46.