blob: f5150fc638628af7c1e1a6f00799a9deb5260520 [file] [log] [blame]
Matt Spinler12bdf052017-03-09 16:01:39 -06001#!/bin/bash
2
3files=()
Matt Spinlercc2403c2017-03-17 11:07:06 -05004dir=$1
5args=("$@")
6
Matt Spinler12bdf052017-03-09 16:01:39 -06007echo "openpower_procedures_cpp_files = \\"
Matt Spinlercc2403c2017-03-17 11:07:06 -05008for ((i=1; i<${#args[@]}; ++i));
Matt Spinler12bdf052017-03-09 16:01:39 -06009do
Matt Spinlercc2403c2017-03-17 11:07:06 -050010 type=${args[$i]}
Matt Spinler12bdf052017-03-09 16:01:39 -060011 type=${type// /} #remove spaces
Matt Spinlercc2403c2017-03-17 11:07:06 -050012 for file in $(ls $dir/procedures/$type/*.cpp);
Matt Spinler12bdf052017-03-09 16:01:39 -060013 do
14 files+=($file)
15 done
16done
17
18for file in ${files[@]};
19do
20 echo " $file \\"
21done
22echo
23
24cat << MAKEFILE
25openpower_procedures.cpp: \$(openpower_procedures_cpp_files)
26 cat \$^ > \$@
27
28MAKEFILE