Changeset 32b4302 in mainline for tools/ew.py


Ignore:
Timestamp:
2019-08-18T19:06:02Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1c39d33b
Parents:
fa70134 (diff), 6c2fac18 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-18 19:06:02)
git-committer:
GitHub <noreply@…> (2019-08-18 19:06:02)
Message:

Merge pull request #174 from le-jzr/meson3

Convert HelenOS build system to Meson

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/ew.py

    rfa70134 r32b4302  
    3333"""
    3434
     35import inspect
    3536import os
     37import platform
     38import re
     39import subprocess
    3640import sys
    37 import subprocess
    38 import autotool
    39 import platform
    4041import thread
    4142import time
    4243
    4344overrides = {}
     45
     46CONFIG = 'Makefile.config'
     47
     48TOOLS_DIR = os.path.dirname(inspect.getabsfile(inspect.currentframe()))
     49
     50def read_config():
     51        "Read HelenOS build configuration"
     52
     53        inf = open(CONFIG, 'r')
     54        config = {}
     55
     56        for line in inf:
     57                res = re.match(r'^(?:#!# )?([^#]\w*)\s*=\s*(.*?)\s*$', line)
     58                if (res):
     59                        config[res.group(1)] = res.group(2)
     60
     61        inf.close()
     62        return config
    4463
    4564def is_override(str):
     
    164183def hdisk_mk():
    165184        if not os.path.exists('hdisk.img'):
    166                 subprocess.call('tools/mkfat.py 1048576 uspace/dist/data hdisk.img', shell = True)
     185                subprocess.call(TOOLS_DIR + '/mkfat.py 1048576 dist/data hdisk.img', shell = True)
    167186
    168187def qemu_bd_options():
     
    298317
    299318def ski_run(platform, machine, processor):
    300         run_in_console('ski -i tools/conf/ski.conf', 'HelenOS/ia64 on ski')
     319        run_in_console('ski -i ' + TOOLS_DIR + '/conf/ski.conf', 'HelenOS/ia64 on ski')
    301320
    302321def msim_run(platform, machine, processor):
    303322        hdisk_mk()
    304         run_in_console('msim -c tools/conf/msim.conf', 'HelenOS/mips32 on msim')
     323        run_in_console('msim -c ' + TOOLS_DIR + '/conf/msim.conf', 'HelenOS/mips32 on msim')
    305324
    306325def spike_run(platform, machine, processor):
     
    495514                        exit()
    496515
    497         config = {}
    498         autotool.read_config(autotool.CONFIG, config)
     516        config = read_config()
    499517
    500518        if 'PLATFORM' in config.keys():
Note: See TracChangeset for help on using the changeset viewer.