diff options
Diffstat (limited to 'make')
-rw-r--r-- | make/configure.py | 9 | ||||
-rw-r--r-- | make/include/gcc.defs | 2 | ||||
-rw-r--r-- | make/include/main.defs | 12 |
3 files changed, 21 insertions, 2 deletions
diff --git a/make/configure.py b/make/configure.py index 571093e24..89a1edec6 100644 --- a/make/configure.py +++ b/make/configure.py @@ -1248,6 +1248,8 @@ def createCLI(): grp.add_option( '--enable-local-yasm', default=False, action='store_true', help=h ) h = IfHost( 'Build and use local autotools', '*-*-*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-local-autotools', default=False, action='store_true', help=h ) + h = IfHost( 'Build and use local cmake', '*-*-*', none=optparse.SUPPRESS_HELP ).value + grp.add_option( '--enable-local-cmake', default=False, action='store_true', help=h ) h = IfHost( 'Build and use local pkg-config', '*-*-darwin*', none=optparse.SUPPRESS_HELP ).value grp.add_option( '--enable-local-pkgconfig', default=False, action='store_true', help=h ) @@ -1419,6 +1421,7 @@ try: yasm = ToolProbe( 'YASM.exe', 'yasm', abort=False, minversion=[1,2,0] ) autoconf = ToolProbe( 'AUTOCONF.exe', 'autoconf', abort=False ) automake = ToolProbe( 'AUTOMAKE.exe', 'automake', abort=False ) + cmake = ToolProbe( 'CMAKE.exe', 'cmake', abort=False ) libtool = ToolProbe( 'LIBTOOL.exe', 'libtool', abort=False ) pkgconfig = ToolProbe( 'PKGCONFIG.exe', 'pkg-config', abort=False ) @@ -1492,6 +1495,11 @@ try: stdout.write( 'note: enabling local autotools\n' ) options.enable_local_autotools = True + ## enable local cmake when cmake probe fails + if not options.enable_local_cmake and (Tools.cmake.fail): + stdout.write( 'note: enabling local cmake\n' ) + options.enable_local_cmake = True + ## enable local pkg-config when probe fails if not options.enable_local_pkgconfig and Tools.pkgconfig.fail: stdout.write( 'note: enabling local pkgconfig\n' ) @@ -1660,6 +1668,7 @@ int main () doc.addBlank() doc.add( 'FEATURE.local_yasm', int( options.enable_local_yasm )) doc.add( 'FEATURE.local_autotools', int( options.enable_local_autotools )) + doc.add( 'FEATURE.local_cmake', int( options.enable_local_cmake )) doc.add( 'FEATURE.local_pkgconfig', int( options.enable_local_pkgconfig )) doc.add( 'FEATURE.asm', 'disabled' ) doc.add( 'FEATURE.gtk', int( not options.disable_gtk )) diff --git a/make/include/gcc.defs b/make/include/gcc.defs index e6695c329..b27c4a6ce 100644 --- a/make/include/gcc.defs +++ b/make/include/gcc.defs @@ -83,7 +83,7 @@ GCC.args.extra.exe++ = $(LDFLAGS) define import.GCC $(1).GCC.gcc = $$(GCC.gcc) - $(1).GCC.gxx = $$(dir $$($(1).GCC.gcc))$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc))) + $(1).GCC.gxx = $$(dir $$($(1).GCC.gcc))$$(subst clang,clang++,$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc)))) $(1).GCC.pipe = $$(GCC.pipe) $(1).GCC.c_std = $$(GCC.c_std) diff --git a/make/include/main.defs b/make/include/main.defs index 504d814cc..a6ea8a4cd 100644 --- a/make/include/main.defs +++ b/make/include/main.defs @@ -12,17 +12,27 @@ ifeq (1,$(FEATURE.local_pkgconfig)) MODULES += contrib/pkgconfig endif +HB_TOOLS_PATH = +ifeq (1,$(FEATURE.local_cmake)) + MODULES += contrib/cmake + HB_TOOLS_PATH = $(call fn.ABSOLUTE,$(CONTRIB.build/)bin) +endif + ifeq (1,$(FEATURE.local_autotools)) MODULES += contrib/autoconf MODULES += contrib/automake MODULES += contrib/libtool MODULES += contrib/m4 AUTOTOOL_MODULES = AUTOCONF AUTOMAKE LIBTOOL M4 - PATH := $(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH) + HB_TOOLS_PATH = $(call fn.ABSOLUTE,$(CONTRIB.build/)bin) else AUTOTOOL_MODULES = endif +ifneq (,$(HB_TOOLS_PATH)) + PATH := $(HB_TOOLS_PATH):$(PATH) +endif + ifneq (,$(filter $(BUILD.system),cygwin mingw)) ifneq ($(HAS.bz2),1) MODULES += contrib/bzip2 |