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