Building a 50A RV extension cord can be a bit tricky, mostly because the "receptacle" part is not easy to find. The male "plug" is very common as all 50A motor homes have one. The PLUG is a NEMA N14-50P. The other end of the extension cord can terminate with a NEMA N14-50R or a NEMA N14-50C. The N14-50R you will find, such as at Home Depot, etc. are designed to be mounted in an electrical box of some sort. The best way to terminate the cord is to use the N14-50C, but that item is difficult to find, with your best bet being an electrical supply house. As you can see, the N14-50C can be connected directly onto the rubber cord without the use of a box and cover. Rubber cord would probably be 6/4 SEOOW, or similar.
NEMA N14-50P
NEMA N14-50R
NEMA N14-50C
6/4 SEOOW
Current price $4.39/ft