2
0
Эх сурвалжийг харах

Added preprocessor __MAKEDOCS__ conditional.

Mark Sibly 8 жил өмнө
parent
commit
08a3b0714b

+ 4 - 2
src/mx2cc/builder.monkey2

@@ -127,6 +127,8 @@ Class BuilderInstance
 			ppsyms["__DEBUG__"]="false"
 			ppsyms["__DEBUG__"]="false"
 			ppsyms["__RELEASE__"]="true"
 			ppsyms["__RELEASE__"]="true"
 		End
 		End
+		
+		ppsyms["__MAKEDOCS__"]=opts.makedocs ? "true" Else "false"
 
 
 		profileName=opts.target+"_"+opts.config
 		profileName=opts.target+"_"+opts.config
 		If opts.target="windows" And Int( GetEnv( "MX2_USE_MSVC" ) ) profileName+="_msvc"
 		If opts.target="windows" And Int( GetEnv( "MX2_USE_MSVC" ) ) profileName+="_msvc"
@@ -343,14 +345,14 @@ Class BuilderInstance
 					Scope.semanting.Pop()
 					Scope.semanting.Pop()
 
 
 				Else If Not semantStmts.Empty
 				Else If Not semantStmts.Empty
-		
+					
 					Local func:=semantStmts.Pop()
 					Local func:=semantStmts.Pop()
 					
 					
 					PNode.semanting.Push( func.fdecl )
 					PNode.semanting.Push( func.fdecl )
 					Scope.semanting.Push( Null )
 					Scope.semanting.Push( Null )
 					
 					
 					Try
 					Try
-						func.SemantStmts()
+						If Not opts.makedocs func.SemantStmts()
 			
 			
 					Catch ex:SemantEx
 					Catch ex:SemantEx
 					End
 					End