Change SYMLINKS so that the link isn't recreated if it already points
to the right place (much the same as bsd.obj.mk already does).
This commit is contained in:
parent
dfb848e298
commit
db352c9bba
@ -1,4 +1,4 @@
|
||||
# $NetBSD: bsd.kinc.mk,v 1.11 2000/02/26 19:02:40 mycroft Exp $
|
||||
# $NetBSD: bsd.kinc.mk,v 1.12 2000/04/23 07:58:17 simonb Exp $
|
||||
|
||||
# System configuration variables:
|
||||
#
|
||||
@ -116,19 +116,20 @@ ${DESTDIR}${INCSDIR}/$I: ${DESTDIR}${INCSDIR} $I
|
||||
.if defined(SYMLINKS) && !empty(SYMLINKS)
|
||||
incinstall::
|
||||
@(set ${SYMLINKS}; \
|
||||
echo ".include <bsd.own.mk>"; \
|
||||
while test $$# -ge 2; do \
|
||||
l=$$1; \
|
||||
shift; \
|
||||
t=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
echo "realall: $$t"; \
|
||||
echo ".PHONY: $$t"; \
|
||||
echo "$$t:"; \
|
||||
echo " @echo \"$$t -> $$l\""; \
|
||||
echo " @rm -rf $$t; ln -s $$l $$t"; \
|
||||
done; \
|
||||
) | ${MAKE} -f- all
|
||||
if [ -L $$t ]; then \
|
||||
cur=`ls -ld $$t | awk '{print $$NF}'` ; \
|
||||
if [ "$$cur" = "$$l" ]; then \
|
||||
continue ; \
|
||||
fi; \
|
||||
fi; \
|
||||
echo "$$t -> $$l"; \
|
||||
rm -rf $$t; ln -s $$l $$t; \
|
||||
done; )
|
||||
.endif
|
||||
|
||||
.if !target(incinstall)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: bsd.links.mk,v 1.12 2000/02/26 19:02:40 mycroft Exp $
|
||||
# $NetBSD: bsd.links.mk,v 1.13 2000/04/23 07:58:17 simonb Exp $
|
||||
|
||||
.PHONY: linksinstall
|
||||
realinstall: linksinstall
|
||||
@ -6,19 +6,20 @@ realinstall: linksinstall
|
||||
.if defined(SYMLINKS) && !empty(SYMLINKS)
|
||||
linksinstall::
|
||||
@(set ${SYMLINKS}; \
|
||||
echo ".include <bsd.own.mk>"; \
|
||||
while test $$# -ge 2; do \
|
||||
l=$$1; \
|
||||
shift; \
|
||||
t=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
echo "realall: $$t"; \
|
||||
echo ".PHONY: $$t"; \
|
||||
echo "$$t:"; \
|
||||
echo " @echo \"$$t -> $$l\""; \
|
||||
echo " @rm -f $$t; ln -s $$l $$t"; \
|
||||
done; \
|
||||
) | ${MAKE} -f- all
|
||||
if [ -L $$t ]; then \
|
||||
cur=`ls -ld $$t | awk '{print $$NF}'` ; \
|
||||
if [ "$$cur" = "$$l" ]; then \
|
||||
continue ; \
|
||||
fi; \
|
||||
fi; \
|
||||
echo "$$t -> $$l"; \
|
||||
rm -rf $$t; ln -s $$l $$t; \
|
||||
done; )
|
||||
.endif
|
||||
.if defined(LINKS) && !empty(LINKS)
|
||||
linksinstall::
|
||||
|
Loading…
Reference in New Issue
Block a user