Home | History | Annotate | Line # | Download | only in mk
bsd.links.mk revision 1.10
      1  1.10   mycroft #	$NetBSD: bsd.links.mk,v 1.10 2000/01/24 06:54:27 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.1  christos 	@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.10   mycroft 		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.1  christos 		echo "	@rm -f $$t"; \
     20   1.1  christos 		echo "	@ln -s $$l $$t"; \
     21   1.8    castor 	done | ${MAKE} -f-
     22   1.1  christos .endif
     23   1.1  christos .if defined(LINKS) && !empty(LINKS)
     24   1.1  christos linksinstall::
     25   1.1  christos 	@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.10   mycroft 		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.1  christos 		echo "	@rm -f $$t"; \
     37   1.1  christos 		echo "	@ln $$l $$t"; \
     38   1.8    castor 	done | ${MAKE} -f-
     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