makefile.xml: add folding to GNU make conditionals and updated test
also shared some common rules
Reviewers: #framework_syntax_hightlighting, vkrause
Reviewed By: #framework_syntax_hightlighting, vkrause
Differential Revision: https://phabricator.kde.org/D3621