Makefile: similar treatment for arch list
[user/alex/software/my-snippets.git] / Makefile
1 archdir=/mit/$(ATHENA_USER)/arch/
2 common=$(archdir)/common/
3
4 scripts=\
5     bores-me\
6     card-access\
7     get-emails\
8     grep-owners\
9     ldapfinger\
10     list-members\
11     list-of-lists-updater\
12     lists-lint\
13     mail-merge\
14     make-zcrypt-key\
15     pag-screen\
16     rt-resolve check-host\
17     rt-set\
18     sshroot\
19     update-officers\
20
21 arches=\
22     i386_deb31\
23     i386_deb40\
24     i386_deb50\
25     i386_rhel4\
26
27 all : install
28
29 $(common)/% : %
30         cp $< $@
31
32 $(foreach script,$(scripts),$(foreach arch,$(arches),$(archdir)/$(arch)/bin/$(script))) : 
33 #$(archdir)/*/bin/* :
34         ln -s ../../common/$(@F) $(@D)
35
36 symlinks : $(foreach script,$(scripts),$(foreach arch,$(arches),$(archdir)/$(arch)/bin/$(script)))
37
38 script-copies : $(foreach script,$(scripts),$(common)/$(script))
39
40 install : script-copies symlinks