Would work with any centerfire gun, as long as you shot fast enough so the barrel didn't cool down, and had some cover over the meat so the heat didn't escape.
I wouldn't recommend trying it though because if your barrel heats up too much from all that sustained shooting, you might fry your barrel, not just the bacon, because machine guns are designed to take that many rounds through the barrel at a time, your average rifle is not.
That said, I want some bacon, so I'm gonna go to the shooting range.