bsd.links.mk revision 1.7 1 # $NetBSD: bsd.links.mk,v 1.7 1997/05/10 10:55:19 mycroft Exp $
2
3 .PHONY: linksinstall
4 realinstall: linksinstall
5
6 .if defined(SYMLINKS) && !empty(SYMLINKS)
7 linksinstall::
8 @set ${SYMLINKS}; \
9 while test $$# -ge 2; do \
10 l=$$1; \
11 shift; \
12 t=${DESTDIR}$$1; \
13 shift; \
14 echo ".include <bsd.own.mk>"; \
15 echo "all:: $$t"; \
16 echo ".PHONY: $$t"; \
17 echo "$$t:"; \
18 echo " @echo \"$$t -> $$l\""; \
19 echo " @rm -f $$t"; \
20 echo " @ln -s $$l $$t"; \
21 done | make -f-
22 .endif
23 .if defined(LINKS) && !empty(LINKS)
24 linksinstall::
25 @set ${LINKS}; \
26 while test $$# -ge 2; do \
27 l=${DESTDIR}$$1; \
28 shift; \
29 t=${DESTDIR}$$1; \
30 shift; \
31 echo ".include <bsd.own.mk>"; \
32 echo "all:: $$t"; \
33 echo ".PHONY: $$t"; \
34 echo "$$t:"; \
35 echo " @echo \"$$t -> $$l\""; \
36 echo " @rm -f $$t"; \
37 echo " @ln $$l $$t"; \
38 done | make -f-
39 .endif
40
41 .if !target(linksinstall)
42 linksinstall:
43 .endif
44