mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 20:32:33 +00:00
dbc1c5aabe
Reason: during parallel makes there is a small window in which "mkdir .deps" may be executed more than once, and one of them fails bringing the whole build process down.
20 lines
335 B
Bash
Executable File
20 lines
335 B
Bash
Executable File
#!/bin/sh
|
|
|
|
obj="$1"
|
|
exitcode="$2"
|
|
|
|
dep="`echo "$obj" | sed -e 's:\.o$:.d:'`"
|
|
test -f "$dep" || exit $exitcode
|
|
|
|
test -f .deps && rm -f .deps
|
|
test -d .deps || mkdir .deps 2> /dev/null
|
|
if test ! -d .deps; then
|
|
rm -f "$dep"
|
|
exit 1
|
|
fi
|
|
|
|
target="`echo "$dep" | sed -e 's:/:_:g'`"
|
|
mv "$dep" ".deps/$target" || rm -f "$dep"
|
|
|
|
exit $exitcode
|