Check ONOS_ROOT is set.

Even if the Makefile lives inside ONOS, ONOS_ROOT could not be set

Change-Id: Ifb3e383a43faa977d285219881ff3ae56c0769b7
diff --git a/pipelines/fabric/impl/src/main/resources/Makefile b/pipelines/fabric/impl/src/main/resources/Makefile
index 586319c..5353342 100644
--- a/pipelines/fabric/impl/src/main/resources/Makefile
+++ b/pipelines/fabric/impl/src/main/resources/Makefile
@@ -21,6 +21,9 @@
 		-DWITH_INT_SOURCE -DWITH_INT_TRANSIT -DWITH_INT_SINK"
 
 constants:
+ifndef ONOS_ROOT
+	$(error ONOS_ROOT is undefined)
+endif
 	docker run -v $(ONOS_ROOT):/onos -w /onos/tools/dev/bin \
 		--entrypoint ./onos-gen-p4-constants opennetworking/p4mn:stable \
 		-o /onos/pipelines/fabric/impl/src/main/java/org/onosproject/pipelines/fabric/impl/behaviour/FabricConstants.java \