V+기만 하면 can be used in two difference ways
(1) "Whenever One Does V" which is same meaning of "V+을 때마다"
나는 술을 마시기만 하면 졸아요.
Whenever I drink I get sleepy.
나는 생선을 먹기만 하면 배가 아파요.
Whenever I eat fish my stomach hurts.
(2) Only If V or as long as V
돈을 벌기만 하면 집을 장만할 수 있어요.
Only if I save money will I be able to buy a house.