Skip to content

Commit 83d84ab

Browse files
committed
build-mingw-w64: Fix installing COPYING files on macOS
The install(1) tool on macOS doesn't support the -D option for creating directories at the same time while installing files. Therefore, run a separate step for creating directories. Doing that with "mkdir -p", even if install(1) also could do that with the -d option (likewise with a separate command). Also stop specifying the destination file name, when it's equal to the source files, now that we know that the destination directory already exists.
1 parent 192a734 commit 83d84ab

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

build-mingw-w64-libraries.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ for lib in winpthreads winstorecompat; do
4747
make -j$CORES
4848
make install
4949
cd ..
50-
install -Dm644 COPYING "$arch_prefix/share/mingw32/COPYING.${lib}.txt"
50+
mkdir -p "$arch_prefix/share/mingw32"
51+
install -m644 COPYING "$arch_prefix/share/mingw32/COPYING.${lib}.txt"
5152
done
5253
cd ..
5354
done

build-mingw-w64-tools.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,17 @@ cd build${CROSS_NAME}
9292
../configure --prefix="$PREFIX" $CONFIGFLAGS
9393
$MAKE -j$CORES
9494
$MAKE install-strip
95-
install -Dm644 ../COPYING "$PREFIX/share/gendef/COPYING"
95+
mkdir -p "$PREFIX/share/gendef"
96+
install -m644 ../COPYING "$PREFIX/share/gendef"
9697
cd ../../widl
9798
[ -z "$CLEAN" ] || rm -rf build${CROSS_NAME}
9899
mkdir -p build${CROSS_NAME}
99100
cd build${CROSS_NAME}
100101
../configure --prefix="$PREFIX" --target=$ANY_ARCH-w64-mingw32 --with-widl-includedir="$INCLUDEDIR" $CONFIGFLAGS
101102
$MAKE -j$CORES
102103
$MAKE install-strip
103-
install -Dm644 ../../../COPYING "$PREFIX/share/widl/COPYING"
104+
mkdir -p "$PREFIX/share/widl"
105+
install -m644 ../../../COPYING "$PREFIX/share/widl"
104106
cd ..
105107
cd "$PREFIX/bin"
106108
# The build above produced $ANY_ARCH-w64-mingw32-widl, add symlinks to it

build-mingw-w64.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ done
126126
cd ..
127127

128128
for arch in $ARCHS; do
129+
mkdir -p "$PREFIX/$arch-w64-mingw32/share/mingw32"
129130
for file in COPYING COPYING.MinGW-w64/COPYING.MinGW-w64.txt COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt; do
130-
install -Dm644 "$file" "$PREFIX/$arch-w64-mingw32/share/mingw32/$(basename "$file")"
131+
install -m644 "$file" "$PREFIX/$arch-w64-mingw32/share/mingw32"
131132
done
132133
done

0 commit comments

Comments
 (0)