]>
Commit | Line | Data |
---|---|---|
6054c1eb | 1 | # SPDX-License-Identifier: GPL-2.0 |
48e05899 | 2 | TARGETS = ip-address.8 ip-link.8 ip-netns.8 ip-route.8 |
761a1e60 | 3 | |
f2ca4a7a | 4 | MAN8PAGES = $(TARGETS) $(filter-out $(TARGETS),$(wildcard *.8)) |
761a1e60 CT |
5 | |
6 | all: $(TARGETS) | |
7 | ||
48e05899 | 8 | %: %.in |
8b9d5728 BN |
9 | sed \ |
10 | -e "s|@NETNS_ETC_DIR@|$(NETNS_ETC_DIR)|g" \ | |
11 | -e "s|@NETNS_RUN_DIR@|$(NETNS_RUN_DIR)|g" \ | |
12 | -e "s|@SYSCONFDIR@|$(CONFDIR)|g" \ | |
13 | $< > $@ | |
761a1e60 CT |
14 | |
15 | distclean: clean | |
16 | ||
17 | clean: | |
18 | @rm -f $(TARGETS) | |
19 | ||
20 | install: | |
21 | $(INSTALLDIR) $(DESTDIR)$(MANDIR)/man8 | |
22 | $(INSTALLMAN) $(MAN8PAGES) $(DESTDIR)$(MANDIR)/man8 | |
23 | ||
0cf06118 LB |
24 | check: all |
25 | @for page in $(MAN8PAGES); do test 0 -eq $$($(MAN_CHECK) $$page \ | |
26 | $(MAN_REDIRECT)) || { echo "Error in $$page"; exit 1; }; done | |
27 | ||
28 | .PHONY: install clean distclean check |