Revert "Move ecm_generate_pri_file below the definition of the target"
This reverts commit 05653e27b4adbc461f3b2697297623298dfcbe9a.