Home | History | Annotate | Line # | Download | only in mk
bsd.links.mk revision 1.12
      1 #	$NetBSD: bsd.links.mk,v 1.12 2000/02/26 19:02:40 mycroft 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; ln -s $$l $$t"; \
     20 	 done; \
     21 	) | ${MAKE} -f- all
     22 .endif
     23 .if defined(LINKS) && !empty(LINKS)
     24 linksinstall::
     25 	@(set ${LINKS}; \
     26 	 echo ".include <bsd.own.mk>"; \
     27 	 while test $$# -ge 2; do \
     28 		l=${DESTDIR}$$1; \
     29 		shift; \
     30 		t=${DESTDIR}$$1; \
     31 		shift; \
     32 		echo "realall: $$t"; \
     33 		echo ".PHONY: $$t"; \
     34 		echo "$$t:"; \
     35 		echo "	@echo \"$$t -> $$l\""; \
     36 		echo "	@rm -f $$t; ln $$l $$t"; \
     37 	 done; \
     38 	) | ${MAKE} -f- all
     39 .endif
     40 
     41 .if !target(linksinstall)
     42 linksinstall:
     43 .endif
     44