Skip to content
Snippets Groups Projects
Commit c8d26992 authored by Henry Weller's avatar Henry Weller
Browse files

wmakeCollect: Use 'mktemp' to create the temporary Makefiles

to avoid file names which are two long for the standard GNU/Linux file systems.
parent 36f1016f
No related branches found
No related tags found
1 merge request!60Merge foundation
...@@ -121,7 +121,7 @@ then ...@@ -121,7 +121,7 @@ then
object="${@: -1:1}" object="${@: -1:1}"
# Create a unique name for the makefile from the object path # Create a unique name for the makefile from the object path
file=$WM_COLLECT_DIR/${object////_} file=$(mktemp $WM_COLLECT_DIR/XXXXXX)
# Add the current target to the list of objects # Add the current target to the list of objects
echo "OBJECTS += $object" >> $file echo "OBJECTS += $object" >> $file
...@@ -135,7 +135,7 @@ else ...@@ -135,7 +135,7 @@ else
if [ -d $WM_COLLECT_DIR ] if [ -d $WM_COLLECT_DIR ]
then then
# Collect all the makefiles into a single makefiles for this build # Collect all the makefiles into a single makefiles for this build
cat $WM_COLLECT_DIR/* > $makefile (cd $WM_COLLECT_DIR && ls -1rt | xargs cat > $makefile)
# Add a build rule for all of the targets # Add a build rule for all of the targets
echo 'all: $(OBJECTS)' >> $makefile echo 'all: $(OBJECTS)' >> $makefile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment