A few more Windows fixes.

pull/15/head
Jussi Pakkanen 12 years ago
parent 7ced6d2071
commit 921bce638b
  1. 6
      backends.py
  2. 9
      meson.py

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os, stat, re, pickle
import os, sys, stat, re, pickle
import interpreter, nodes
import environment
from meson_install import InstallData
@ -295,7 +295,7 @@ class NinjaBackend(Backend):
elem = NinjaBuildElement('install', 'CUSTOM_COMMAND', '')
elem.add_dep('all')
elem.add_item('DESC', 'Installing files.')
elem.add_item('COMMAND', [install_script, install_data_file])
elem.add_item('COMMAND', [sys.executable, install_script, install_data_file])
elem.write(outfile)
self.generate_target_install(d)
@ -359,7 +359,7 @@ class NinjaBackend(Backend):
test_script = os.path.join(script_root, 'meson_test.py')
test_data = os.path.join(self.environment.get_scratch_dir(), 'meson_test_setup.dat')
elem = NinjaBuildElement('test', 'CUSTOM_COMMAND', '')
elem.add_item('COMMAND', [test_script, test_data])
elem.add_item('COMMAND', [sys.executable, test_script, test_data])
elem.add_item('DESC', 'Running test suite.')
elem.write(outfile)

@ -30,7 +30,12 @@ build_types = ['plain', 'debug', 'optimized']
buildtype_help = 'build type, one of: %s' % ', '.join(build_types)
buildtype_help += ' (default: %default)'
parser.add_option('--prefix', default='/usr/local', dest='prefix',
if environment.is_windows():
def_prefix = 'c:/'
else:
def_prefix = '/usr/local'
parser.add_option('--prefix', default=def_prefix, dest='prefix',
help='the installation prefix (default: %default)')
parser.add_option('--libdir', default='lib', dest='libdir',
help='the installation subdir of libraries (default: %default)')
@ -55,7 +60,7 @@ class MesonApp():
def __init__(self, dir1, dir2, script_file, options):
(self.source_dir, self.build_dir) = self.validate_dirs(dir1, dir2)
if options.prefix[0] != '/':
if not os.path.isabs(options.prefix):
raise RuntimeError('--prefix must be an absolute path.')
self.meson_script_file = script_file
self.options = options

Loading…
Cancel
Save