diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-27 23:51:06 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-27 23:51:06 +0200 |
commit | 2ae2a896c10233c9e102193dfca473cbd941b6f4 (patch) | |
tree | 1ecb9d7fd3eb7c13debd871d35f9a075e24b9b2d /shellgenerator.py | |
parent | cd9475bfe51e5973f23601c6e51b333ea7883fbd (diff) | |
download | meson-2ae2a896c10233c9e102193dfca473cbd941b6f4.zip meson-2ae2a896c10233c9e102193dfca473cbd941b6f4.tar.gz meson-2ae2a896c10233c9e102193dfca473cbd941b6f4.tar.bz2 |
Added shared library versioning.
Diffstat (limited to 'shellgenerator.py')
-rwxr-xr-x | shellgenerator.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/shellgenerator.py b/shellgenerator.py index 863e06c..6792385 100755 --- a/shellgenerator.py +++ b/shellgenerator.py @@ -192,6 +192,7 @@ echo Run compile.sh before this or bad things will happen. outdir = libdir outfile.write('echo Installing "%s".\n' % name) self.copy_file(outfile, self.get_target_filename(t), outdir) + self.generate_shlib_aliases(t, outdir, outfile) def generate_tests(self, outfile): for t in self.build.get_tests(): @@ -326,6 +327,14 @@ echo Run compile.sh before this or bad things will happen. quoted = shell_quote(commands) outfile.write('\necho Generating pch \\"%s\\".\n' % pch) outfile.write(' '.join(quoted) + ' || exit\n') + + def generate_shlib_aliases(self, target, outdir, outfile): + basename = target.get_filename() + aliases = target.get_aliaslist() + for alias in aliases: + aliasfile = os.path.join(outdir, alias) + cmd = ['ln', '-s', '-f', basename, aliasfile] + outfile.write(' '.join(shell_quote(cmd)) + '|| exit\n') def generate_target(self, target, outfile): name = target.get_basename() @@ -340,6 +349,7 @@ echo Run compile.sh before this or bad things will happen. for src in target.get_sources(): obj_list.append(self.generate_single_compile(target, outfile, src)) self.generate_link(target, outfile, outname, obj_list) + self.generate_shlib_aliases(target, self.get_target_dir(target), outfile) self.processed_targets[name] = True if __name__ == '__main__': |