make.py 758 B

123456789101112131415161718192021222324252627282930
  1. import os
  2. from .common import BuildSystem
  3. # Same for the Makefile projects:
  4. MAKE_PROJECT_LINE = r"include $(IDF_PATH)/make/project.mk"
  5. BUILD_SYSTEM_MAKE = "make"
  6. class MakeBuildSystem(BuildSystem):
  7. NAME = BUILD_SYSTEM_MAKE
  8. @staticmethod
  9. def build(build_item):
  10. raise NotImplementedError()
  11. @staticmethod
  12. def is_app(path):
  13. makefile_path = os.path.join(path, "Makefile")
  14. if not os.path.exists(makefile_path):
  15. return False
  16. with open(makefile_path, "r") as makefile:
  17. makefile_content = makefile.read()
  18. if MAKE_PROJECT_LINE not in makefile_content:
  19. return False
  20. return True
  21. @staticmethod
  22. def supported_targets(app_path):
  23. return ["esp32"]