Changeset b2695b9 in mainline


Ignore:
Timestamp:
2019-08-17T12:49:43Z (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:
123cd6d
Parents:
740e952
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-27 16:44:01)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-17 12:49:43)
Message:

More tweaks and switch to building the dist directory during the build stage, not install stage

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r740e952 rb2695b9  
    7979meson: $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(ERRNO_HEADER) $(BUILD_DIR)/build.ninja
    8080        PATH="$(CROSS_PATH):$$PATH" ninja -C $(BUILD_DIR)
    81         PATH="$(CROSS_PATH):$$PATH" DESTDIR="$(BUILD_DIR)/dist" meson install --no-rebuild --only-changed -C $(BUILD_DIR)
    8281
    8382test-xcw: meson export-cross
  • install.sh.in

    r740e952 rb2695b9  
    11#!/bin/sh
    22
     3if [ "$#" -ge 1 ]; then
     4        DESTDIR="$1"
     5else
     6        DESTDIR="${MESON_INSTALL_DESTDIR_PREFIX}"
     7fi
     8
    39@text@
  • kernel/meson.build

    r740e952 rb2695b9  
    127127foreach iter : iterations
    128128        is_last = (iter == iterations.length())
    129         kernel_name = is_last ? 'kernel' : 'kernel.@0@'.format(iter)
     129        kernel_name = 'kernel.@0@.elf'.format(iter)
    130130        kernel_map_name = kernel_name + '.map'
    131131        kernel_map_path = meson.current_build_dir() / kernel_map_name
    132132
    133         kernel_elf = executable(kernel_name + '.elf', kernel_map_S,
     133        kernel_elf = executable(kernel_name, kernel_map_S,
    134134                include_directories: kernel_include_dirs,
    135135                implicit_include_directories: false,
     
    167167
    168168install_files += [[ 'boot', kernel_elf.full_path(), 'kernel.elf' ]]
     169install_deps += [ kernel_elf ]
    169170
    170 kernel_disasm = custom_target(kernel_name + '.disasm',
     171kernel_disasm = custom_target('kernel.elf.disasm',
    171172        command: [ objdump, '-S', '@INPUT@' ],
    172173        input: kernel_elf,
    173         output: kernel_name + '.disasm',
     174        output: 'kernel.elf.disasm',
    174175        capture: true,
    175176        build_by_default: true,
     
    179180if false
    180181        install_files += [[ 'boot', kernel_disasm.full_path(), 'kernel.elf.disasm' ]]
     182        install_deps += [ kernel_disasm ]
    181183endif
  • meson.build

    r740e952 rb2695b9  
    2222unzip = find_program('unzip')
    2323which = find_program('which')
     24sh = find_program('sh')
    2425
    2526autocheck = generator(find_program('tools/autocheck.awk'),
     
    382383        output: 'config.mk',
    383384        configuration: conf_data,
    384         install: true,
    385         install_dir: 'config',
    386385)
    387386
     
    391390        command: [ sed, 's:$(HELENOS_EXPORT_ROOT):${HELENOS_EXPORT_ROOT}:g', '@INPUT@' ],
    392391        capture: true,
    393         install: true,
    394         install_dir: 'config',
    395 )
    396 
    397 install_data('Makefile.common', 'Makefile.config', install_dir: 'config')
     392)
     393
     394install_files += [[ 'config', meson.current_build_dir() / 'config.mk', 'config.mk' ]]
     395install_files += [[ 'config', meson.current_build_dir() / 'config.sh', 'config.sh' ]]
     396
     397# TODO: remove
     398install_files += [[ 'config', meson.current_source_dir() / 'Makefile.common', 'Makefile.common' ]]
     399install_files += [[ 'config', meson.current_source_dir() / 'Makefile.config', 'Makefile.config' ]]
    398400
    399401
     
    403405
    404406foreach f : install_files
    405         _cmd = 'mkdir -p "${MESON_INSTALL_DESTDIR_PREFIX}@0@" && cp -L -T "@1@" "${MESON_INSTALL_DESTDIR_PREFIX}@0@/@2@"'
     407        _cmd = 'mkdir -p "${DESTDIR}@0@" && cp -L -T "@1@" "${DESTDIR}@0@/@2@"'
    406408        install_script_text += _cmd.format(f[0], f[1], f[2])
    407409endforeach
     
    409411install_script_text += uspace_lib_install_script_text
    410412
    411 configure_file(
     413install_script_name = meson.current_build_dir() / 'install.sh'
     414
     415install_script = configure_file(
    412416        configuration: { 'text' : '\n'.join(install_script_text) },
    413417        input: 'install.sh.in',
     
    415419)
    416420
    417 meson.add_install_script(meson.current_build_dir() / 'install.sh')
     421meson.add_install_script(install_script_name)
     422
     423custom_target('DIST',
     424        output: 'dist.log',
     425        input: [ install_script, install_deps ],
     426        command: [ sh, '@INPUT0@', meson.current_build_dir()/'dist/' ],
     427        capture: true,
     428        build_by_default: true,
     429)
     430
  • uspace/lib/c/meson.build

    r740e952 rb2695b9  
    2222
    2323if CONFIG_DEVEL_FILES
    24         uspace_lib_install_script_text += 'mkdir -p "${MESON_INSTALL_DESTDIR_PREFIX}include/libc"'
     24        uspace_lib_install_script_text += 'mkdir -p "${DESTDIR}include/libc"'
    2525
    2626        foreach idir : incdirs
    2727                _sdir = meson.current_source_dir() / idir
    28                 uspace_lib_install_script_text += 'cp -R -L -T "@0@" "${MESON_INSTALL_DESTDIR_PREFIX}include/libc"'.format(_sdir)
     28                uspace_lib_install_script_text += 'cp -R -L -T "@0@" "${DESTDIR}include/libc"'.format(_sdir)
    2929        endforeach
    3030endif
  • uspace/lib/meson.build

    r740e952 rb2695b9  
    123123                        if CONFIG_DEVEL_FILES and installed_libs.contains(l)
    124124                                _sdir = meson.current_source_dir() / l / 'include'
    125                                 uspace_lib_install_script_text += 'cp -R -L -T "@0@" "${MESON_INSTALL_DESTDIR_PREFIX}include/lib@1@"'.format(_sdir, l)
     125                                uspace_lib_install_script_text += 'cp -R -L -T "@0@" "${DESTDIR}include/lib@1@"'.format(_sdir, l)
    126126                        endif
    127127                else
     
    130130                        if CONFIG_DEVEL_FILES and installed_libs.contains(l)
    131131                                _sdir = meson.current_source_dir() / l
    132                                 uspace_lib_install_script_text += 'mkdir -p "${MESON_INSTALL_DESTDIR_PREFIX}include/lib@0@"'.format(l)
    133                                 uspace_lib_install_script_text += 'cp -L -t "${MESON_INSTALL_DESTDIR_PREFIX}include/lib@0@" "@1@"/*.h'.format(l, _sdir)
     132                                uspace_lib_install_script_text += 'mkdir -p "${DESTDIR}include/lib@0@"'.format(l)
     133                                uspace_lib_install_script_text += 'cp -L -t "${DESTDIR}include/lib@0@" "@1@"/*.h'.format(l, _sdir)
    134134                        endif
    135135                endif
Note: See TracChangeset for help on using the changeset viewer.