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