Among the 40 films he helmed were several World War II epics; Alfie, which earned five Oscar nominations and made a star of Michael Caine; the Bond titles You Only Live Twice, The Spy Who Loved Me, and Moonraker; and Educating Rita and Shirley Valentine.