diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-03-17 11:07:06 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-03-17 11:46:22 -0500 |
commit | cc2403cbac41751b5bd81364c3f359f0226f6c93 (patch) | |
tree | 03f49a3a2c709fef96a49774f8e29a5d3574246c | |
parent | 29ddffdc90170059713855d5428c38d4feea9196 (diff) | |
download | openpower-proc-control-cc2403cbac41751b5bd81364c3f359f0226f6c93.tar.gz openpower-proc-control-cc2403cbac41751b5bd81364c3f359f0226f6c93.zip |
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>
-rw-r--r-- | configure.ac | 2 | ||||
-rwxr-xr-x | gen_makefile.sh | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b5a14ad..0234491 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AC_ARG_VAR(CHIPS, [The list of chips to build the procedures for]) AS_IF([test "x$CHIPS" == "x"], [CHIPS="p9"]) AC_CONFIG_FILES([Makefile.generated], - [${srcdir}/gen_makefile.sh "$myChips" > Makefile.generated], + [${srcdir}/gen_makefile.sh ${srcdir} "$myChips" > Makefile.generated], [myChips="$CHIPS"]) PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],, [AC_MSG_ERROR([Could not find phosphor-logging...openbmc/phosphor-logging package required])]) 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 |