Improve build scipts

String for log message for subdriectories is now generated
automatically.