Infrared and Raman investigation of the charge–density-wave state in rare-earth tri-telluride compounds