Changeset e9ff39b in mainline


Ignore:
Timestamp:
2019-08-17T17:46:13Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45fdc55
Parents:
d162f1b
Message:

Explicitly check that PROFILE/MACHINE have not been reconfigured

File:
1 edited

Legend:

Unmodified
Added
Removed
  • meson/part/read_config/meson.build

    rd162f1b re9ff39b  
    4949        'CONFIG_USE_SHARED_LIBS',
    5050        'CROSS_TARGET',
     51        'MACHINE',
    5152        'OPTIMIZATION',
     53        'PLATFORM',
    5254        'PROCESSOR',
    5355        'QUADFLOAT',
     
    9496        'CONFIG_UDEBUG',
    9597        'CONFIG_VIA_CUDA',
    96         'MACHINE',
    9798        'MEMORY_MODEL',
    9899
     
    143144        endif
    144145endforeach
     146
     147# Check whether PLATFORM/MACHINE is unchanged
     148
     149_profile = '@0@/@1@'.format(PLATFORM, MACHINE)
     150_profile_file = meson.build_root() / 'prev_profile'
     151
     152_cmd = run_command('cat', _profile_file)
     153if _cmd.returncode() == 0
     154        _prev_profile = _cmd.stdout().strip()
     155
     156        if _prev_profile != _profile
     157                error('This build directory was initially configured for ' + _prev_profile +
     158                        ', but now is configured for ' + _profile + '. This is not supported.')
     159        endif
     160else
     161        run_command('sh', '-c', 'echo "' + _profile + '" > ' + _profile_file, check: true)
     162endif
Note: See TracChangeset for help on using the changeset viewer.