home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!fulcrum!igb
- From: igb@fulcrum.co.uk (Ian G Batten)
- Newsgroups: comp.unix.misc
- Subject: Re: Is anyone using m4?
- Keywords: m4,macro,preprocessor
- Message-ID: <BxHu2G.4L0@fulcrum.co.uk>
- Date: 10 Nov 92 09:23:03 GMT
- References: <crigler.720808909@eola.cs.ucf.edu>
- Sender: news@fulcrum.co.uk
- Distribution: comp.*.unix
- Organization: Fulcrum Communications
- Lines: 32
-
- In article <crigler.720808909@eola.cs.ucf.edu> crigler@cs.ucf.edu (James Crigler) writes:
- > Okay, the subject and summary ask it all. Is m4 really used for anything,
- > or is it just a curiosity?
-
- UK-Sendmail uses it to build sendmail config files. I derived my
- sendmail config generator from UK-Sendmail some years ago and it still
- uses m4. This sort of thing:
-
- ifdef(`V2',`
- # note temporary removal of the m (multiple) flag. this is
- # because the V2 binmail seems to drop mail to large lists
- # on the floor.
- Mlocal, P=/bin/mail, F=lsDFMn, S=20, R=20, A=mail $u')
- ifdef(`V3',`
- Mlocal, P=/usr/bin/lmail, F=lsDFMmf, S=20, R=20, A=lmail $u')
- ifdef(`V4',`
- Mlocal, P=/usr/ucblib/binmail, F=lsDFMmnr, S=20, R=20, A=mail -d $u')
- ifdef(`AIX',`
- Mlocal, P=/bin/bellmail, F=lsDFMmn, S=20, R=20, A=mail $u')
- ifdef(`SUNOS',`
- Mlocal, P=/bin/mail, F=rnlsmFD, S=20, R=20, A=mail -d $u')
-
- I also use it to handle our local maps for amd. This sort of thing:
-
- define(`userfile',
- `$1 fs:=/home/$2/$1')dnl
-
- And so on.
-
- m4 is the VERY THING.
-
- ian
-