Pass source dir into makefile generator script
The script runs in build/, the source is in git/.
Change-Id: I3f6804f3a83013bc0afe7bfba8da585d2fd24413
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/gen_makefile.sh b/gen_makefile.sh
index a6fc076..f5150fc 100755
--- a/gen_makefile.sh
+++ b/gen_makefile.sh
@@ -1,11 +1,15 @@
#!/bin/bash
files=()
+dir=$1
+args=("$@")
+
echo "openpower_procedures_cpp_files = \\"
-for type in "$@";
+for ((i=1; i<${#args[@]}; ++i));
do
+ type=${args[$i]}
type=${type// /} #remove spaces
- for file in $(ls procedures/$type/*.cpp);
+ for file in $(ls $dir/procedures/$type/*.cpp);
do
files+=($file)
done