Make - Wiki.mattrude.com

Make

From Wiki.mattrude.com
Jump to: navigation, search

[edit] To have make create config files for you

cat Makefile

FILES: main.cf-a main.cf-b main.cf-c

all: $(FILES)

main.cf-a: Makefile main.cf-template
       sed 's/whatever/whatever/' main.cf-template >$@
       rsync -av $@ hosta:/etc/postfix

main.cf-b: Makefile main.cf-template
       sed 's/whatever/whatever/' main.cf-template >$@
       rsync -av $@ hostb:/etc/postfix

main.cf-c: Makefile main.cf-template
       sed 's/whatever/whatever/' main.cf-template >$@
       rsync -av $@ hostc:/etc/postfix
Google AdSense