2010-06-16 10:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
+ config/detplat.mk
* config/global.mk
+ Last usage of $(eval) replaced with "quasi-function" call
solution. It's less efficient, but now it should support
GNU Make 3.79.
NOTE: If someone has a better solution, or even a more optimal
version of this one, pls speak up!
+ Two usages of $(eval) replaced with GNU Make version agnostic
solution. (in previous commit)
This commit is contained in:
@@ -16,6 +16,17 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-06-16 10:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
+ config/detplat.mk
|
||||
* config/global.mk
|
||||
+ Last usage of $(eval) replaced with "quasi-function" call
|
||||
solution. It's less efficient, but now it should support
|
||||
GNU Make 3.79.
|
||||
NOTE: If someone has a better solution, or even a more optimal
|
||||
version of this one, pls speak up!
|
||||
+ Two usages of $(eval) replaced with GNU Make version agnostic
|
||||
solution. (in previous commit)
|
||||
|
||||
2010-06-16 09:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* config/detfun.mk
|
||||
* config/global.mk
|
||||
@@ -40,12 +51,14 @@
|
||||
HB_SRC_ROOTPATH was not specified.
|
||||
+ Falling back to using HB_SRC_ROOTPATH in all places where
|
||||
$(realpath) or $(abspath) calls are used in 3.81 version.
|
||||
+ Two usages of $(eval) replaced with GNU Make version agnostic
|
||||
solution.
|
||||
! Protected one $(realpath) with version guard.
|
||||
+ Automatized how HB_VER_STATUS_SH is filled for final releases.
|
||||
; NOTE: HB_SRC_ROOTPATH support is completely untested.
|
||||
; TODO: If everything works as intended, now "only" $(eval)
|
||||
calls need some workaround to give full blown
|
||||
functionality also with 3.79 version of GNU Make.
|
||||
functionality also with 3.79 version of GNU Make. [DONE]
|
||||
|
||||
* config/instsh.mk
|
||||
! Fixed to not use $(realpath) (and fail to install),
|
||||
|
||||
91
harbour/config/detplat.mk
Normal file
91
harbour/config/detplat.mk
Normal file
@@ -0,0 +1,91 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
|
||||
# See COPYING for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
ifneq ($(findstring MINGW,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := win
|
||||
else
|
||||
ifneq ($(findstring MSys,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := win
|
||||
else
|
||||
ifneq ($(findstring Windows,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := win
|
||||
else
|
||||
ifneq ($(findstring CYGWIN,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := win
|
||||
else
|
||||
ifneq ($(findstring Darwin,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := darwin
|
||||
else
|
||||
ifneq ($(findstring darwin,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := darwin
|
||||
else
|
||||
ifneq ($(findstring Linux,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := linux
|
||||
else
|
||||
ifneq ($(findstring linux,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := linux
|
||||
else
|
||||
ifneq ($(findstring HP-UX,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := hpux
|
||||
else
|
||||
ifneq ($(findstring hp-ux,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := hpux
|
||||
else
|
||||
ifneq ($(findstring SunOS,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := sunos
|
||||
else
|
||||
ifneq ($(findstring sunos,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := sunos
|
||||
else
|
||||
ifneq ($(findstring BSD,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := bsd
|
||||
else
|
||||
ifneq ($(findstring bsd,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := bsd
|
||||
else
|
||||
ifneq ($(findstring DragonFly,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := bsd
|
||||
else
|
||||
ifneq ($(findstring OS/2,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := os2
|
||||
else
|
||||
ifneq ($(findstring MS-DOS,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := dos
|
||||
else
|
||||
ifneq ($(findstring msdos,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := dos
|
||||
else
|
||||
ifneq ($(findstring beos,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := beos
|
||||
else
|
||||
ifneq ($(findstring Haiku,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := beos
|
||||
endif
|
||||
ifneq ($(findstring QNX,$(_DETPLAT_STR)),)
|
||||
HB_HOST_PLAT := qnx
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -86,93 +86,6 @@ find_in_path_raw = $(strip $(subst $(substpat), ,$(firstword $(subst |, ,$(subst
|
||||
find_in_path_par = $(strip $(subst $(substpat), ,$(firstword $(subst |, ,$(subst $(subst x, ,x),$(substpat),$(filter-out |,$(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),$(substpat),$(2))),|$(wildcard $(subst //,/,$(subst $(substpat),\ ,$(subst \,/,$(dir)))/$(1))$(HB_HOST_BIN_EXT)))))))))
|
||||
find_in_path_prw = $(strip $(subst $(substpat), ,$(firstword $(subst |, ,$(subst $(subst x, ,x),$(substpat),$(filter-out |,$(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),$(substpat),$(2))),|$(wildcard $(subst //,/,$(subst $(substpat),\ ,$(subst \,/,$(dir)))/$(1))))))))))
|
||||
|
||||
define check_host
|
||||
|
||||
ifneq ($(findstring MINGW,$(1)),)
|
||||
HB_HOST_PLAT := win
|
||||
else
|
||||
ifneq ($(findstring MSys,$(1)),)
|
||||
HB_HOST_PLAT := win
|
||||
else
|
||||
ifneq ($(findstring Windows,$(1)),)
|
||||
HB_HOST_PLAT := win
|
||||
else
|
||||
ifneq ($(findstring CYGWIN,$(1)),)
|
||||
HB_HOST_PLAT := win
|
||||
else
|
||||
ifneq ($(findstring Darwin,$(1)),)
|
||||
HB_HOST_PLAT := darwin
|
||||
else
|
||||
ifneq ($(findstring darwin,$(1)),)
|
||||
HB_HOST_PLAT := darwin
|
||||
else
|
||||
ifneq ($(findstring Linux,$(1)),)
|
||||
HB_HOST_PLAT := linux
|
||||
else
|
||||
ifneq ($(findstring linux,$(1)),)
|
||||
HB_HOST_PLAT := linux
|
||||
else
|
||||
ifneq ($(findstring HP-UX,$(1)),)
|
||||
HB_HOST_PLAT := hpux
|
||||
else
|
||||
ifneq ($(findstring hp-ux,$(1)),)
|
||||
HB_HOST_PLAT := hpux
|
||||
else
|
||||
ifneq ($(findstring SunOS,$(1)),)
|
||||
HB_HOST_PLAT := sunos
|
||||
else
|
||||
ifneq ($(findstring sunos,$(1)),)
|
||||
HB_HOST_PLAT := sunos
|
||||
else
|
||||
ifneq ($(findstring BSD,$(1)),)
|
||||
HB_HOST_PLAT := bsd
|
||||
else
|
||||
ifneq ($(findstring bsd,$(1)),)
|
||||
HB_HOST_PLAT := bsd
|
||||
else
|
||||
ifneq ($(findstring DragonFly,$(1)),)
|
||||
HB_HOST_PLAT := bsd
|
||||
else
|
||||
ifneq ($(findstring OS/2,$(1)),)
|
||||
HB_HOST_PLAT := os2
|
||||
else
|
||||
ifneq ($(findstring MS-DOS,$(1)),)
|
||||
HB_HOST_PLAT := dos
|
||||
else
|
||||
ifneq ($(findstring msdos,$(1)),)
|
||||
HB_HOST_PLAT := dos
|
||||
else
|
||||
ifneq ($(findstring beos,$(1)),)
|
||||
HB_HOST_PLAT := beos
|
||||
else
|
||||
ifneq ($(findstring Haiku,$(1)),)
|
||||
HB_HOST_PLAT := beos
|
||||
endif
|
||||
ifneq ($(findstring QNX,$(1)),)
|
||||
HB_HOST_PLAT := qnx
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
# Some presets based on HB_BUILD_NAME
|
||||
ifneq ($(HB_BUILD_NAME),)
|
||||
ifeq ($(HB_BUILD_NAME),.r)
|
||||
@@ -475,18 +388,24 @@ ifeq ($(PTHSEP),)
|
||||
endif
|
||||
endif
|
||||
|
||||
# TOFIX: For < 3.80 GNU Make versions
|
||||
ifeq ($(HB_HOST_PLAT),)
|
||||
$(eval $(call check_host,$(OSTYPE),))
|
||||
# Using "quasi-functions" instead of $(eval) solution to stay compatible
|
||||
# with < 3.80 GNU Make versions
|
||||
_DETPLAT_STR := $(OSTYPE)
|
||||
include $(TOP)$(ROOT)config/detplat.mk
|
||||
ifeq ($(HB_HOST_PLAT),)
|
||||
$(eval $(call check_host,$(MACHTYPE),))
|
||||
_DETPLAT_STR := $(MACHTYPE)
|
||||
include $(TOP)$(ROOT)config/detplat.mk
|
||||
ifeq ($(HB_HOST_PLAT),)
|
||||
$(eval $(call check_host,$(OS),))
|
||||
_DETPLAT_STR := $(OS)
|
||||
include $(TOP)$(ROOT)config/detplat.mk
|
||||
ifeq ($(HB_HOST_PLAT),)
|
||||
$(eval $(call check_host,$(shell uname -s),))
|
||||
_DETPLAT_STR := $(shell uname -s)
|
||||
include $(TOP)$(ROOT)config/detplat.mk
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
_DETPLAT_STR :=
|
||||
endif
|
||||
|
||||
ifeq ($(HB_HOST_PLAT),)
|
||||
|
||||
Reference in New Issue
Block a user