context: In the American Old West of 1874, construction on a new railroad led by Lyle (Burton Gilliam) runs into quicksand. The route has to be changed, which will require it to go through Rock Ridge, a frontier town where everyone has the last name of "Johnson" (including a "Howard Johnson", a "Dr. Samuel Johnson", a "Van Johnson" and an "Olson N. Johnson"). The conniving State Attorney General Hedley Lamarr (Harvey Korman) wants to buy the land along the new railroad route cheaply by driving out the townspeople. He sends a gang of thugs, led by his flunky assistant Taggart (Slim Pickens), to scare them away, prompting the townsfolk to demand that Governor William J. Le Petomane (Mel Brooks) appoint a new sheriff. The Attorney General persuades the dim-witted Le Petomane to select Bart (Cleavon Little), a black railroad worker who was about to be hanged. (Bart had hit Taggart in the head with a shovel after Taggart ignored him and his black friend sinking in quicksand, deciding to save their handcar instead.) Lamarr believes a black lawman will so offend the townspeople that they will either abandon Rock Ridge or lynch the new sheriff, with either result paving the way for him to take over the town.With his quick wits and the assistance of drunken gunslinger Jim (Gene Wilder), also known as "The Waco Kid" ("I must have killed more men than Cecil B. DeMille"), Bart works to overcome the townsfolk's hostile reception. He defeats and befriends Mongo (Alex Karras), an immensely strong, slow-thinking (but surprisingly philosophical) henchman sent by Taggart and Lyle to kill Bart, and then beats German seductress-for-hire Lili von Shtupp (Madeline Kahn) at her own game. Lamarr is furious that his plans keep failing and decides to destroy Rock Ridge with a newly recruited and diverse army of thugs (which Lamarr characterized as ideally consisting of "rustlers, cutthroats, murderers, bounty hunters, desperadoes, mugs, pugs, thugs, nitwits, half-wits, dimwits, vipers, snipers, con men, Indian agents, Mexican bandits, muggers, buggerers, bushwhackers, hornswagglers, horse thieves, bull dykes, train robbers, bank robbers, ass kickers, shit kickers and Methodists").Bart now has 24 hours to come up with a "brilliant plan to save our town". He gathers the town, along with the railroad workers, 3 miles east of Rock Ridge to build a fake town as a diversion. The workers labor all night to complete their task. The sun rises on a fake town that's a perfect replica, down to the orange roof on Howard Johnson's outhouse. Bart realizes the town has no people in it, so it won't fool Lamarr's villains. Bart orders the townspeople to make "exact replicas of themselves," and leaves with Jim and Mongo to execute a plan that will slow the villains "to a crawl". The three construct a tollbooth labeled "Le Petomane Thruway", requiring Taggart's crew to pay 10¢ each to pass on their horses. ("Now what will that asshole think of next?" snaps Taggart.) Since no one in the raiding party has any change, Taggart sends someone back to town to "get a shitload of dimes".Once through the tollbooth, Lamarr's villains attack the fake town populated with dummies, which Bart boobytrapped with several dynamite bombs. Bart tries setting off the bombs but is unsuccessful as the detonator does not work. Jim is given the task of exploding the bombs, and fires his pistol at them. After the bombs explode, launching villains skyward, the Rock Ridgers attack the villains.The resulting fight between the townsfolk and Lamarr's army of thugs breaks the fourth wall, literally. The fight spills out from the Warner Bros. film lot into a neighboring musical set being directed by Buddy Bizarre (Dom DeLuise), then into the studio commissary, where a pie fight ensues. Taggart is knocked out when Mongo smashes his head on a cash register, and the fight finally pours out into the surrounding streets (specifically, Olive Avenue in Burbank). The citizens of Rock Ridge chase the villains back to town to destroy them, but Lamarr takes a taxi ". . . off this picture." He arrives at Grauman's Chinese Theatre to watch the "premiere" of Blazing Saddles. Unfortunately, he sees on the movie screen that Bart has arrived outside the theatre. Bart ends up killing Lamarr by shooting him in the groin. Bart and Jim then go into the theatre to watch the end of the film. The film ends with Bart leaving Rock Ridge, much to the sadness, of the townspeople and the railroad workers, for his work there is done. He intends to fight injustice in other parts of the world, which the townspeople and the railroad workers dismiss as "bullshit", and Bart admits it's simply getting dull around there. As he rides off, he finds Jim (who still has the popcorn that he bought at the theatre), and the two decide to go off to "nowhere special." They then hand in their horses and ride off (in a limousine) into the sunset
question: What does State Attorney Gereneral Hedley Lamarr want to build through Rock Ridge?
answer: A railroad