From d57b3d79bd5798bce8aba4e877b14916f40817c7 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 18 Jul 2014 23:12:14 +0300 Subject: [PATCH] C# file names always follow the windows standard. --- build.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index 040388478..59737689e 100644 --- a/build.py +++ b/build.py @@ -510,6 +510,8 @@ class Executable(BuildTarget): self.prefix = '' self.suffix = environment.get_exe_suffix() suffix = environment.get_exe_suffix() + if len(self.sources) > 0 and self.sources[0].endswith('.cs'): + suffix = 'exe' if suffix != '': self.filename = self.name + '.' + suffix else: @@ -519,6 +521,8 @@ class Executable(BuildTarget): class StaticLibrary(BuildTarget): def __init__(self, name, subdir, is_cross, sources, objects, environment, kwargs): super().__init__(name, subdir, is_cross, sources, objects, environment, kwargs) + if len(self.sources) > 0 and self.sources[0].endswith('.cs'): + raise InvalidArguments('Static libraries not supported for C#.') self.prefix = environment.get_static_lib_prefix() self.suffix = environment.get_static_lib_suffix() self.filename = self.prefix + self.name + '.' + self.suffix @@ -534,8 +538,12 @@ class SharedLibrary(BuildTarget): self.version = None self.soversion = None super().__init__(name, subdir, is_cross, sources, objects, environment, kwargs); - self.prefix = environment.get_shared_lib_prefix() - self.suffix = environment.get_shared_lib_suffix() + if len(self.sources) > 0 and self.sources[0].endswith('.cs'): + self.suffix = 'dll' + self.prefix = 'lib' + else: + self.prefix = environment.get_shared_lib_prefix() + self.suffix = environment.get_shared_lib_suffix() self.importsuffix = environment.get_import_lib_suffix() def get_shbase(self):