home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / misc / 4080 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  1.4 KB

  1. Path: sparky!uunet!mcsun!uknet!fulcrum!igb
  2. From: igb@fulcrum.co.uk (Ian G Batten)
  3. Newsgroups: comp.unix.misc
  4. Subject: Re: Is anyone using m4?
  5. Keywords: m4,macro,preprocessor
  6. Message-ID: <BxHu2G.4L0@fulcrum.co.uk>
  7. Date: 10 Nov 92 09:23:03 GMT
  8. References: <crigler.720808909@eola.cs.ucf.edu>
  9. Sender: news@fulcrum.co.uk
  10. Distribution: comp.*.unix
  11. Organization: Fulcrum Communications
  12. Lines: 32
  13.  
  14. In article <crigler.720808909@eola.cs.ucf.edu> crigler@cs.ucf.edu (James Crigler) writes:
  15. > Okay, the subject and summary ask it all.  Is m4 really used for anything,
  16. > or is it just a curiosity?
  17.  
  18. UK-Sendmail uses it to build sendmail config files.  I derived my
  19. sendmail config generator from UK-Sendmail some years ago and it still
  20. uses m4.  This sort of thing:
  21.  
  22. ifdef(`V2',`
  23. # note temporary removal of the m (multiple) flag.  this is
  24. # because the V2 binmail seems to drop mail to large lists
  25. # on the floor.
  26. Mlocal, P=/bin/mail, F=lsDFMn, S=20, R=20, A=mail $u')
  27. ifdef(`V3',`
  28. Mlocal, P=/usr/bin/lmail, F=lsDFMmf, S=20, R=20, A=lmail $u')
  29. ifdef(`V4',`
  30. Mlocal, P=/usr/ucblib/binmail, F=lsDFMmnr, S=20, R=20, A=mail -d $u')
  31. ifdef(`AIX',`
  32. Mlocal, P=/bin/bellmail, F=lsDFMmn, S=20, R=20, A=mail $u')
  33. ifdef(`SUNOS',`
  34. Mlocal,   P=/bin/mail, F=rnlsmFD, S=20, R=20, A=mail -d $u')
  35.  
  36. I also use it to handle our local maps for amd.  This sort of thing:
  37.  
  38. define(`userfile',
  39.        `$1    fs:=/home/$2/$1')dnl
  40.  
  41. And so on.
  42.  
  43. m4 is the VERY THING.
  44.  
  45. ian
  46.