From 3d21b2394d1cf43e93a933297f4741cefa43de93 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 12 Aug 2009 10:38:12 +0000 Subject: [PATCH] 2009-08-12 12:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/gtcrs/Makefile * source/rtl/gttrm/Makefile * source/rtl/gtsln/Makefile * config/global.cf ! Hopefully fixed GPM detection with pure (no starter script) GNU Make invocations. It needs to be done centrally, as it's used in multiple modules, plus it has external lib dependency. ; TODO: Streamline macro usage regarding external dependencies. There is currently HAS*, HAVE*, HB_HAVE*, HB_WITHOUT* plus some other variations. We should probably stick to HB_BUILD_WITH_* for user level control, and HB_HAS_* for internal detection logic. --- harbour/ChangeLog | 15 +++++++++++++++ harbour/config/global.cf | 11 +++++++++++ harbour/source/rtl/gtcrs/Makefile | 10 +--------- harbour/source/rtl/gtsln/Makefile | 10 +--------- harbour/source/rtl/gttrm/Makefile | 10 +--------- 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 67c73a8fed..f7e6c98ddc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,21 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-12 12:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * source/rtl/gtcrs/Makefile + * source/rtl/gttrm/Makefile + * source/rtl/gtsln/Makefile + * config/global.cf + ! Hopefully fixed GPM detection with pure (no starter script) + GNU Make invocations. It needs to be done centrally, + as it's used in multiple modules, plus it has external lib + dependency. + ; TODO: Streamline macro usage regarding external dependencies. + There is currently HAS*, HAVE*, HB_HAVE*, HB_WITHOUT* + plus some other variations. + We should probably stick to HB_BUILD_WITH_* for user + level control, and HB_HAS_* for internal detection logic. + 2009-08-12 12:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/gtxwc/Makefile * source/rtl/gtcrs/Makefile diff --git a/harbour/config/global.cf b/harbour/config/global.cf index 18ca35214a..4d7ce288ed 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -631,6 +631,17 @@ ifeq ($(HB_COMMERCE),yes) export HB_WITHOUT_GTSLN := yes endif +ifeq ($(HB_GPM_MOUSE),) + HB_GPM_MOUSE := no + ifeq ($(HB_INC_GPM),) + HB_INC_GPM := /usr/include /usr/local/include + endif + ifneq ($(strip $(foreach d,$(HB_INC_GPM),$(if $(wildcard $(d)/gpm.h),$(d),))),) + HB_GPM_MOUSE := yes + endif + export HB_GPM_MOUSE +endif + # Names of portable GT drivers HB_GT_LIBS := \ gtcgi \ diff --git a/harbour/source/rtl/gtcrs/Makefile b/harbour/source/rtl/gtcrs/Makefile index 1aa53d68f4..c32212d35d 100644 --- a/harbour/source/rtl/gtcrs/Makefile +++ b/harbour/source/rtl/gtcrs/Makefile @@ -40,18 +40,10 @@ endif ifneq ($(HB_INC_CURSES_OK),) -HB_INC_GPM_OK := -ifneq ($(HB_GPM_MOUSE),no) - ifneq ($(HB_COMMERCE),yes) - HB_INC_GPM := /usr/include /usr/local/include - HB_INC_GPM_OK += $(foreach d, $(HB_INC_GPM), $(if $(wildcard $(d)/gpm.h),$(d),)) - endif -endif - ifeq ($(HB_GT_CRS_BCEHACK),yes) HB_USER_CFLAGS += -DHB_GT_CRS_BCEHACK endif -ifneq ($(strip $(HB_INC_GPM_OK)),) +ifeq ($(HB_GPM_MOUSE),yes) HB_USER_CFLAGS += -DHAVE_GPM_H ifeq ($(HB_GPM_NOICE_DISABLE),yes) HB_USER_CFLAGS += -DHB_GPM_NOICE_DISABLE diff --git a/harbour/source/rtl/gtsln/Makefile b/harbour/source/rtl/gtsln/Makefile index aaff28a210..5f84690a3f 100644 --- a/harbour/source/rtl/gtsln/Makefile +++ b/harbour/source/rtl/gtsln/Makefile @@ -36,15 +36,7 @@ HB_INC_SLANG_OK += $(foreach d, $(HB_INC_SLANG), $(if $(wildcard $(d)/slang.h),$ ifneq ($(strip $(HB_INC_SLANG_OK)),) -HB_INC_GPM_OK := -ifneq ($(HB_GPM_MOUSE),no) - ifneq ($(HB_COMMERCE),yes) - HB_INC_GPM := /usr/include /usr/local/include - HB_INC_GPM_OK += $(foreach d, $(HB_INC_GPM), $(if $(wildcard $(d)/gpm.h),$(d),)) - endif -endif - -ifneq ($(strip $(HB_INC_GPM_OK)),) +ifeq ($(HB_GPM_MOUSE),yes) HB_USER_CFLAGS += -DHAVE_GPM_H ifeq ($(HB_GPM_NOICE_DISABLE),yes) HB_USER_CFLAGS += -DHB_GPM_NOICE_DISABLE diff --git a/harbour/source/rtl/gttrm/Makefile b/harbour/source/rtl/gttrm/Makefile index 44de6ffe7b..7b8d1b2fb3 100644 --- a/harbour/source/rtl/gttrm/Makefile +++ b/harbour/source/rtl/gttrm/Makefile @@ -33,15 +33,7 @@ endif ifeq ($(HB_WITH_GTTRM),yes) -HB_INC_GPM_OK := -ifneq ($(HB_GPM_MOUSE),no) - ifneq ($(HB_COMMERCE),yes) - HB_INC_GPM := /usr/include /usr/local/include - HB_INC_GPM_OK += $(foreach d, $(HB_INC_GPM), $(if $(wildcard $(d)/gpm.h),$(d),)) - endif -endif - -ifneq ($(strip $(HB_INC_GPM_OK)),) +ifeq ($(HB_GPM_MOUSE),yes) HB_USER_CFLAGS += -DHAVE_GPM_H ifeq ($(HB_GPM_NOICE_DISABLE),yes) HB_USER_CFLAGS += -DHB_GPM_NOICE_DISABLE