xmake.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package("make")
  2. set_kind("binary")
  3. set_homepage("https://www.gnu.org/software/make/")
  4. set_description("GNU make tool.")
  5. add_urls("https://ftpmirror.gnu.org/gnu/make/make-$(version).tar.gz",
  6. "https://ftp.gnu.org/gnu/make/make-$(version).tar.gz",
  7. "https://mirrors.ustc.edu.cn/gnu/make/make-$(version).tar.gz",
  8. "http://mirror.easyname.at/gnu/make/make-$(version).tar.gz")
  9. add_versions("4.2.1", "e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7")
  10. add_versions("4.3", "e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19")
  11. add_versions("4.4.1", "dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3")
  12. if is_host("linux") then
  13. add_extsources("pacman::make", "apt::make")
  14. elseif is_host("macosx") then
  15. add_extsources("brew::make")
  16. end
  17. on_install("@windows", function (package)
  18. import("core.tool.toolchain")
  19. local msvc = package:toolchain("msvc") or
  20. toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
  21. local runenvs = msvc:runenvs()
  22. os.vrunv("build_w32.bat", {}, {envs = runenvs})
  23. os.cp("WinRel/gnumake.exe", path.join(package:installdir("bin"), "make.exe"))
  24. end)
  25. on_install("@macosx", "@linux", function (package)
  26. import("package.tools.autoconf").install(package, {"--disable-dependency-tracking", "--disable-gtk", "--disable-silent-rules"})
  27. end)
  28. on_test(function (package)
  29. os.vrun("make --version")
  30. end)