I recently came across this site and was very impressed by this thread.

If you like the Stevens Favourite and fancy building one for yourself, then look here to see how one amateur gunsmith made his. You will need more than just your Swiss Army knife for whittling metal, you have been warned. See:-
(You need to Login or Register to view media files and links) Impressive bit of machining. Good planing and layout. Takes a bit of patience to get thru a project like this.
As for square holes I've been looking for a square bit to do this but seem unable to find one.
As for real square holes there are many methods. Broaching is classic. I've heard tell of 3 foot long broaches to do the mortice on a falling block. Think $1K or more just for the broach to say nothing of the gentle (

) press needed to pull or push it.
If you have $$ then wire edm is the way to go. ~.0001 taper in the mortice. For an amateur sinker edm is easier but you still need a way to orbit for the last .005 or so. ECM (electrochemical machining might do) but doesn't get used much.
Drill and then carefully jig and use keyway broaches to clean out the corners would work but takes time and precision.
The easy way is to do what Picatinny Arsenal did for M-16 uppers.
Machine them in halves then EBM (electron beam weld together.
Oh, sure, everyone has an EBM in their basement.
Actually TIG or MIG works pretty well.
Now I'm going to run and hide while everyone blasts away.
Enjoy,
Harry