tool.mk 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ifeq ($(_THEOS_RULES_LOADED),)
  2. include $(THEOS_MAKE_PATH)/rules.mk
  3. endif
  4. .PHONY: internal-tool-all_ internal-tool-stage_ internal-tool-compile
  5. ifeq ($(_THEOS_MAKE_PARALLEL_BUILDING), no)
  6. internal-tool-all_:: $(_OBJ_DIR_STAMPS) $(THEOS_OBJ_DIR)/$(THEOS_CURRENT_INSTANCE)$(TARGET_EXE_EXT)
  7. else
  8. internal-tool-all_:: $(_OBJ_DIR_STAMPS)
  9. $(ECHO_NOTHING)$(MAKE) -f $(_THEOS_PROJECT_MAKEFILE_NAME) --no-print-directory --no-keep-going \
  10. internal-tool-compile \
  11. _THEOS_CURRENT_TYPE=$(_THEOS_CURRENT_TYPE) THEOS_CURRENT_INSTANCE=$(THEOS_CURRENT_INSTANCE) _THEOS_CURRENT_OPERATION=compile \
  12. THEOS_BUILD_DIR="$(THEOS_BUILD_DIR)" _THEOS_MAKE_PARALLEL=yes$(ECHO_END)
  13. internal-tool-compile: $(THEOS_OBJ_DIR)/$(THEOS_CURRENT_INSTANCE)$(TARGET_EXE_EXT)
  14. endif
  15. $(eval $(call _THEOS_TEMPLATE_DEFAULT_LINKING_RULE,$(THEOS_CURRENT_INSTANCE)$(TARGET_EXE_EXT)))
  16. LOCAL_INSTALL_PATH = $(strip $($(THEOS_CURRENT_INSTANCE)_INSTALL_PATH))
  17. ifeq ($(LOCAL_INSTALL_PATH),)
  18. LOCAL_INSTALL_PATH = $($(THEOS_CURRENT_INSTANCE)_PACKAGE_TARGET_DIR)
  19. ifeq ($(LOCAL_INSTALL_PATH),)
  20. LOCAL_INSTALL_PATH = /usr/bin
  21. endif
  22. endif
  23. ifneq ($($(THEOS_CURRENT_INSTANCE)_INSTALL),0)
  24. internal-tool-stage_::
  25. $(ECHO_NOTHING)mkdir -p "$(THEOS_STAGING_DIR)$(LOCAL_INSTALL_PATH)"$(ECHO_END)
  26. $(ECHO_NOTHING)cp $(THEOS_OBJ_DIR)/$(THEOS_CURRENT_INSTANCE)$(TARGET_EXE_EXT) "$(THEOS_STAGING_DIR)$(LOCAL_INSTALL_PATH)"$(ECHO_END)
  27. endif
  28. $(eval $(call __mod,instance/tool.mk))