Building: better handling of deprecated