[packaging] make doc generation configurable as it takes a long time.