summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-09-18 14:08:01 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-10-04 12:31:07 -0500
commit88d7b4d1ed713a8221efa78bf4e50d6a4b1f79d6 (patch)
treef4174cd78c0cb90e74cbdde75925b469ebbf920e
parenta231ceb41e695cfc0a77699b15e5ea4281e212a9 (diff)
downloadopenpower-proc-control-88d7b4d1ed713a8221efa78bf4e50d6a4b1f79d6.tar.gz
openpower-proc-control-88d7b4d1ed713a8221efa78bf4e50d6a4b1f79d6.zip
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>
-rwxr-xr-xgen_makefile.sh8
1 files changed, 4 insertions, 4 deletions
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
OpenPOWER on IntegriCloud