fare il passo secondo la gamba

Etymology
lit. 'make a step according to one's leg'.

Verb

 * 1)  to cut one's coat according to one's cloth