summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2a41fec)
If I use static pattern rules, I can set them as phony. But I must
exclude the local host rule.
## The local machine doesn't want the complicated SSH stuff.
THISHOST = $(shell hostname)
## The local machine doesn't want the complicated SSH stuff.
THISHOST = $(shell hostname)
+OTHERHOSTS = $(filter-out $(THISHOST), $(HOSTS))
## Testing.
check: $(THISHOST).sh
## Testing.
check: $(THISHOST).sh
$(ROOT) ./$(THISHOST).sh replace
## Installation on a remote host.
$(ROOT) ./$(THISHOST).sh replace
## Installation on a remote host.
+$(addprefix install/, $(OTHERHOSTS)): install/%: %.sh
if [ "x$(SCRIPTS)" != x ]; then \
for i in $(SCRIPTS); do \
$(ROOT) scp $$i root@$*:$(sbindir)/$$i.new && \
if [ "x$(SCRIPTS)" != x ]; then \
for i in $(SCRIPTS); do \
$(ROOT) scp $$i root@$*:$(sbindir)/$$i.new && \
done; \
fi
$(ROOT) scp $*.sh root@$*:$(FIREWALL).new
done; \
fi
$(ROOT) scp $*.sh root@$*:$(FIREWALL).new
- $(ROOT) ssh root@$* $(FIREWALL) remote-prepare
- $(ROOT) ssh root@$* $(FIREWALL) remote-commit
+ $(ROOT) ssh root@$* $(FIREWALL).new remote-prepare
+ $(ROOT) ssh root@$* $(FIREWALL).new remote-commit
$(ROOT) ssh root@$* rm -f $(FIREWALL).new
## General installation target.
install: all install/$(THISHOST) $(addprefix install/,$(HOSTS))
$(ROOT) ssh root@$* rm -f $(FIREWALL).new
## General installation target.
install: all install/$(THISHOST) $(addprefix install/,$(HOSTS))
-.PHONY: install install/$(THISHOST)
+.PHONY: install $(addprefix install/,$(HOSTS))
###----- That's all, folks --------------------------------------------------
###----- That's all, folks --------------------------------------------------