Very early initial commit.
[distorted-ansible] / roles / common / files / ssh-root / Makefile
1 ### -*-makefile-*-
2
3 TARGETS =
4 all:
5
6 HOST = $(shell hostname)
7 M4 = m4
8
9 TARGETS += config
10 config: config.m4
11 $(M4) -P $< >$@.new && mv $@.new $@
12
13 TARGETS += authorized_keys
14 authorized_keys: authkeys.base $(wildcard authkeys.$(HOST)/*)
15 { echo "### DO NOT EDIT! Generated from authkeys.*" && \
16 cat $^ | grep "^[^#]"; \
17 } >$@.new && mv $@.new $@
18
19 TARGETS += known_hosts
20 known_hosts: /var/cache/ssh-certs/known_hosts $(wildcard known_hosts.*)
21 { echo "### DO NOT EDIT! Generated from known_hosts.*" && \
22 cat $^ | grep "^[^#]"; \
23 } >$@.new && mv $@.new $@
24
25 all: $(TARGETS)
26 clean:; rm -f $(TARGETS)