  The comprehensive generalization of summation-by-parts of Del Rey Fern\'andez
et al.\ (J. Comput. Phys., 266, 2014) is extended to approximations of second
derivatives with variable coefficients. This enables the construction of
second-derivative operators with one or more of the following characteristics:
i) non-repeating interior stencil, ii) nonuniform nodal distributions, and iii)
exclusion of one or both boundary nodes. Definitions are proposed that give
rise to generalized SBP operators that result in consistent, conservative, and
stable discretizations of PDEs with or without mixed derivatives. It is proven
that such operators can be constructed using a correction to the application of
the first-derivative operator twice that is the same as used for the
constant-coefficient operator. Moreover, for operators with a repeating
interior stencil, a decomposition is proposed that makes the application of
such operators particularly simple. A number of novel operators are
constructed, including operators on pseudo-spectral nodal distributions and
operators that have a repeating interior stencil, but unequal nodal spacing
near boundaries. The various operators are compared to the application of the
first-derivative operator twice in the context of the linear
convection-diffusion equation with constant and variable coefficients.
