Currently, it looks like portclippy sorts variables just by their names without taking account a context. This leads to incorrect suggestions to move things around.
Created attachment 250239 [details] example Makefile (from net-p2p/tremotesf) Here's Makefile example which makes portclippy complaining no matter how we reshuffle variables.
Created attachment 250240 [details] portclippy output Here's portclippy report for example Makefile. For example, portclippy suggests putting CMAKE_OFF after CMAKE_ARGS, and this isn't possible -- first variable must stay inside '.if' above. IMO '.if blah ... .else ... .endif' should be considered as independent subsection which in turn can contain at least USE and USES_* variables, probably some others as well.