Home | History | Annotate | Line # | Download | only in mk
bsd.links.mk revision 1.22
      1  1.22     lukem #	$NetBSD: bsd.links.mk,v 1.22 2003/07/20 14:49:44 lukem Exp $
      2   1.3   mycroft 
      3  1.15        tv ##### Basic targets
      4   1.3   mycroft .PHONY:		linksinstall
      5  1.18        pk install:	linksinstall
      6   1.1  christos 
      7  1.15        tv ##### Default values
      8  1.15        tv LINKS?=
      9  1.15        tv SYMLINKS?=
     10  1.15        tv 
     11  1.15        tv ##### Install rules
     12  1.19  sommerfe linksinstall::	realinstall
     13  1.15        tv .if !empty(SYMLINKS)
     14  1.11  drochner 	@(set ${SYMLINKS}; \
     15   1.1  christos 	 while test $$# -ge 2; do \
     16  1.15        tv 		l=$$1; shift; \
     17  1.15        tv 		t=${DESTDIR}$$1; shift; \
     18  1.22     lukem 		if  ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
     19  1.22     lukem 		    [ "$$l" = "$$ttarg" ]; then \
     20  1.22     lukem 			continue ; \
     21  1.22     lukem 		fi ; \
     22  1.13    simonb 		echo "$$t -> $$l"; \
     23  1.21     perry 		${INSTALL_SYMLINK} ${SYSPKGTAG} $$l $$t; \
     24  1.13    simonb 	 done; )
     25   1.1  christos .endif
     26  1.15        tv .if !empty(LINKS)
     27  1.11  drochner 	@(set ${LINKS}; \
     28   1.1  christos 	 while test $$# -ge 2; do \
     29  1.15        tv 		l=${DESTDIR}$$1; shift; \
     30  1.15        tv 		t=${DESTDIR}$$1; shift; \
     31  1.22     lukem 		if  ldevino=`${TOOL_STAT} -qf '%d %i' $$l` && \
     32  1.22     lukem 		    tdevino=`${TOOL_STAT} -qf '%d %i' $$t` && \
     33  1.22     lukem 		    [ "$$ldevino" = "$$tdevino" ]; then \
     34  1.22     lukem 			continue ; \
     35  1.22     lukem 		fi ; \
     36  1.22     lukem 		echo "$$t -> $$l"; \
     37  1.22     lukem 		${INSTALL_LINK} ${SYSPKGTAG} $$l $$t; \
     38  1.22     lukem 	done ; )
     39   1.1  christos .endif
     40