diff --git a/wmake/wmakeCollect b/wmake/wmakeCollect index c0435e4af5..99c7413ae7 100755 --- a/wmake/wmakeCollect +++ b/wmake/wmakeCollect @@ -125,12 +125,12 @@ then # Make sure directories exist mkdir -p $collectDir - # Unique file name for makefile for the current target - file="$collectDir/$$_${RANDOM}" - # The current target object="${@: -1:1}" + # Create a unique name for the makefile from the object path + file=$collectDir/${object////_} + # Add the current target to the list of objects echo "OBJECTS += $object" >> $file