From cc0526ab7a97c9831e47725042f1ad1dd70ef1d6 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 Aug 2011 21:16:37 +0200 Subject: retiolum/Makefile: correct rules for update the makefile will do the right thing now when just calling "make" it will update the hosts, write symlinks, copy all hostsfiles AND update the /etc/hosts. --- retiolum/Makefile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'retiolum/Makefile') diff --git a/retiolum/Makefile b/retiolum/Makefile index 85020c9f..b3ee3f9b 100644 --- a/retiolum/Makefile +++ b/retiolum/Makefile @@ -1,22 +1,27 @@ -.phony: update it all so install +RETIOLUM_HOSTS = /etc/tinc/retiolum/hosts -all: - cat Makefile +.PHONY: update it all so install + +all: update links + +links: + ln -sf $$PWD/bin/update_tinc_hosts ../bin/update_tinc_hosts + ln -sf $$PWD/bin/fillxx ../bin/fillxx it: so so: it -/etc/tinc/retiolum/hosts: - cd $(dir $@) && git clone https://github.com/krebscode/hosts +hosts/: + @echo "Writing new copy of hosts" + [ -e $(RETIOLUM_HOSTS) ] || mkdir -p $(RETIOLUM_HOSTS) + cp -r hosts/* $(RETIOLUM_HOSTS)/ -#TODO conflicting -update: /etc/tinc/retiolum/hosts - cd $< && git pull -install: +install: autohosts + @# will not run automatically scripts/tinc_setup/install.sh -autohosts: +update: hosts/ @echo creating Magic bin/update_tinc_hosts "create magic" || true @echo adding hosts -- cgit v1.2.3