home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / utils / bug / 2073 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.4 KB  |  42 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!digibd.COM!rick
  3. From: rick@digibd.COM (Rick Richardson)
  4. Subject: gmake incompatiblity with AT&T/USL make
  5. Message-ID: <1992Nov18.063201.508@digibd.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: DigiBoard Incorporated, Eden Prairie, MN
  8. Distribution: gnu
  9. Date: Wed, 18 Nov 1992 06:32:01 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 29
  12.  
  13. The following makefile fragment doesn't work the same in gmake 3.62
  14. compared with AT&T/USL make on SVR2 (including derivatives HP/UX and
  15. AIX), SVR3.X, and SVR4.X.
  16.  
  17. XXX=
  18. VAR=foo
  19. $(XXX)VAR=bar
  20.  
  21. In traditional "make", VAR gets the value "bar".  But in gmake,
  22. VAR gets the value "foo", and a variable called "$(XXX)VAR"
  23. is created with the value "bar".  Apparently, macros aren't
  24. being expanded on the left side of the equals.
  25.  
  26. This rather bizarre syntax is used in leiu of conditions in
  27. traditional make.  XXX is set to null (as shown above), or
  28. to XXX=# (usually, from an included file), which has the effect
  29. of commenting out the second assignment to VAR.
  30.  
  31. Although gmake has conditionals, it would be nice if the old way
  32. still worked.
  33.  
  34. -Rick
  35.  
  36. -- 
  37. Rick Richardson        Email: rick@digibd.com    This space intentionally
  38. Senior Staff Engineer    Fax:   (612) 943-0803    blank until 1996 elections.
  39. DigiBoard, Inc.        Tel:   (612) 943-5383
  40. Eden Prairie, MN    Radio: N0NMY
  41.  
  42.