From 63226e6887424b797ee0700c1c1ee600eaa633c5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 14 Nov 1995 23:22:55 +0000 Subject: [PATCH] (dist): Don't link or copy file if it already exists. --- dist.am | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dist.am b/dist.am index 2c7af76a..a28fc175 100644 --- a/dist.am +++ b/dist.am @@ -2,10 +2,14 @@ distdir = $(PACKAGE)-$(VERSION) dist: $(DIST_FILES) $(DIST_DIRS) rm -rf $(distdir) mkdir $(distdir) - @for file in $(DIST_FILES); do \ - echo linking $$file; \ - ln $(srcdir)/$$file $(distdir)/$$file || \ - { echo copying $$file instead; cp -p $(srcdir)/$$file $(distdir)/$$file;}; \ + @for file in $(DIST_FILES); do \ + test -f $$file || { \ + echo linking $$file; \ + ln $(srcdir)/$$file $(distdir)/$$file; \ + } || { \ + echo copying $$file instead; \ + cp -p $(srcdir)/$$file $(distdir)/$$file; \ + }; \ done @sublist="$(DIST_SUBDIRS)"; \ for dir in $$sublist; do \ -- 2.43.5