Assuming you get this error here is an easy fix.
Goto /yourcmdir/vendor/cyanogen/products and edit AndroidProducts.mk. It should look something like this
PRODUCT_MAKEFILES := \
Remove all the device .mk you don’t need and keep only the one you are compiling and already have the device tree.