From 3508e71168e5aa8c47159d019c3dfba4312f9c70 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 8 Jul 2010 18:45:54 +1200 Subject: [PATCH] Automatically run ralint when building from makefile. Also fixes external-tool logging crash --- Makefile | 13 +++++++++++-- OpenRA.Game/GameRules/Rules.cs | 6 ------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 6ee6eaf034..1434e84679 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ CSC = gmcs CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe DEFINE = DEBUG;TRACE -PROGRAMS =fileformats gl game ra cnc aftermath seqed mapcvtr editor +PROGRAMS =fileformats gl game ra cnc aftermath seqed mapcvtr editor ralint prefix = /usr/local datarootdir = $(prefix)/share datadir = $(datarootdir) @@ -73,12 +73,20 @@ mapcvtr_KIND = winexe mapcvtr_DEPS = $(fileformats_TARGET) mapcvtr_LIBS = $(COMMON_LIBS) $(mapcvtr_DEPS) +ralint_SRCS = $(shell find RALint/ -iname '*.cs') +ralint_TARGET = ralint.exe +ralint_KIND = winexe +ralint_DEPS = $(fileformats_TARGET) $(game_TARGET) +ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS) + # -platform:x86 .SUFFIXES: .PHONY: clean all default mods seqed mapcvtr install uninstall -all: $(fileformats_TARGET) $(gl_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET) $(seqed_TARGET) $(mapcvtr_TARGET) +all: $(fileformats_TARGET) $(gl_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET) $(seqed_TARGET) $(mapcvtr_TARGET) $(editor_TARGET) $(ralint_TARGET) + mono ralint.exe ra + mono ralint.exe cnc clean: @-rm *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb @@ -126,6 +134,7 @@ mods: $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET) seqed: $(seqed_TARGET) mapcvtr: $(mapcvtr_TARGET) editor: $(editor_TARGET) +ralint: $(ralint_TARGET) define BUILD_ASSEMBLY diff --git a/OpenRA.Game/GameRules/Rules.cs b/OpenRA.Game/GameRules/Rules.cs index 8a79214a18..0cdfb65c0f 100755 --- a/OpenRA.Game/GameRules/Rules.cs +++ b/OpenRA.Game/GameRules/Rules.cs @@ -38,12 +38,6 @@ namespace OpenRA public static void LoadRules(Manifest m, Map map) { - Log.Write("debug", "Using rules files: "); - foreach (var y in m.Rules) - Log.Write("debug", " -- {0}", y); - - Log.Write("debug", "Using Map: {0}",map.Uid); - Info = LoadYamlRules(m.Rules, map.Rules, (k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y)); Weapons = LoadYamlRules(m.Weapons, map.Weapons, (k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value)); Voices = LoadYamlRules(m.Voices, map.Voices, (k, _) => new VoiceInfo(k.Value));