Nothing illegal about making your own gun. You cannot pay someone else to do the work for you, it has to be done by you. You can never sell the gun since only licensed guns are allowed to be sold.
You cannot legally manufacture a firearm intended for sale without having an appropriate FFL (and ITAR certification, etc.)
You can absolutely manufacture a firearm for your own use, and then at a later date, sell that firearm.
In reality, there is little reason to do this. In many states you do not need to retain documentation of the re-sale (private sale) of a firearm, so you can always tell "the man" that you sold that gun years ago when they want to take all your guns.
I wonder what the law is for making them part of your estate.