  We show how certain diffeomorphism-invariant functionals on differential
forms in dimensions 6,7 and 8 generate in a natural way special geometrical
structures in these dimensions: metrics of holonomy G2 and Spin(7), metrics
with weak holonomy SU(3) and G2, and a new and unexplored example in dimension
8. The general formalism becomes a practical tool for calculating homogeneous
or cohomogeneity one examples, and we illustrate this with some newly
discovered cases of Spin(7) and G2 metrics.
