The ambiguity of exchange-energy densities is a fundamental challenge for the development of local hybrid functionals, or of other functionals based on a local mixing of exchange-energy densities. In this work, a systematic construction of semi-local calibration functions (CFs) for adjusting the exchangeenergy densities in local hybrid functionals is provided, which directly links a given CF to an underlying semi-local exchange functional, as well as to the second-order gradient expansion of the exchange hole. Using successive steps of integration by parts allows the derivation of correction terms of increasing order, resulting in more and more complicated but also more flexible CFs. We derive explicit first-and second-order CFs (pig1 and pig2) based on B88 generalized-gradient approximation (GGA) exchange, and a first-order CF (tpig1) based on t-dependent B98 meta-GGA exchange. We combine these CFs with different long-range damping functions and evaluate them for calibration of LDA, B88 GGA, and TPSS meta-GGA exchange-energy densities. Based on a minimization of unphysical nondynamical correlation contributions in three noble-gas dimer potential-energy curves, free parameters in the CFs are optimized, and performance of various approaches in the calibration of different exchangeenergy densities is compared. Most notably, the second-order pig2 CF provides the largest flexibility with respect to the diffuseness of the damping function. This suggests that higher-order CFs based on the present integration-by-parts scheme may be particularly suitable for the flexible construction of local hybrid functionals.