Commit graph

1051 commits

Author SHA1 Message Date
Kp de219e3d48 Enable -Wshadow
All shadow warnings in the default build have been fixed.  Enable
-Wshadow by default to flag any new instances.
2016-05-22 17:50:13 +00:00
Kp 443b1f2915 Add file/line to valptridx output when available 2016-04-06 03:34:13 +00:00
Kp 27cef20eb3 Move namespace dsx handling to dsx-ns.h 2016-03-19 19:08:10 +00:00
Kp 20e72128de Add configure test and fallback code to support ancient Windows
Windows 2000 has no support for getaddrinfo.  Five years ago (Apr 5
2011), the addition of tracker support
(7f18afd5d7) brought a requirement for
getaddrinfo.  Recently, someone with a working Windows 2000 system
reported that Rebirth no longer starts on Windows 2000.  Although such
systems should not be connected to the Internet, they may still need
name resolution on a LAN.  Add a configure test to probe for getaddrinfo
support and fall back to gethostbyname if needed.

Compiling a binary that works on Windows 2000 requires one of:
* using an ancient SDK that does not declare getaddrinfo
* defining _WIN32_WINNT to exclude Windows XP support
* overriding the SConf test to force failure

Fixes: 7f18afd5d7 ("Client-side implementation for Tracker support by Matt 1360 Vandermeulen including improvements in udp_dns_filladdr and IPv4/IPv6 compability; Very little adjustments by me, too including IPv6 support for Windows (untested); Actual tracker code will follow later as seperate branch when it's done")
2016-03-18 02:05:16 +00:00
Kp 254feabd3a Tabs are 4 spaces 2016-03-02 02:52:44 +00:00
Kp 401f5581c8 Remove guessed -lSDL on OS X
OS X handles linking differently than other platforms.  Asking to link
to SDL breaks the test.
2016-02-23 04:18:13 +00:00
Kp 42ef6b2e72 Add applelink to Darwin tools 2016-02-23 04:18:13 +00:00
Kp 3cb4d99a49 Remove dsx safety net for clang
Clang becomes confused trying to resolve X::a when:
- both `namespace ::X` and `class ::B::X` exist
- `using namespace B;` is active

even if class ::B::X is only a forward-declaration.  Add an SConf test
to recognize when the compiler rejects this pattern and hide the safety
nets that are implemented using it.
2016-02-06 22:12:55 +00:00
Kp fa8ceaeb5f Use extend for OGL defines
Fixes: 04e3c1e9a3 ("Move OpenGL cpp flag tracking to SConf")
2016-02-03 03:00:32 +00:00
Kp 30783846fe Improve SCons ipv6 option documentation 2016-02-02 03:10:53 +00:00
Kp 42a1c560cd Move UDP cpp processing to sconf 2016-01-26 03:45:08 +00:00
Kp cb4600456d Move IPv6 cpp processing to sconf 2016-01-26 03:45:07 +00:00
Kp d35a51e766 Move editor cpp processing to sconf 2016-01-26 03:45:07 +00:00
Kp 29740cf80c Move memdebug cpp processing to sconf 2016-01-26 03:45:07 +00:00
Kp e73e44de79 Move developer-mode cpp processing to sconf 2016-01-26 03:45:07 +00:00
Kp 04e3c1e9a3 Move OpenGL cpp flag tracking to SConf 2016-01-26 03:45:07 +00:00
Kp 1a11370084 Pass archive to prepare_environment 2016-01-26 03:45:07 +00:00
Kp 7b2426fd3e Add gcc to Darwin tool list 2016-01-21 03:57:38 +00:00
Kp 5d7796c344 Swap single/double quote due to Windows shell bug
Microsoft cmd.exe has strange quoting rules.  Where other shells treat
single quote as a quote character, cmd.exe seems to pass it through to
the underlying process.  This breaks the vers_id compilation with
strange error messages.  In practice, SCons does not need the
no-interpolation semantics that single quote provides, so switch to
double quote for compatibility with Windows.  This is probably slightly
less efficient on Bash, since it will now scan the value for expansions.
However, the efficiency loss is tiny compared to overhead elsewhere in
the build.
2016-01-19 04:29:34 +00:00
Kp 65790ec925 Guess pkg-config flags when pkg-config is missing/broken 2016-01-13 04:33:44 +00:00
Kp 15e4130e1a Write more sconf actions to sconf.log 2016-01-12 03:28:45 +00:00
Kp 1e28cb52e3 Remove explicit assignment of subprocess.Popen(executable)
Windows systems get confused and fail to find the process if the
executable name is assigned.
2016-01-09 16:38:15 +00:00
Kp 0a2ef79242 Remove close_fds=True from StaticSubprocess
Per the documentation, on Linux, the default is true.  On Windows,
setting it to true causes a Python exception because Windows relies on
disabling inheritance as a hack to close all descriptors, but
inheritance needs to be enabled to capture the output of the child
process.

Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/173>
Fixes: bb3f414128 ("Cache scons subprocess calls")
2016-01-03 20:21:36 +00:00
Kp ba17de4cd5 Add -Wuninitialized to default warning options 2016-01-03 20:21:35 +00:00
Kp 26e948d5f1 Uninline namespace dsx 2015-12-13 18:00:49 +00:00
Kp dc8c0323d8 Uninline namespace dcx 2015-12-13 18:00:49 +00:00
Kp 30cb6d8c8d Improve dcx/dsx comments
Move the boilerplate up onto the outer namespace line.  Decorate each
collision with a comment stating its purpose, so that compiler error
output echoes the type of collision.
2015-12-13 18:00:48 +00:00
Kp 80ea17a61c Convert OSError to StopError for failed tool version checks 2015-12-11 03:39:40 +00:00
Kp 69c5a79058 Use inline namespace dcx for common/2d 2015-12-05 22:57:23 +00:00
Kp 60e6c23ccc Always pass tuple for argument prefix list
Fixes: dd59be7163 ("Cache various SConstruct temporaries")
2015-12-04 03:36:33 +00:00
Kp ff51ff5474 Copy sdl-config CPPDEFINES before modification
Fixes: 6111e5adbf ("Allow configuring max joysticks at build time")
2015-12-04 03:36:32 +00:00
Kp dd59be7163 Cache various SConstruct temporaries
This started as a project to make SConstruct take less time on an empty
build.  Unforunately, most of the major gains lie elsewhere and require
deeper changes to the build system.  These changes do not help much, but
they are better than nothing.
2015-12-03 03:26:49 +00:00
Kp 3528acb78d Add $DXX_EFFECTIVE_SOURCE to check_header_includes dependencies 2015-11-24 04:05:35 +00:00
Kp a2b4dcbd9c Use $DXX_EFFECTIVE_SOURCE for quiet header check builds 2015-11-24 04:05:35 +00:00
Kp 7b4eeb8c0c Suppress debug info for check_header_includes outputs 2015-11-17 03:31:21 +00:00
Kp d36e86f8bc Factor out some Scons None assignments 2015-11-14 18:17:22 +00:00
Kp 0c86fd507d Fix mingw32 build
Fixes: 38df160341 ("Create platform_settings, env on first use")
2015-11-07 21:56:00 +00:00
Kp 6111e5adbf Allow configuring max joysticks at build time 2015-11-01 21:15:40 +00:00
Kp 139f2aaa44 Reduce scope of LazyObjectConstructor.__strip_extension 2015-11-01 21:15:39 +00:00
Kp 0a041018c8 Let register_cpp_output_targets see check_header_includes 2015-11-01 21:15:39 +00:00
Kp 83f1a94ec4 Move __shared_header_file_list to create_header_targets 2015-11-01 21:15:39 +00:00
Kp afb1fc3383 Remove special-case for profiler support
Stackable build profiles allow this to be specified without a special
case in SConstruct.
2015-11-01 21:15:39 +00:00
Kp f5dfa1a3b2 Inline banner() 2015-11-01 21:15:39 +00:00
Kp 38df160341 Create platform_settings, env on first use 2015-11-01 21:15:39 +00:00
Kp b35ef80a0f Reduce global lookups 2015-11-01 21:15:38 +00:00
Kp bab5f5f1be Reduce env lookups 2015-11-01 21:15:38 +00:00
Kp e86e1a882a Combine adjacent env.Append calls 2015-10-29 03:01:42 +00:00
Kp fd51188e57 Simplify DXXCommon instance counter 2015-10-29 03:01:42 +00:00
Kp 9c4a4e3cf8 Remove unnecessary __init__ methods 2015-10-28 02:44:36 +00:00
Kp def268faf9 Combine lazy object caches 2015-10-28 02:44:36 +00:00