Every time I compile my premake5 project it compiles to Build/bin/ even though in the code it says targetdir "Build/bin/%{cfg.buildconfig}/" and this isn't only happening on Linux it also happens on windows. I believe it happens when premake5 parses my script since in the makefile it says TARGETDIR = Build/bin also this only happens with targetdir and objdir works as expexted.
You have a typo, it should be
%{cfg.buildcfg}not%{cfg.buildconfig}, i.e:See Tokens list