Annotation of src/share/mk/bsd.links.mk, Revision 1.28
1.28 ! lukem 1: # $NetBSD: bsd.links.mk,v 1.27 2004/05/13 13:05:53 lukem Exp $
1.23 lukem 2:
3: .include <bsd.init.mk>
1.3 mycroft 4:
1.15 tv 5: ##### Basic targets
1.18 pk 6: install: linksinstall
1.1 christos 7:
1.15 tv 8: ##### Default values
9: LINKS?=
10: SYMLINKS?=
11:
12: ##### Install rules
1.26 lukem 13: .PHONY: linksinstall
1.19 sommerfe 14: linksinstall:: realinstall
1.15 tv 15: .if !empty(SYMLINKS)
1.11 drochner 16: @(set ${SYMLINKS}; \
1.1 christos 17: while test $$# -ge 2; do \
1.15 tv 18: l=$$1; shift; \
19: t=${DESTDIR}$$1; shift; \
1.22 lukem 20: if ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
21: [ "$$l" = "$$ttarg" ]; then \
22: continue ; \
23: fi ; \
1.25 lukem 24: ${_MKSHMSG_INSTALL} $$t; \
25: ${_MKSHECHO} ${INSTALL_SYMLINK} ${SYSPKGTAG} $$l $$t; \
1.21 perry 26: ${INSTALL_SYMLINK} ${SYSPKGTAG} $$l $$t; \
1.13 simonb 27: done; )
1.1 christos 28: .endif
1.15 tv 29: .if !empty(LINKS)
1.11 drochner 30: @(set ${LINKS}; \
1.1 christos 31: while test $$# -ge 2; do \
1.15 tv 32: l=${DESTDIR}$$1; shift; \
33: t=${DESTDIR}$$1; shift; \
1.22 lukem 34: if ldevino=`${TOOL_STAT} -qf '%d %i' $$l` && \
35: tdevino=`${TOOL_STAT} -qf '%d %i' $$t` && \
36: [ "$$ldevino" = "$$tdevino" ]; then \
37: continue ; \
38: fi ; \
1.25 lukem 39: ${_MKSHMSG_INSTALL} $$t; \
40: ${_MKSHECHO} ${INSTALL_LINK} ${SYSPKGTAG} $$l $$t; \
1.22 lukem 41: ${INSTALL_LINK} ${SYSPKGTAG} $$l $$t; \
42: done ; )
1.1 christos 43: .endif
1.24 lukem 44:
1.27 lukem 45:
46: configinstall: configlinksinstall
47: configlinksinstall:: .PHONY
1.28 ! lukem 48: .if defined(CONFIGSYMLINKS)
1.27 lukem 49: @(set ${CONFIGSYMLINKS}; \
50: while test $$# -ge 2; do \
51: l=$$1; shift; \
52: t=${DESTDIR}$$1; shift; \
53: if ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
54: [ "$$l" = "$$ttarg" ]; then \
55: continue ; \
56: fi ; \
57: ${_MKSHMSG_INSTALL} $$t; \
58: ${_MKSHECHO} ${INSTALL_SYMLINK} ${SYSPKGTAG} $$l $$t; \
59: ${INSTALL_SYMLINK} ${SYSPKGTAG} $$l $$t; \
60: done; )
61: .endif
1.28 ! lukem 62: .if !empty(CONFIGLINKS)
! 63: @(set ${CONFIGLINKS}; \
! 64: while test $$# -ge 2; do \
! 65: l=${DESTDIR}$$1; shift; \
! 66: t=${DESTDIR}$$1; shift; \
! 67: if ldevino=`${TOOL_STAT} -qf '%d %i' $$l` && \
! 68: tdevino=`${TOOL_STAT} -qf '%d %i' $$t` && \
! 69: [ "$$ldevino" = "$$tdevino" ]; then \
! 70: continue ; \
! 71: fi ; \
! 72: ${_MKSHMSG_INSTALL} $$t; \
! 73: ${_MKSHECHO} ${INSTALL_LINK} ${SYSPKGTAG} $$l $$t; \
! 74: ${INSTALL_LINK} ${SYSPKGTAG} $$l $$t; \
! 75: done ; )
! 76: .endif
1.27 lukem 77:
1.24 lukem 78: .include <bsd.sys.mk>
CVSweb <webmaster@jp.NetBSD.org>