Multifrequency observations of blazars. 5: Long-term millimeter, submillimeter, and infrared monitoring