xmake.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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://ftp.gnu.org/gnu/make/make-$(version).tar.gz",
  6. "https://mirrors.ustc.edu.cn/gnu/make/make-$(version).tar.gz",
  7. "http://mirror.easyname.at/gnu/make/make-$(version).tar.gz")
  8. add_versions("4.2.1", "e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7")
  9. add_versions("4.3", "e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19")
  10. if is_host("linux") then
  11. add_extsources("pacman::make", "apt::make")
  12. elseif is_host("macosx") then
  13. add_extsources("brew::make")
  14. end
  15. on_install("@windows", function(package)
  16. import("core.tool.toolchain")
  17. local runenvs = toolchain.load("msvc"):runenvs()
  18. os.vrunv("build_w32.bat", {}, {envs = runenvs})
  19. os.cp("WinRel/gnumake.exe", path.join(package:installdir("bin"), "make.exe"))
  20. end)
  21. on_install("@macosx", "@linux", function (package)
  22. import("package.tools.autoconf").install(package, {"--disable-dependency-tracking", "--disable-gtk", "--disable-silent-rules"})
  23. end)
  24. on_test(function (package)
  25. os.vrun("make --version")
  26. end)