Or, in the case of Hungary, make homelessness illegal entirely. https://edition.cnn.com/2018/10/15/europe/hungary-criminaliz... / http://abouthungary.hu/fundamental-law/qa-on-the-upcoming-am...
Homelessness is a complex social problem that requires quite a lot of social intervention work to fix. It's not something that can be papered over with a wooden shelter.