|
Igor Gnatenko |
511817 |
From 7fdea0243db634c7ea2262826778d4eac3e8eb29 Mon Sep 17 00:00:00 2001
|
|
Igor Gnatenko |
511817 |
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
Igor Gnatenko |
511817 |
Date: Wed, 12 Oct 2016 20:58:33 -0400
|
|
Igor Gnatenko |
511817 |
Subject: [PATCH 10/10] Split generator @BASENAME@ at the first extension.
|
|
Igor Gnatenko |
511817 |
|
|
Igor Gnatenko |
511817 |
(cherry picked from commit 779788ad82166db028488f68ec90258d4ca63c7d)
|
|
Igor Gnatenko |
511817 |
---
|
|
Igor Gnatenko |
511817 |
mesonbuild/build.py | 4 ++--
|
|
Igor Gnatenko |
511817 |
test cases/common/118 allgenerate/meson.build | 4 ++--
|
|
Igor Gnatenko |
511817 |
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
Igor Gnatenko |
511817 |
|
|
Igor Gnatenko |
511817 |
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
|
|
Igor Gnatenko |
511817 |
index 1ef183b..23a5f4c 100644
|
|
Igor Gnatenko |
511817 |
--- a/mesonbuild/build.py
|
|
Igor Gnatenko |
511817 |
+++ b/mesonbuild/build.py
|
|
Igor Gnatenko |
511817 |
@@ -733,14 +733,14 @@ class Generator():
|
|
Igor Gnatenko |
511817 |
|
|
Igor Gnatenko |
511817 |
def get_base_outnames(self, inname):
|
|
Igor Gnatenko |
511817 |
plainname = os.path.split(inname)[1]
|
|
Igor Gnatenko |
511817 |
- basename = plainname.split('.')[0]
|
|
Igor Gnatenko |
511817 |
+ basename = os.path.splitext(plainname)[0]
|
|
Igor Gnatenko |
511817 |
return [x.replace('@BASENAME@', basename).replace('@PLAINNAME@', plainname) for x in self.outputs]
|
|
Igor Gnatenko |
511817 |
|
|
Igor Gnatenko |
511817 |
def get_dep_outname(self, inname):
|
|
Igor Gnatenko |
511817 |
if self.depfile is None:
|
|
Igor Gnatenko |
511817 |
raise InvalidArguments('Tried to get dep name for rule that does not have dependency file defined.')
|
|
Igor Gnatenko |
511817 |
plainname = os.path.split(inname)[1]
|
|
Igor Gnatenko |
511817 |
- basename = plainname.split('.')[0]
|
|
Igor Gnatenko |
511817 |
+ basename = os.path.splitext(plainname)[0]
|
|
Igor Gnatenko |
511817 |
return self.depfile.replace('@BASENAME@', basename).replace('@PLAINNAME@', plainname)
|
|
Igor Gnatenko |
511817 |
|
|
Igor Gnatenko |
511817 |
def get_arglist(self):
|
|
Igor Gnatenko |
511817 |
diff --git a/test cases/common/118 allgenerate/meson.build b/test cases/common/118 allgenerate/meson.build
|
|
Igor Gnatenko |
511817 |
index 1ec93e6..36abbe9 100644
|
|
Igor Gnatenko |
511817 |
--- a/test cases/common/118 allgenerate/meson.build
|
|
Igor Gnatenko |
511817 |
+++ b/test cases/common/118 allgenerate/meson.build
|
|
Igor Gnatenko |
511817 |
@@ -5,7 +5,7 @@ project('all sources generated', 'c', 'cpp')
|
|
Igor Gnatenko |
511817 |
comp = find_program('converter.py')
|
|
Igor Gnatenko |
511817 |
|
|
Igor Gnatenko |
511817 |
g = generator(comp,
|
|
Igor Gnatenko |
511817 |
- output : '@BASENAME@.cpp',
|
|
Igor Gnatenko |
511817 |
+ output : '@BASENAME@',
|
|
Igor Gnatenko |
511817 |
arguments : ['@INPUT@', '@OUTPUT@'])
|
|
Igor Gnatenko |
511817 |
|
|
Igor Gnatenko |
511817 |
c = g.process('foobar.cpp.in')
|
|
Igor Gnatenko |
511817 |
@@ -17,4 +17,4 @@ c2 = custom_target('c2gen',
|
|
Igor Gnatenko |
511817 |
input : 'foobar.cpp.in',
|
|
Igor Gnatenko |
511817 |
command : [comp, '@INPUT@', '@OUTPUT@'])
|
|
Igor Gnatenko |
511817 |
|
|
Igor Gnatenko |
511817 |
-prog2 = executable('genexe2', c2)
|
|
Igor Gnatenko |
511817 |
\ No newline at end of file
|
|
Igor Gnatenko |
511817 |
+prog2 = executable('genexe2', c2)
|
|
Igor Gnatenko |
511817 |
--
|
|
Igor Gnatenko |
511817 |
2.10.1
|
|
Igor Gnatenko |
511817 |
|