Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Change SYMLINKS so that the link isn't recreated if...
details: https://anonhg.NetBSD.org/src/rev/aeecbcc71666
branches: trunk
changeset: 485254:aeecbcc71666
user: simonb <simonb%NetBSD.org@localhost>
date: Sun Apr 23 07:58:17 2000 +0000
description:
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).
diffstat:
share/mk/bsd.kinc.mk | 19 ++++++++++---------
share/mk/bsd.links.mk | 19 ++++++++++---------
2 files changed, 20 insertions(+), 18 deletions(-)
diffs (76 lines):
diff -r 8e648934baae -r aeecbcc71666 share/mk/bsd.kinc.mk
--- a/share/mk/bsd.kinc.mk Sun Apr 23 05:49:14 2000 +0000
+++ b/share/mk/bsd.kinc.mk Sun Apr 23 07:58:17 2000 +0000
@@ -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 @@
.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)
diff -r 8e648934baae -r aeecbcc71666 share/mk/bsd.links.mk
--- a/share/mk/bsd.links.mk Sun Apr 23 05:49:14 2000 +0000
+++ b/share/mk/bsd.links.mk Sun Apr 23 07:58:17 2000 +0000
@@ -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 @@
.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::
Home |
Main Index |
Thread Index |
Old Index