Merge branch 'feature/freebsd_build_system' into 'master'

build systems: Changes to work on FreeBSD

Closes IDFGH-1657

See merge request espressif/esp-idf!5821
This commit is contained in:
Angus Gratton 2019-08-21 16:18:47 +08:00
commit 5a3bad6119
3 changed files with 11 additions and 2 deletions

View File

@ -54,6 +54,11 @@ function(__kconfig_init)
endif()
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
@ -69,7 +74,7 @@ function(__kconfig_init)
CONFIGURE_COMMAND ""
BINARY_DIR "${CMAKE_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

View File

@ -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"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Check ncurses compatibility
# What library to link