]> git.proxmox.com Git - mirror_linux-firmware.git/commitdiff
Makefile: replace mkdir by install
authorKonrad Weihmann <kweihmann@outlook.com>
Mon, 9 May 2022 10:25:02 +0000 (12:25 +0200)
committerJosh Boyer <jwboyer@kernel.org>
Tue, 31 May 2022 16:57:56 +0000 (12:57 -0400)
mkdir -p creates paths that are bound to user's settings and therefore
can lead to different file mode bits of the base paths accross different
machines.
Use install instead, as this tool is not prone to such behavior.

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
Makefile
carl9170fw/toolchain/Makefile
copy-firmware.sh

index e1c362f3665027e24473b62ae3ff4b5e8b7870e6..83a0ec609908325596ddf55245995dd00b4c9d16 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,5 +9,5 @@ check:
        @./check_whence.py
 
 install:
-       mkdir -p $(DESTDIR)$(FIRMWAREDIR)
+       install -d $(DESTDIR)$(FIRMWAREDIR)
        ./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
index 2b25ffe6b92b9117f68c90511d1e8eb6ed8b8874..aaea8e84e1bb456b33915b68c7a285ba7ae052e7 100644 (file)
@@ -46,14 +46,14 @@ src/gcc-$(GCC_VER): src/$(GCC_TAR) src/newlib-$(NEWLIB_VER)
        ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/libgloss $@
 
 binutils: src/binutils-$(BINUTILS_VER)
-       mkdir -p build/binutils
+       install -d build/binutils
        cd build/binutils; \
        $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst; \
        $(MAKE) -j3; \
        $(MAKE) install
 
 gcc: src/gcc-$(GCC_VER) binutils
-       mkdir -p build/gcc
+       install -d build/gcc
        cd build/gcc; \
        $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst -enable-languages=c --without-pkgversion --with-newlib; \
        $(MAKE) -j3; \
index 9b46b63913ab546ed545f8665e03d1b9b8f4252d..bbacb925a03f9d4ccd0ad33c03d28f37f048199f 100755 (executable)
@@ -34,7 +34,7 @@ done
 grep '^File:' WHENCE | sed -e's/^File: *//g' -e's/"//g' | while read f; do
     test -f "$f" || continue
     $verbose "copying file $f"
-    mkdir -p $destdir/$(dirname "$f")
+    install -d $destdir/$(dirname "$f")
     cp -d "$f" $destdir/"$f"
 done
 
@@ -42,7 +42,7 @@ grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; d
     if test -L "$f"; then
         test -f "$destdir/$f" && continue
         $verbose "copying link $f"
-        mkdir -p $destdir/$(dirname "$f")
+        install -d $destdir/$(dirname "$f")
         cp -d "$f" $destdir/"$f"
 
         if test "x$d" != "x"; then
@@ -63,7 +63,7 @@ grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; d
         fi
     else
         $verbose "creating link $f -> $d"
-        mkdir -p $destdir/$(dirname "$f")
+        install -d $destdir/$(dirname "$f")
         ln -sf "$d" "$destdir/$f"
     fi
 done