masqmail
view tests/hostname-stdin/makefile @ 249:f9da5a7caeda
refactored the cmdline argument processing
I replaced the nested switch statements with one single
large else-if construct. Instead of char comparision now
str(n)cmp(3) is used. Although this is slower it is much
more readable and covers corner-cases which were uncovered
before (e.g. -bdxxx).
As always: Readability and simplicity matter, not performance.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 04 Nov 2010 11:02:42 -0300 |
parents | 3cb6f383f07e |
children | 60bb2dbe2866 |
line source
1 # Makefile by markus schnalke <meillo@marmaro.de>
2 # heavily based on Makefile.am written by oliver kurth
4 all: test test.conf
5 mkdir -p ./input ./lock
7 test.conf: test.conf.tpl
8 # fails if the current path contains `^'.
9 sed "s/SMTP_HOST/`hostname`/; s^PWD^`pwd`^" $< >$@
11 test: test.tpl
12 sed s/RECV_HOST/`hostname`/ $< >$@
13 chmod +x $@
15 clean:
16 rm -f test.conf test
18 realclean: clean
19 rm -rf ./input ./lock
20 rm -f *.log `logname`