]> sourceware.org Git - automake.git/commitdiff
(dist): Don't link or copy file if it already exists.
authorTom Tromey <tromey@redhat.com>
Tue, 14 Nov 1995 23:25:13 +0000 (23:25 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 14 Nov 1995 23:25:13 +0000 (23:25 +0000)
dist-subd-top.am

index b5c61d74cbfbbf2d9535728e69a81fe5bc593c6a..fbd197763b0c28c7dcca0288c9437af63c7795b7 100644 (file)
@@ -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;  \
This page took 0.025031 seconds and 5 git commands to generate.