From: Tom Tromey Date: Tue, 14 Nov 1995 23:25:13 +0000 (+0000) Subject: (dist): Don't link or copy file if it already exists. X-Git-Tag: Release-0-25~340 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=886e576b94e378dc77beccb8dcf7d7a5c76a77c2;p=automake.git (dist): Don't link or copy file if it already exists. --- diff --git a/dist-subd-top.am b/dist-subd-top.am index b5c61d74..fbd19776 100644 --- a/dist-subd-top.am +++ b/dist-subd-top.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 for subdir in $(SUBDIRS); do \ mkdir $(distdir)/$$subdir || exit 1; \