]> granicus.if.org Git - esp-idf/commitdiff
build systems: Changes to work on FreeBSD
authorTomoyuki Sakurai <y@trombik.org>
Sun, 18 Aug 2019 05:30:48 +0000 (14:30 +0900)
committerAngus Gratton <gus@projectgus.com>
Mon, 19 Aug 2019 05:33:55 +0000 (15:33 +1000)
Merges https://github.com/espressif/esp-idf/pull/2029

tools/cmake/kconfig.cmake
tools/idf.py
tools/kconfig/lxdialog/check-lxdialog.sh

index d1d34234d461b5790e047d2aa3bf964c2760436b..66b78e2576100cd0d9f19044c8dc51226414baed 100644 (file)
@@ -34,6 +34,11 @@ function(__kconfig_init)
             set(MCONF "\"${WINPTY}\" \"${MCONF}\"")
         endif()
     endif()
+    if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "FreeBSD")
+        set(MAKE_COMMMAND "gmake")
+    else()
+        set(MAKE_COMMMAND "make")
+    endif()
 
     if(NOT MCONF)
         # Use the existing Makefile to build mconf (out of tree) when needed
@@ -49,7 +54,7 @@ function(__kconfig_init)
             CONFIGURE_COMMAND ""
             BINARY_DIR "kconfig_bin"
             BUILD_COMMAND rm -f ${src_path}/zconf.lex.c ${src_path}/zconf.hash.c
-            COMMAND make -f ${src_path}/Makefile mconf-idf
+            COMMAND ${MAKE_COMMMAND} -f ${src_path}/Makefile mconf-idf
             BUILD_BYPRODUCTS ${MCONF}
             INSTALL_COMMAND ""
             EXCLUDE_FROM_ALL 1
index 1083d1d0263ceb788d34cf58ee643e130dec3454..8f1a71103c4e647206eded90ab74e018054cf7c6 100755 (executable)
@@ -36,6 +36,7 @@ import re
 import shutil
 import subprocess
 import sys
+import platform
 
 
 class FatalError(RuntimeError):
@@ -64,6 +65,9 @@ if "MSYSTEM" in os.environ:  # MSYS
 elif os.name == "nt":  # other Windows
     MAKE_CMD = "mingw32-make"
     MAKE_GENERATOR = "MinGW Makefiles"
+elif platform.system() == "FreeBSD":
+    MAKE_CMD = "gmake"
+    MAKE_GENERATOR = "Unix Makefiles"
 else:
     MAKE_CMD = "make"
     MAKE_GENERATOR = "Unix Makefiles"
index e9daa6270c239b6281176c44554f70eb782a67ea..de48a1c26020199b77f08d09db991d1a5a0e1532 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # Check ncurses compatibility
 
 # What library to link