Changeset a8ccc7e in mainline
- Timestamp:
- 2019-08-17T12:49:43Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2b2783b
- Parents:
- 7b1ae09
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-27 10:50:12)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-17 12:49:43)
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
install.sh
r7b1ae09 ra8ccc7e 34 34 fi 35 35 36 # Due to certain quirks of our build, executables need to be built with a different name than what they are installed with.37 # Meson doesn't support renaming installed files (at least not as of mid-2019) so we do it here manually.38 39 echo "######## Installing executables ########"40 41 cd ${MESON_BUILD_ROOT}/uspace42 43 find -name 'install@*' |44 sed -e 'h; s:^.*/install@:@DESTDIR@:; s:\$:/:g; x; G; s:\s: :g' -e "s:@DESTDIR@:${MESON_INSTALL_DESTDIR_PREFIX}:g" |45 xargs -L1 --verbose install -C -D -m755 -T46 47 36 ) > ${MESON_BUILD_ROOT}/install_custom.log 2>&1 -
uspace/meson.build
r7b1ae09 ra8ccc7e 133 133 endforeach 134 134 135 install_script_text = [] 136 135 137 foreach tst : bin_targets 136 138 _ldargs = tst.get('link_args') 137 139 _src = tst.get('src') 138 140 139 _install_dir = tst.get('install_dir').split('/')140 _install_dir += tst.get('basename')141 141 _install = tst.get('install') 142 _install_dir = tst.get('install_dir') 143 _basename = tst.get('basename') 144 _full_install_path = _install_dir / _basename 145 _build_name = _full_install_path.underscorify() 146 _full_build_name = meson.current_build_dir() / _build_name 142 147 143 148 if _install 144 _install_name = 'install@' + '$'.join(_install_dir) 145 else 146 _install_name = '_'.join(_install_dir) 147 endif 148 149 if _install and install_debug_files 150 _debug_name = 'install@' + '$'.join([ 'debug' ] + _install_dir) 151 else 152 _debug_name = '_'.join(_install_dir) 149 # Due to certain quirks of our build, executables need to be built with a different name than what they are installed with. 150 # Meson doesn't support renaming installed files (at least not as of mid-2019) so we do it here manually. 151 152 install_script_text += [ 153 'mkdir -p ${MESON_INSTALL_DESTDIR_PREFIX}"@0@"'.format(_install_dir), 154 'cp "@0@" ${MESON_INSTALL_DESTDIR_PREFIX}"@1@"'.format(_full_build_name, _full_install_path), 155 ] 156 157 if install_debug_files 158 install_script_text += [ 159 'cp "@0@".disasm ${MESON_INSTALL_DESTDIR_PREFIX}debug/"@1@".disasm'.format(_full_build_name, _full_install_path), 160 'cp "@0@".map ${MESON_INSTALL_DESTDIR_PREFIX}debug/"@1@".map'.format(_full_build_name, _full_install_path) 161 ] 162 endif 153 163 endif 154 164 155 165 if link_map 156 166 # We want linker to generate link map for debugging. 157 _ldargs += [ '-Wl,-Map,' + meson.current_build_dir() / _debug_name + '.map' ]158 endif 159 160 _bin = executable(_ install_name, _src,167 _ldargs += [ '-Wl,-Map,' + _full_build_name + '.map' ] 168 endif 169 170 _bin = executable(_build_name, _src, 161 171 include_directories: tst.get('includes'), 162 172 dependencies: tst.get('dependencies'), … … 167 177 implicit_include_directories: false, 168 178 install: false, 169 #install_dir: tst.get('install_dir'),179 #install_dir: _install_dir, 170 180 build_by_default: true, 171 181 ) 172 182 173 183 if disassemble 174 custom_target(_ debug_name + '.disasm',184 custom_target(_build_name + '.disasm', 175 185 command: [ objdump, '-S', '@INPUT@' ], 176 186 input: _bin, 177 output: _ debug_name + '.disasm',187 output: _build_name + '.disasm', 178 188 capture: true, 179 189 install: false, 180 #install_dir: 'debug' / tst.get('install_dir'),190 #install_dir: 'debug' / _install_dir, 181 191 build_by_default: true, 182 192 ) 183 193 endif 184 194 endforeach 195 196 # Emit and register the install script. 197 198 configure_file( 199 configuration: { 'text' : '\n'.join(install_script_text) }, 200 input: 'install.sh.in', 201 output: 'install.sh', 202 ) 203 204 meson.add_install_script(meson.current_build_dir() / 'install.sh')
Note:
See TracChangeset
for help on using the changeset viewer.