Changeset 5fd05862 in mainline for Makefile


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:
ecf56f80
Parents:
32355bc
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-15 13:55:37)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-17 12:49:43)
Message:

Convert uspace to meson

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r32355bc r5fd05862  
    3737AUTOTOOL = tools/autotool.py
    3838SANDBOX = autotool
     39MESON = meson
    3940
    4041CONFIG_RULES = HelenOS.config
     
    4748ERRNO_INPUT = abi/include/abi/errno.in
    4849
     50-include $(CONFIG_MAKEFILE)
     51-include $(COMMON_MAKEFILE)
     52
     53# TODO: make meson reconfigure correctly when library build changes
     54
     55ifeq ($(CONFIG_BUILD_SHARED_LIBS),y)
     56        MESON_ARGS = -Ddefault_library=shared
     57else
     58        MESON_ARGS = -Ddefault_library=static
     59endif
     60
     61CROSS_PATH = $(shell dirname "$(CC)")
     62
    4963.PHONY: all precheck cscope cscope_parts autotool config_auto config_default config distclean clean check releasefile release common boot kernel uspace export-posix space
    5064
     
    5266        $(MAKE) -r -C boot PRECHECK=$(PRECHECK)
    5367
    54 common: $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(ERRNO_HEADER)
     68build/build.ninja: Makefile.config version
     69        PATH="$(CROSS_PATH):$$PATH" meson . build --cross-file meson/cross/$(UARCH) $(MESON_ARGS)
     70
     71common: $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(ERRNO_HEADER) build/build.ninja
    5572
    5673kernel: common
     
    5875
    5976uspace: common
    60         $(MAKE) -r -C uspace PRECHECK=$(PRECHECK)
     77        PATH="$(CROSS_PATH):$$PATH" ninja -C build
     78        PATH="$(CROSS_PATH):$$PATH" DESTDIR="$$PWD/dist" meson install --no-rebuild --only-changed -C build > build/install.log
    6179
    6280test-xcw: uspace export-cross
     81ifeq ($(CONFIG_DEVEL_FILES),y)
    6382        export PATH=$$PATH:$(abspath tools/xcw/bin) && $(MAKE) -r -C tools/xcw/demo
     83endif
    6484
    6585export-posix: common
     
    6787        @echo ERROR: Variable EXPORT_DIR is not defined. && false
    6888else
    69         $(MAKE) -r -C uspace export EXPORT_DIR=$(abspath $(EXPORT_DIR))
     89        mkdir -p $(EXPORT_DIR)
     90        $(MAKE) -r -C uspace/lib/posix export EXPORT_DIR=$(abspath $(EXPORT_DIR)) UARCH=$(UARCH)
    7091endif
    7192
    7293export-cross: common
    73         $(MAKE) -r -C uspace export EXPORT_DIR=$(abspath uspace/export)
     94        mkdir -p uspace/export
     95        $(MAKE) -r -C uspace export EXPORT_DIR=$(abspath uspace/export) UARCH=$(UARCH)
    7496
    7597precheck: clean
Note: See TracChangeset for help on using the changeset viewer.