dist: Replace install-sh symlink with a copy of the file.
[goals.git] / Goalfile.in
index 9126723..ca38d24 100644 (file)
@@ -257,6 +257,11 @@ goal dist = "%tarfile" : {
         mkdir -p "$d/$subdir"
         cp -a "$f" "$d/$subdir"
     done
+    # Replace $d/install-sh with a real file
+    if [ -L "$d/install-sh" ]; then
+        rm "$d/install-sh"
+        cp -L "install-sh" "$d/install-sh"
+    fi
     tar zcf "$o-t" "$d"
     mv "$o-t" "$o"
     rm -rf "$d"