It is solely out of curiosity sparked by a random thought.
Yeah, it's an interesting question. (Assuming, hypothetically, the zombie apocalypse, or a really tough year in the stock portfolio, or an equivalent whatever -- LOL).
Ethanol is ridiculously easy to produce, in a dilute form, from anything with sugars. This can include waste materials (that would otherwise enrich the pig). Getting it to a motor vehicle friendly concentration is considerably more difficult, requiring substantial inputs of energy. Still, it should be possible. Though ethanol has considerably less energy per volume than gasoline, and home-brew would have less still.
Biodiesel, on the other hand, is based on plant oils -- fats.
These are the hardest things to produce. They are very hard on the land, they require layers of processing depending on the source, and then IIRC require methanol to process into a clean fuel. In other words, it's a crackpot proposition. In genuinely hard times, nobody with any sense will turn high-value food into fuel. You will instead feed the raw fat to your pig (or yourself, as needed).
The most direct option for producing fuel suited to an internal combustion engine is biomass burned externally to heat more biomass in a closed process. The result is a mixture of hydrogen, carbon monoxide, and traces of methane and various acids -- all quite flammable. This arrangement, though not exactly handy, has been in use for the better part of a century. Though IMO, it's handier for stationary use (run a small generator for example).
As far as motor fuel goes, I don't see N.America running out of natural gas for several decades, provided we can distribute the stuff. And natural gas burns quite well in internal combustion engines.