Changeset 2e2cefdb 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:
d4b30cf
Parents:
45b26114
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-30 11:30:52)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-08-17 12:49:43)
Message:

Put configuration in build directory instead of source root

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r45b26114 r2e2cefdb  
    3434FORMAT = clang-format
    3535CHECK = tools/check.sh
    36 CONFIG = tools/config.py
     36CONFIG = $(abspath tools/config.py)
    3737MESON = meson
    3838
     
    4141CONFIG_RULES = HelenOS.config
    4242
    43 CONFIG_MAKEFILE = Makefile.config
    44 CONFIG_HEADER = config.h
     43CONFIG_MAKEFILE = $(BUILD_DIR)/Makefile.config
     44CONFIG_HEADER = $(BUILD_DIR)/config.h
    4545ERRNO_HEADER = abi/include/abi/errno.h
    4646ERRNO_INPUT = abi/include/abi/errno.in
     47VERSION_FILE = version
    4748
    4849-include $(CONFIG_MAKEFILE)
     
    7071all: meson
    7172
    72 $(BUILD_DIR)/build.ninja: Makefile.config version
     73$(BUILD_DIR)/build.ninja: $(CONFIG_MAKEFILE) $(VERSION_FILE)
    7374        PATH="$(CROSS_PATH):$$PATH" meson . $(BUILD_DIR) --cross-file meson/cross/$(CROSS_TARGET) $(MESON_ARGS)
    7475
     
    131132
    132133config_default $(CONFIG_MAKEFILE) $(CONFIG_HEADER): $(CONFIG_RULES)
     134        mkdir -p $(BUILD_DIR)
    133135ifeq ($(HANDS_OFF),y)
    134         $(CONFIG) $< defaults hands-off $(PROFILE)
     136        cd $(BUILD_DIR) && $(CONFIG) $(abspath $<) $(abspath defaults) hands-off $(PROFILE)
    135137else
    136         $(CONFIG) $< defaults default $(PROFILE)
     138        cd $(BUILD_DIR) && $(CONFIG) $(abspath $<) $(abspath defaults) default $(PROFILE)
    137139endif
    138140
    139141config: $(CONFIG_RULES)
    140         $(CONFIG) $< defaults
     142        mkdir -p $(BUILD_DIR)
     143        cd $(BUILD_DIR) && $(CONFIG) $(abspath $<) $(abspath defaults)
    141144
    142145random-config: $(CONFIG_RULES)
    143         $(CONFIG) $< defaults random
     146        mkdir -p $(BUILD_DIR)
     147        cd $(BUILD_DIR) && $(CONFIG) $(abspath $<) $(abspath defaults) random
    144148
    145149# Release files
Note: See TracChangeset for help on using the changeset viewer.