Eliminate wesconfig.h includes where they are no longer needed.

Fix a minor Windows porting bug due to a typo (WIN32 -> _WIN32).

Make game_config.o explicitly dependent on the verion stamp file in scons.
This commit is contained in:
Eric S. Raymond 2008-03-26 10:41:50 +00:00
parent ef16256317
commit 03a5505e4e
7 changed files with 7 additions and 11 deletions

View file

@ -435,10 +435,11 @@ env.Program("test", test_sources,
# FIXME: Include this in gameconfig.cpp when we switch over to scons.
# Because of the content check, scons will do the right thing.
# At that point -DSVNREV can be removed from CXXFLAGS.
#r = env.Command("revision_stamp.h", [],
# 'echo "#define REVISION \"%s\"" >revision_stamp.h' % svnrev)
#env.AlwaysBuild(r)
# At that point the following line and -DSVNREV can be removed from CXXFLAGS.
env.Depends('src/game_config.o', 'revision_stamp.h')
r = env.Command("revision_stamp.h", [],
'echo "#define REVISION \"%s\"" >revision_stamp.h' % svnrev)
env.AlwaysBuild(r)
#
# File inventory, for archive makes abd analysis tools

View file

@ -17,7 +17,6 @@
//! @file ai.cpp
//! Artificial intelligence - The computer commands the enemy.
#include "wesconfig.h"
#include "ai.hpp"
#include "ai2.hpp"
#include "ai_dfool.hpp"

View file

@ -38,8 +38,6 @@
supposed to be catched by user scripts.
*/
#include "wesconfig.h"
#ifdef HAVE_PYTHON
#include "global.hpp"

View file

@ -371,7 +371,7 @@ std::string get_cwd()
if(res != NULL) {
std::string str(res);
#ifdef WIN32
#ifdef _WIN32
std::replace(str.begin(),str.end(),'\\','/');
#endif

View file

@ -49,7 +49,6 @@
#include "titlescreen.hpp"
#include "util.hpp"
#include "upload_log.hpp"
#include "wesconfig.h"
#include "wml_exception.hpp"
#include "wml_separators.hpp"
#include "serialization/binary_or_text.hpp"
@ -285,6 +284,7 @@ game_controller::game_controller(int argc, char** argv)
}
}
std::cerr << "Data at '" << game_config::path << "'\n";
// disable sound in nosound mode, or when sound engine failed to initialize
if (no_sound || ((preferences::sound_on() || preferences::music_on() ||

View file

@ -29,7 +29,6 @@
#include "statistics.hpp"
#include "show_dialog.hpp"
#include "serialization/string_utils.hpp"
#include "wesconfig.h"
#include <cassert>

View file

@ -40,7 +40,6 @@
#include "video.hpp"
#include "serialization/parser.hpp"
#include "serialization/preprocessor.hpp"
#include "wesconfig.h"
#include <algorithm>
#include "SDL_ttf.h"