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