Some, like Lee Marvin's Monte Walsh, dealt with this passage in a bittersweet way -- a lot of tragedy and pathos leavened with some wry humor. Others, like Sam Peckinpah's The Wild Bunch, showed men and some women who stubbornly refused to change, dying with the death of their time on the stage.
And still others used straight-out crowd-pleasing comedy, like the 1969 Robert Mitchum-George Kennedy outing The Good Guys and the Bad Guys. Mitchum is James Flagg, the aging marshall of a town called Progress that looks to live up to its name and which is run by the sly Mayor Randolph Wilkens (Martin Balsam). To Wilkens, Flagg represents the past in a day of automobiles, paved sidewalks, curbed streets and forward thinking. When he comes forward saying he's had word the notorious outlaw Big John McKay (Kennedy) has been spotted nearby, Wilkens wants nothing to do with Flagg's anachronistic notions of posses and riding out to round up the ne'er-do-wells.
Kennedy himself has been left behind by time a little -- his role in the robber gang is not what Flagg thought, and a senseless killing pushes the two to team up to thwart the heist planned by Waco (David Carradine).
Mitchum and Kennedy work well together, offering ample evidence that the quarrelers-turned-buddies trope didn't originate in the 1980s. Both are really too young for the "time passed them by" bit; Mitchum was 52 when the movie was made but was born looking that old so it's hard to tell. Kennedy was only 45. Director Burt Kennedy (no relation to George) keeps the action humming and the humor light -- as one might expect from the director of James Garner's sly Support Your Local Gunfighter and Support Your Local Sheriff. David Carradine is appropriately grungy as the evil Waco, and Martin Balsam plays his stuffed-shirt, fast-talking mayor to the hilt -- Harvey Korman may have had him in mind when he was romping around as the evil Hedley Lamarr a few years later.
The Good Guys and the Bad Guys more or less goes through the motions, opening no new ground, taking on no new ideas and adding nothing to the Western that hadn't already been added by a couple dozen movies before it. But it's well-made, well-acted and a fun romp for anyone who's not interested in being a pretentious boob about forty-year-old movies.