Legislation won't do anything here short of making people feel good.. There are many recipes available for black powder, or smokeless gun powder.. they are all made of components that are readily available..
In addition.. its very easy to make a gun... Granted it may not be very pretty, but it needs to be only functional.. as for casting the bullet.. (assuming you aren't building a shotgun).. even that is quite easy..
Keep in mind guns are a VERY old invention.. (lets use 1911 for a date since I am partially to the 1911 design).. The tools in 1911 were quite crude compared to what we have today. Manufacturing has gotten better, and as a result its much more simple to build a weapon. Bottom line.. if you want to make it.. there really is nothing anyone can do to stop you.
Perhaps a more logical approach (instead of trying to legislate them away) would be to accept that anyone can make one, and defend yourself accordingly.