File: Makefile

package info (click to toggle)
iproute2 6.19.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,380 kB
  • sloc: ansic: 127,486; sh: 1,363; cpp: 946; makefile: 720; yacc: 421; lex: 145; python: 43
file content (29 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# SPDX-License-Identifier: GPL-2.0
TARGETS = ip-address.8 ip-link.8 ip-netns.8 ip-route.8 ip-rule.8

MAN8PAGES = $(TARGETS) $(filter-out $(TARGETS),$(wildcard *.8))

all: $(TARGETS)

%: %.in
	sed \
		-e "s|@NETNS_ETC_DIR@|$(NETNS_ETC_DIR)|g" \
		-e "s|@NETNS_RUN_DIR@|$(NETNS_RUN_DIR)|g" \
		-e "s|@SYSCONF_ETC_DIR@|$(CONF_ETC_DIR)|g" \
		-e "s|@SYSCONF_USR_DIR@|$(CONF_USR_DIR)|g" \
		$< > $@

distclean: clean

clean:
	@rm -f $(TARGETS)

install:
	$(INSTALLDIR) $(DESTDIR)$(MANDIR)/man8
	$(INSTALLMAN) $(MAN8PAGES) $(DESTDIR)$(MANDIR)/man8

check: all
	@for page in $(MAN8PAGES); do test 0 -eq $$($(MAN_CHECK) $$page \
		$(MAN_REDIRECT)) || { echo "Error in $$page"; exit 1; }; done

.PHONY: install clean distclean check