Fix makefile generator script when multiple types
The script takes the arguments:
base-directory type1 type2..typeN
Where the types are the directory names
to find procedures in.
However, when multiple types are passed in
during the build, they actually show up as
1 parameter:
base-directory "type1 type2..typeN"
This change looks for all of the types in
the second parameter.
Change-Id: Ib45446346bd8814ca58d72057c18b0faf16f9152
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/gen_makefile.sh b/gen_makefile.sh
index f5150fc..8960183 100755
--- a/gen_makefile.sh
+++ b/gen_makefile.sh
@@ -1,13 +1,13 @@
#!/bin/bash
files=()
-dir=$1
-args=("$@")
+dir=$1 #Base directory
+types=($2) #List of types (convert to array)
echo "openpower_procedures_cpp_files = \\"
-for ((i=1; i<${#args[@]}; ++i));
+for ((i=0; i<${#types[@]}; ++i));
do
- type=${args[$i]}
+ type=${types[$i]}
type=${type// /} #remove spaces
for file in $(ls $dir/procedures/$type/*.cpp);
do