Build: Fix pdf document build

CMake fails to generate proper rules for PDF generation both for the
Reference Manual (doxygen) and for the user Guide. The problem is
caused by CMAKE_MAKE_PROGRAM not being set when the document creation
targets are defined. As a result CMake generates "empty" targets which
do not execute the final step of PDF generation. The problem was
triggered by project re-organization.

To fix the problem document generation files are included after the
project() command. Also the defined state of CMAKE_MAKE_PROGRAM is
verified and a meaningful error message is printed to make the build
more robust.

In addition
- I made some minor changes to make the document build related cmake
  files more consistent.
- Fixed spelling issues.

Change-Id: Id5d8dc756a50b3fee8966b51461ad3607d2027b4
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
diff --git a/cmake/Common/BuildDoxygenDoc.cmake b/cmake/Common/BuildDoxygenDoc.cmake
index f98c0f9..a56898b 100644
--- a/cmake/Common/BuildDoxygenDoc.cmake
+++ b/cmake/Common/BuildDoxygenDoc.cmake
@@ -119,8 +119,14 @@
 	#If PDF documentation is being made.
 	if (LATEX_PDFLATEX_FOUND)
 		if (NOT CMAKE_GENERATOR MATCHES "Makefiles")
-			message(WARNING "make tool is missing. PDF document generation target is not created.")
+			message(WARNING "Generator is not make based. PDF document generation target is not created.")
 		else()
+			#This file shall not be included before cmake did finish finding the make tool and thus
+			#setting CMAKE_MAKE_PROGRAM. Currently the search is triggered by the project() command.
+			if(NOT CMAKE_MAKE_PROGRAM)
+				message(FATAL_ERROR "CMAKE_MAKE_PROGRAM is not set. This file must be included after the project command is run.")
+			endif()
+
 			#The add_custom_command is not used here to get proper clean
 			#command since the clean rules "added" above will remove the entire
 			#doc directory, and thus clean the PDF output too.