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