diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1b77be2ba9..77e26198d4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,49 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-27 13:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * mpkg_deb.sh + * HB_WITHOUT_ADS -> HB_INC_ADS + * HB_WITHOUT_ODBC -> HB_INC_ODBC + ; Please verify these changes. + + * contrib/gtalleg/Makefile + * contrib/hbmysql/Makefile + * contrib/hbodbc/Makefile + * contrib/hbsqlit3/Makefile + * contrib/hbfbird/Makefile + * contrib/hbcurl/hbcurls/Makefile + * contrib/hbcurl/Makefile + * contrib/rddsql/sddmy/Makefile + * contrib/rddsql/sddpg/Makefile + * contrib/rddsql/sddfb/Makefile + * contrib/rddsql/sddodbc/Makefile + * contrib/hbhpdf/Makefile + * contrib/hbpgsql/Makefile + * contrib/rddads/Makefile + * contrib/hbfimage/Makefile + * contrib/hbgd/Makefile + * contrib/hbtip/Makefile + + Using new central detection function instead of replicating + in in every contrib. The "side effect" is that now precise + instructions will be shown if a given contrib isn't included in a build. + Code is much cleaner/simpler/shorter now. + ; It's possible that I made some mistakes along the line, + plus report if anything is wrongly detected. + * external component names converted to all lowercase. + ; QT will be done in next commit. + + * config/detfun.mk + * config/detect.mk + + Added usage instructions (moved parts from detect.mk to detfun.mk). + * Moved help to detfun.mk. + + Added HB_INC_* 'force' option. + + Now clearing _DET_* vars on exit. + * external component names converted to all lowercase. + + * config/global.mk + + Updated plans. + 2009-08-27 09:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/detect.mk % Deleted compatibility input and output vars. diff --git a/harbour/config/detect.mk b/harbour/config/detect.mk index eb35fb1eb7..7fdf92bcc1 100644 --- a/harbour/config/detect.mk +++ b/harbour/config/detect.mk @@ -10,18 +10,7 @@ # used in Harbour core code. # --------------------------------------------------------------- -# NOTE: -# INPUT: -# HB_INC_* variable with following possible contents: -# (empty) - Will enable external component if found on default locations -# no - Will disable external component -# - Will specify locations to check for the external component -# OUTPUT: -# HB_HAS_* variable with following possible contents: -# (empty) - We can't use this component -# - Component headers were found at these locations -# -# config/conf.mk if present, is able to override HB_HAS_* values. +# config/conf.mk if present, is able to override HB_HAS_* values. ifeq ($(DETECT_MK_),) export DETECT_MK_ := yes @@ -48,7 +37,7 @@ endif # Detect OpenSSL -_DET_DSP_NAME := OpenSSL +_DET_DSP_NAME := openssl _DET_VAR_INC_ := HB_INC_OPENSSL _DET_VAR_HAS_ := HB_HAS_OPENSSL _DET_FLT_PLAT := !dos @@ -60,7 +49,7 @@ include $(TOP)$(ROOT)config/detfun.mk # Detect GPM mouse -_DET_DSP_NAME := GPM +_DET_DSP_NAME := gpm _DET_VAR_INC_ := HB_INC_GPM _DET_VAR_HAS_ := HB_HAS_GPM _DET_FLT_PLAT := linux @@ -114,7 +103,7 @@ include $(TOP)$(ROOT)config/detfun.mk # Detect X11 -_DET_DSP_NAME := X11 +_DET_DSP_NAME := x11 _DET_VAR_INC_ := HB_INC_X11 _DET_VAR_HAS_ := HB_HAS_X11 _DET_FLT_PLAT := diff --git a/harbour/config/detfun.mk b/harbour/config/detfun.mk index ad7b41efa8..2fa51c0f8f 100644 --- a/harbour/config/detfun.mk +++ b/harbour/config/detfun.mk @@ -10,6 +10,29 @@ # used in Harbour core code. Generic function. # --------------------------------------------------------------- +# USAGE: +# ON CALL: +# _DET_DSP_NAME - human readable name of external component. +# _DET_VAR_INC_ - variable name containing user component control. +# _DET_VAR_HAS_ - variable name receiving detection result. +# _DET_FLT_PLAT - positive and negative platform filters. Prefix negative ones with '!' char. +# _DET_FLT_COMP - positive and negative compiler filters. Prefix negative ones with '!' char. +# _DET_INC_DEFP - default location to look at. Not effective in HB_XBUILD mode. +# _DET_INC_HEAD - header filename to look for. Unless looking for a directory, prefix with forward slash. +# - variable name specified by _DET_VAR_INC_ (typically "HB_INC_*") should contains: +# (empty) or yes - will enable external component if found on default locations. +# no - will disable external component. +# force - will forcibly enable external component, bypass location checks, +# HB_HAS_* will have the content '.' (as local dir). +# - will specify locations to check for the external component. +# ON RETURN: +# - above variables cleared. +# - _DET_RES_TEXT with human readable detection result. +# - variable name specified in _DET_VAR_HAS_ (typically "HB_HAS_*") will +# have any these values: +# (empty) - we can't use this component +# - component headers were found at these locations (typically one) + # Show verbose information (empty|yes|very) ifneq ($(_DET_OPT_VERB),) do_info = $(info ! Component: $(1)) @@ -30,8 +53,13 @@ ifeq ($($(_DET_VAR_HAS_)),) ifneq ($(if $(_DET_POS),$(filter $(HB_COMPILER),$(_DET_POS)),ok),) ifeq ($(filter $(HB_COMPILER),$(_DET_NEG)),) $(_DET_VAR_HAS_) := $($(_DET_VAR_INC_)) - ifeq ($($(_DET_VAR_HAS_)),yes) + ifeq ($($(_DET_VAR_INC_)),yes) $(_DET_VAR_HAS_) := + else + # bypass local check + ifeq ($($(_DET_VAR_INC_)),force) + $(_DET_VAR_HAS_) := . + endif endif ifeq ($($(_DET_VAR_HAS_)),) ifeq ($(HB_XBUILD),) @@ -39,40 +67,50 @@ ifeq ($($(_DET_VAR_HAS_)),) endif endif ifneq ($($(_DET_VAR_HAS_)),) - $(_DET_VAR_HAS_) := $(strip $(foreach d,$($(_DET_VAR_HAS_)),$(if $(wildcard $(d)$(_DET_INC_HEAD)),$(d),))) - ifeq ($($(_DET_VAR_HAS_)),) - _DET_RES_TEXT := $(_DET_DSP_NAME) not found - $(call do_info,$(_DET_RES_TEXT)) - else - _DET_RES_TEXT := $(_DET_DSP_NAME) found in $($(_DET_VAR_HAS_)) - ifeq ($(_DET_OPT_VERB),very) + ifneq ($($(_DET_VAR_HAS_)),.) + $(_DET_VAR_HAS_) := $(strip $(foreach d,$($(_DET_VAR_HAS_)),$(if $(wildcard $(d)$(_DET_INC_HEAD)),$(d),))) + ifeq ($($(_DET_VAR_HAS_)),) + _DET_RES_TEXT := '$(_DET_DSP_NAME)' not found $(call do_info,$(_DET_RES_TEXT)) + else + _DET_RES_TEXT := '$(_DET_DSP_NAME)' found in $($(_DET_VAR_HAS_)) + ifeq ($(_DET_OPT_VERB),very) + $(call do_info,$(_DET_RES_TEXT)) + endif endif endif else - _DET_RES_TEXT := $(_DET_DSP_NAME) location not specified + _DET_RES_TEXT := '$(_DET_DSP_NAME)' location not specified $(call do_info,$(_DET_RES_TEXT)) endif else - _DET_RES_TEXT := $(_DET_DSP_NAME) not supported with $(HB_COMPILER) compiler + _DET_RES_TEXT := '$(_DET_DSP_NAME)' not supported with $(HB_COMPILER) compiler $(call do_info,$(_DET_RES_TEXT)) endif else - _DET_RES_TEXT := $(_DET_DSP_NAME) not supported with $(HB_COMPILER) compiler + _DET_RES_TEXT := '$(_DET_DSP_NAME)' not supported with $(HB_COMPILER) compiler $(call do_info,$(_DET_RES_TEXT)) endif else - _DET_RES_TEXT := $(_DET_DSP_NAME) not supported on $(HB_PLATFORM) platform + _DET_RES_TEXT := '$(_DET_DSP_NAME)' not supported on $(HB_PLATFORM) platform $(call do_info,$(_DET_RES_TEXT)) endif else - _DET_RES_TEXT := $(_DET_DSP_NAME) not supported on $(HB_PLATFORM) platform + _DET_RES_TEXT := '$(_DET_DSP_NAME)' not supported on $(HB_PLATFORM) platform $(call do_info,$(_DET_RES_TEXT)) endif _DET_POS := _DET_NEG := else - _DET_RES_TEXT := $(_DET_DSP_NAME) explicitly disabled + _DET_RES_TEXT := '$(_DET_DSP_NAME)' explicitly disabled $(call do_info,$(_DET_RES_TEXT)) endif endif + +_DET_DSP_NAME := +_DET_VAR_INC_ := +_DET_VAR_HAS_ := +_DET_FLT_PLAT := +_DET_FLT_COMP := +_DET_INC_DEFP := +_DET_INC_HEAD := diff --git a/harbour/config/global.mk b/harbour/config/global.mk index a1f71426d7..e4415c4136 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -264,13 +264,14 @@ ifeq ($(HB_INIT_DONE),) # HB_COMMERCE -> ? # HB_BIN_COMPILE -> HB_BUILD_BIN_DIR # HB_INC_COMPILE -> - (HB_BUILD_INC_DIR) + # + # HB_DLLIBS -> (only used in place location, so it's a local matter) + # HB_CRS_LIB -> HB_LIB_CURSES + # HB_DIR_* -> ? (only used for implib and a few .hbm files) + # # HB_GPM_NOICE_DISABLE -> HB_USER_CFLAGS=-DHB_GPM_NOICE_DISABLE # HB_GT_CRS_BCEHACK -> HB_USER_CFLAGS=-DHB_GT_CRS_BCEHACK # HB_NCURSES_194 -> HB_USER_CFLAGS=-DHB_NCURSES_194 - # HB_DLLIBS -> (only used in place location, so it's a local matter) - # HB_CRS_LIB -> HB_LIB_CURSES - # HB_DIR_* -> ? (only used for implib - # HB_HAS_* -> ? # # Macros: # -DHB_PCRE_REGEX, -DHB_POSIX_REGEX, -DHB_EXT_ZLIB, -DHB_HAS_GPM, -DHB_GT_LIB= diff --git a/harbour/contrib/gtalleg/Makefile b/harbour/contrib/gtalleg/Makefile index fea04b31a9..c45afabb62 100644 --- a/harbour/contrib/gtalleg/Makefile +++ b/harbour/contrib/gtalleg/Makefile @@ -16,7 +16,7 @@ C_SOURCES := \ gtalleg.c \ ssf.c \ -_DET_DSP_NAME := Allegro +_DET_DSP_NAME := allegro _DET_VAR_INC_ := HB_INC_ALLEGRO _DET_VAR_HAS_ := HB_HAS_ALLEGRO _DET_FLT_PLAT := diff --git a/harbour/contrib/hbcurl/Makefile b/harbour/contrib/hbcurl/Makefile index 49e85a5f2c..6c33a89153 100644 --- a/harbour/contrib/hbcurl/Makefile +++ b/harbour/contrib/hbcurl/Makefile @@ -8,49 +8,37 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbcurl -HB_INC_CURL_OK := - -ifneq ($(HB_PLATFORM),dos) - -ifeq ($(HB_INC_CURL),) - ifeq ($(HB_XBUILD),) - HB_INC_CURL := /usr/include - endif -endif - -HB_INC_CURL_OK := $(foreach d, $(HB_INC_CURL), $(if $(wildcard $(d)/curl/curl.h),$(d),)) - -endif - -ifneq ($(strip $(HB_INC_CURL_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_CURL_OK),-I$(d)) - C_SOURCES := \ hbcurl.c \ PRG_HEADERS := \ hbcurl.ch \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := libcurl +_DET_VAR_INC_ := HB_INC_CURL +_DET_VAR_HAS_ := HB_HAS_CURL +_DET_FLT_PLAT := !dos +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/include +_DET_INC_HEAD := /curl/curl.h +include $(TOP)$(ROOT)config/detfun.mk -install:: +ifneq ($(HB_HAS_CURL),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_CURL),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) -DIRS := -ifeq ($(HB_PLATFORM),win) - DIRS += hbcurls -endif -ifeq ($(HB_PLATFORM),wce) - DIRS += hbcurls -endif - -ifneq ($(DIRS),) - include $(TOP)$(ROOT)config/dir.mk -endif - + ifneq ($(filter $(HB_PLATFORM),win wce),) + DIRS += hbcurls + include $(TOP)$(ROOT)config/dir.mk + endif else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbcurl/hbcurls/Makefile b/harbour/contrib/hbcurl/hbcurls/Makefile index 13edf6ca4a..d062686e27 100644 --- a/harbour/contrib/hbcurl/hbcurls/Makefile +++ b/harbour/contrib/hbcurl/hbcurls/Makefile @@ -10,19 +10,26 @@ vpath %.c ../ LIBNAME := hbcurls -HB_INC_CURL_OK := $(foreach d, $(HB_INC_CURL), $(if $(wildcard $(d)/curl/curl.h),$(d),)) - -ifneq ($(strip $(HB_INC_CURL_OK)),) - -# always export symbols -HB_CFLAGS += -DCURL_STATICLIB -HB_CFLAGS += $(foreach d,$(HB_INC_CURL_OK),-I$(d)) - C_SOURCES := \ hbcurl.c \ -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := libcurl +_DET_VAR_INC_ := HB_INC_CURL +_DET_VAR_HAS_ := HB_HAS_CURL +_DET_FLT_PLAT := !dos +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/include +_DET_INC_HEAD := /curl/curl.h +include $(TOP)$(ROOT)config/detfun.mk +ifneq ($(HB_HAS_CURL),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_CURL),-I$(d)) + # always export symbols + HB_CFLAGS += -DCURL_STATICLIB + + include $(TOP)$(ROOT)config/lib.mk else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbfbird/Makefile b/harbour/contrib/hbfbird/Makefile index d955b7c350..86444531ef 100644 --- a/harbour/contrib/hbfbird/Makefile +++ b/harbour/contrib/hbfbird/Makefile @@ -14,7 +14,7 @@ C_SOURCES := \ PRG_SOURCES := \ tfirebrd.prg \ -_DET_DSP_NAME := Firebird +_DET_DSP_NAME := firebird _DET_VAR_INC_ := HB_INC_FIREBIRD _DET_VAR_HAS_ := HB_HAS_FIREBIRD _DET_FLT_PLAT := diff --git a/harbour/contrib/hbfimage/Makefile b/harbour/contrib/hbfimage/Makefile index 5967677545..787c565309 100644 --- a/harbour/contrib/hbfimage/Makefile +++ b/harbour/contrib/hbfimage/Makefile @@ -17,7 +17,7 @@ PRG_SOURCES := \ PRG_HEADERS := \ freeimage.ch \ -_DET_DSP_NAME := FreeImage +_DET_DSP_NAME := freeimage _DET_VAR_INC_ := HB_INC_FREEIMAGE _DET_VAR_HAS_ := HB_HAS_FREEIMAGE # disabled until a proper solution is found for type collision (except for dos where it's not supported at all) diff --git a/harbour/contrib/hbgd/Makefile b/harbour/contrib/hbgd/Makefile index 8691eec40a..04fa5f2933 100644 --- a/harbour/contrib/hbgd/Makefile +++ b/harbour/contrib/hbgd/Makefile @@ -14,18 +14,6 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbgd -ifeq ($(HB_INC_GD),) - ifeq ($(HB_XBUILD),) - HB_INC_GD := /usr/include /opt/local/include - endif -endif - -HB_INC_GD_OK := $(foreach d, $(HB_INC_GD), $(if $(wildcard $(d)/gd.h),$(d),)) - -ifneq ($(strip $(HB_INC_GD_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_GD_OK),-I$(d)) - C_SOURCES := \ gdwrp.c \ @@ -40,13 +28,27 @@ PRG_SOURCES := \ gdimage.prg \ gdbarcod.prg \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := libgd +_DET_VAR_INC_ := HB_INC_GD +_DET_VAR_HAS_ := HB_HAS_GD +_DET_FLT_PLAT := +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/include /opt/local/include +_DET_INC_HEAD := /gd.h +include $(TOP)$(ROOT)config/detfun.mk -install:: +ifneq ($(HB_HAS_GD),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_GD),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbhpdf/Makefile b/harbour/contrib/hbhpdf/Makefile index cc253648f2..0af0400d66 100644 --- a/harbour/contrib/hbhpdf/Makefile +++ b/harbour/contrib/hbhpdf/Makefile @@ -8,33 +8,36 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbhpdf -ifeq ($(HB_INC_LIBHARU),) - ifneq ($(HB_HOST_PLAT),dos) - ifeq ($(HB_XBUILD),) - HB_INC_LIBHARU = /usr/include /usr/local/include $(TOP)$(ROOT)external/libhpdf - endif - endif -endif - -HB_INC_LIBHARU_OK := $(foreach d, $(HB_INC_LIBHARU), $(if $(wildcard $(d)/hpdf.h),$(d),)) - -ifneq ($(strip $(HB_INC_LIBHARU_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_LIBHARU_OK),-I$(d)) - C_SOURCES := \ harupdf.c \ PRG_HEADERS := \ harupdf.ch \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := libharu +_DET_VAR_INC_ := HB_INC_LIBHARU +_DET_VAR_HAS_ := HB_HAS_LIBHARU +_DET_FLT_PLAT := +_DET_FLT_COMP := +_DET_INC_DEFP := +ifneq ($(HB_HOST_PLAT),dos) +_DET_INC_DEFP += /usr/include /usr/local/include $(TOP)$(ROOT)external/libhpdf +endif +_DET_INC_HEAD := /hpdf.h +include $(TOP)$(ROOT)config/detfun.mk -install:: +ifneq ($(HB_HAS_LIBHARU),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_LIBHARU),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbmysql/Makefile b/harbour/contrib/hbmysql/Makefile index 66c924db34..ea131516db 100644 --- a/harbour/contrib/hbmysql/Makefile +++ b/harbour/contrib/hbmysql/Makefile @@ -8,18 +8,6 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbmysql -ifeq ($(HB_INC_MYSQL),) - ifeq ($(HB_XBUILD),) - HB_INC_MYSQL := /usr/include/mysql /opt/local/include/mysql5/mysql - endif -endif - -HB_INC_MYSQL_OK := $(foreach d, $(HB_INC_MYSQL), $(if $(wildcard $(d)/mysql.h),$(d),)) - -ifneq ($(strip $(HB_INC_MYSQL_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_MYSQL_OK),-I$(d)) - C_SOURCES := \ mysql.c \ mysqlold.c \ @@ -31,13 +19,27 @@ PRG_SOURCES := \ PRG_HEADERS := \ mysql.ch \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := mysql +_DET_VAR_INC_ := HB_INC_MYSQL +_DET_VAR_HAS_ := HB_HAS_MYSQL +_DET_FLT_PLAT := +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/include/mysql /opt/local/include/mysql5/mysql +_DET_INC_HEAD := /mysql.h +include $(TOP)$(ROOT)config/detfun.mk -install:: +ifneq ($(HB_HAS_MYSQL),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_MYSQL),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbodbc/Makefile b/harbour/contrib/hbodbc/Makefile index 549d079e01..d01950b748 100644 --- a/harbour/contrib/hbodbc/Makefile +++ b/harbour/contrib/hbodbc/Makefile @@ -8,40 +8,6 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbodbc -ifeq ($(HB_COMPILER),rsxnt) - HB_WITHOUT_ODBC := yes -endif -ifeq ($(HB_PLATFORM),dos) - HB_WITHOUT_ODBC := yes -endif -ifeq ($(HB_PLATFORM),os2) - HB_WITHOUT_ODBC := yes -endif - -ifneq ($(HB_PLATFORM),win) -ifneq ($(HB_PLATFORM),wce) -ifeq ($(HB_WITHOUT_ODBC),) - -ifeq ($(HB_INC_ODBC),) - ifeq ($(HB_XBUILD),) - HB_INC_ODBC := /usr/include /usr/local/include - endif -endif - -HB_INC_ODBC_OK := $(foreach d, $(HB_INC_ODBC), $(if $(wildcard $(d)/sql.h),$(d),)) - -ifneq ($(strip $(HB_INC_ODBC_OK)),) - HB_CFLAGS += $(foreach d,$(HB_INC_ODBC_OK),-I$(d)) -else - HB_WITHOUT_ODBC := yes -endif - -endif -endif -endif - -ifneq ($(HB_WITHOUT_ODBC),yes) - C_SOURCES := \ odbc.c \ odbcold.c \ @@ -53,13 +19,31 @@ PRG_SOURCES := \ PRG_HEADERS := \ sql.ch \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk +ifneq ($(filter $(HB_PLATFORM),win wce),) + HB_INC_ODBC := force +endif -install:: +_DET_DSP_NAME := odbc +_DET_VAR_INC_ := HB_INC_ODBC +_DET_VAR_HAS_ := HB_HAS_ODBC +_DET_FLT_PLAT := !dos !os2 +_DET_FLT_COMP := !rsxnt +_DET_INC_DEFP := /usr/include /usr/local/include +_DET_INC_HEAD := /sql.h +include $(TOP)$(ROOT)config/detfun.mk + +ifneq ($(HB_HAS_ODBC),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_ODBC),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbpgsql/Makefile b/harbour/contrib/hbpgsql/Makefile index ad85a1b66d..1160f4a838 100644 --- a/harbour/contrib/hbpgsql/Makefile +++ b/harbour/contrib/hbpgsql/Makefile @@ -8,18 +8,6 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbpgsql -ifeq ($(HB_INC_PGSQL),) - ifeq ($(HB_XBUILD),) - HB_INC_PGSQL := /usr/include /usr/local/pgsql/include /usr/local/pgsql/include/libpq /usr/include/pgsql /usr/include/postgresql /postgres/include /opt/local/include/postgresql83 - endif -endif - -HB_INC_PGSQL_OK := $(foreach d, $(HB_INC_PGSQL), $(if $(wildcard $(d)/libpq-fe.h),$(d),)) - -ifneq ($(strip $(HB_INC_PGSQL_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_PGSQL_OK),-I$(d)) - C_SOURCES := \ postgres.c \ @@ -30,13 +18,28 @@ PRG_SOURCES := \ PRG_HEADERS := \ postgres.ch \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := postgresql +_DET_VAR_INC_ := HB_INC_PGSQL +_DET_VAR_HAS_ := HB_HAS_PGSQL +_DET_FLT_PLAT := +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/include /usr/local/pgsql/include /usr/local/pgsql/include/libpq +_DET_INC_DEFP += /usr/include/pgsql /usr/include/postgresql /postgres/include /opt/local/include/postgresql83 +_DET_INC_HEAD := /libpq-fe.h +include $(TOP)$(ROOT)config/detfun.mk -install:: +ifneq ($(HB_HAS_PGSQL),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_PGSQL),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbsqlit3/Makefile b/harbour/contrib/hbsqlit3/Makefile index b1732da405..b7b54430ac 100644 --- a/harbour/contrib/hbsqlit3/Makefile +++ b/harbour/contrib/hbsqlit3/Makefile @@ -8,43 +8,36 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbsqlit3 -ifeq ($(HB_INC_SQLITE3),) - ifeq ($(HB_XBUILD),) - HB_INC_SQLITE3 := /usr/include - ifeq ($(HB_PLATFORM),win) - HB_INC_SQLITE3 += $(TOP)$(ROOT)external/sqlite3 - endif - ifeq ($(HB_PLATFORM),wce) - HB_INC_SQLITE3 += $(TOP)$(ROOT)external/sqlite3 - endif - ifeq ($(HB_PLATFORM),os2) - HB_INC_SQLITE3 += $(TOP)$(ROOT)external/sqlite3 - endif - ifeq ($(HB_PLATFORM),dos) - HB_INC_SQLITE3 += $(TOP)$(ROOT)external/sqlite3 - endif - endif -endif - -HB_INC_SQLITE3_OK := $(foreach d, $(HB_INC_SQLITE3), $(if $(wildcard $(d)/sqlite3.h),$(d),)) - -ifneq ($(strip $(HB_INC_SQLITE3_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_SQLITE3_OK),-I$(d)) - C_SOURCES := \ hbsqlit3.c \ PRG_HEADERS := \ hbsqlit3.ch \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := sqlite3 +_DET_VAR_INC_ := HB_INC_SQLITE3 +_DET_VAR_HAS_ := HB_HAS_SQLITE3 +_DET_FLT_PLAT := +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/include +ifneq ($(filter $(HB_PLATFORM),win wce os2 dos),) + _DET_INC_DEFP += $(TOP)$(ROOT)external/sqlite3 +endif +_DET_INC_HEAD := /sqlite3.h +include $(TOP)$(ROOT)config/detfun.mk -install:: +ifneq ($(HB_HAS_SQLITE3),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_SQLITE3),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbtip/Makefile b/harbour/contrib/hbtip/Makefile index 46f276317c..ecc52e526c 100644 --- a/harbour/contrib/hbtip/Makefile +++ b/harbour/contrib/hbtip/Makefile @@ -41,12 +41,9 @@ include $(TOP)$(ROOT)config/header.mk INSTALL_RULE_HEADERS := $(INSTALL_RULE) include $(TOP)$(ROOT)config/lib.mk -DIRS := ifneq ($(HB_HAS_OPENSSL),) - DIRS += hbtipssl -endif + DIRS := hbtipssl -ifneq ($(DIRS),) include $(TOP)$(ROOT)config/dir.mk endif diff --git a/harbour/contrib/rddads/Makefile b/harbour/contrib/rddads/Makefile index f796322fb3..2c620ed55a 100644 --- a/harbour/contrib/rddads/Makefile +++ b/harbour/contrib/rddads/Makefile @@ -8,22 +8,6 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := rddads -ifneq ($(HB_PLATFORM),dos) -ifneq ($(HB_PLATFORM),os2) - -ifeq ($(HB_INC_ADS),) - HB_INC_ADS := /usr/local/ads/acesdk $(HOME)/ads/acesdk -endif - -HB_INC_ADS_OK := $(foreach d, $(HB_INC_ADS), $(if $(wildcard $(d)/ace.h),$(d),)) - -endif -endif - -ifneq ($(strip $(HB_INC_ADS_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_ADS_OK),-I$(d)) - C_SOURCES := \ ads1.c \ adsfunc.c \ @@ -34,13 +18,27 @@ PRG_HEADERS := \ ads.ch \ adsextrn.ch \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := ads +_DET_VAR_INC_ := HB_INC_ADS +_DET_VAR_HAS_ := HB_HAS_ADS +_DET_FLT_PLAT := !dos !os2 +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/local/ads/acesdk $(HOME)/ads/acesdk +_DET_INC_HEAD := /ace.h +include $(TOP)$(ROOT)config/detfun.mk -install:: +ifneq ($(HB_HAS_ADS),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_ADS),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/rddsql/sddfb/Makefile b/harbour/contrib/rddsql/sddfb/Makefile index 395f904a36..97c36ccc9e 100644 --- a/harbour/contrib/rddsql/sddfb/Makefile +++ b/harbour/contrib/rddsql/sddfb/Makefile @@ -11,7 +11,7 @@ LIBNAME := sddfb C_SOURCES := \ fbirddd.c \ -_DET_DSP_NAME := Firebird +_DET_DSP_NAME := firebird _DET_VAR_INC_ := HB_INC_FIREBIRD _DET_VAR_HAS_ := HB_HAS_FIREBIRD _DET_FLT_PLAT := diff --git a/harbour/contrib/rddsql/sddmy/Makefile b/harbour/contrib/rddsql/sddmy/Makefile index 5cee8cbeac..a92e31f218 100644 --- a/harbour/contrib/rddsql/sddmy/Makefile +++ b/harbour/contrib/rddsql/sddmy/Makefile @@ -8,22 +8,30 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := sddmy -ifeq ($(HB_INC_MYSQL),) - ifeq ($(HB_XBUILD),) - HB_INC_MYSQL := /usr/include/mysql /opt/local/include/mysql5/mysql - endif -endif - -HB_INC_MYSQL_OK := $(foreach d, $(HB_INC_MYSQL), $(if $(wildcard $(d)/mysql.h),$(d),)) - -ifneq ($(strip $(HB_INC_MYSQL_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_MYSQL_OK),-I$(d)) - C_SOURCES := \ mysqldd.c \ -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := mysql +_DET_VAR_INC_ := HB_INC_MYSQL +_DET_VAR_HAS_ := HB_HAS_MYSQL +_DET_FLT_PLAT := +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/include/mysql /opt/local/include/mysql5/mysql +_DET_INC_HEAD := /mysql.h +include $(TOP)$(ROOT)config/detfun.mk + +ifneq ($(HB_HAS_MYSQL),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_MYSQL),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: + $(INSTALL_RULE_HEADERS) + else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/rddsql/sddodbc/Makefile b/harbour/contrib/rddsql/sddodbc/Makefile index b8bf7cb8d7..208ec0a224 100644 --- a/harbour/contrib/rddsql/sddodbc/Makefile +++ b/harbour/contrib/rddsql/sddodbc/Makefile @@ -8,45 +8,34 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := sddodbc -ifeq ($(HB_COMPILER),rsxnt) - HB_WITHOUT_ODBC := yes -endif -ifeq ($(HB_PLATFORM),dos) - HB_WITHOUT_ODBC := yes -endif -ifeq ($(HB_PLATFORM),os2) - HB_WITHOUT_ODBC := yes -endif - -ifneq ($(HB_PLATFORM),win) -ifneq ($(HB_PLATFORM),wce) -ifeq ($(HB_WITHOUT_ODBC),) - -ifeq ($(HB_INC_ODBC),) - ifeq ($(HB_XBUILD),) - HB_INC_ODBC := /usr/include /usr/local/include - endif -endif - -HB_INC_ODBC_OK := $(foreach d, $(HB_INC_ODBC), $(if $(wildcard $(d)/sql.h),$(d),)) - -ifneq ($(strip $(HB_INC_ODBC_OK)),) - HB_CFLAGS += $(foreach d,$(HB_INC_ODBC_OK),-I$(d)) -else - HB_WITHOUT_ODBC := yes -endif - -endif -endif -endif - -ifneq ($(HB_WITHOUT_ODBC),yes) - C_SOURCES := \ odbcdd.c \ -include $(TOP)$(ROOT)config/lib.mk +ifneq ($(filter $(HB_PLATFORM),win wce),) + HB_INC_ODBC := force +endif + +_DET_DSP_NAME := odbc +_DET_VAR_INC_ := HB_INC_ODBC +_DET_VAR_HAS_ := HB_HAS_ODBC +_DET_FLT_PLAT := !dos !os2 +_DET_FLT_COMP := !rsxnt +_DET_INC_DEFP := /usr/include /usr/local/include +_DET_INC_HEAD := /sql.h +include $(TOP)$(ROOT)config/detfun.mk + +ifneq ($(HB_HAS_ODBC),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_ODBC),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: + $(INSTALL_RULE_HEADERS) else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/rddsql/sddpg/Makefile b/harbour/contrib/rddsql/sddpg/Makefile index 10e5ca833c..49b7953dcc 100644 --- a/harbour/contrib/rddsql/sddpg/Makefile +++ b/harbour/contrib/rddsql/sddpg/Makefile @@ -8,22 +8,31 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := sddpg -ifeq ($(HB_INC_PGSQL),) - ifeq ($(HB_XBUILD),) - HB_INC_PGSQL := /usr/include /usr/local/pgsql/include /usr/local/pgsql/include/libpq /usr/include/pgsql /usr/include/postgresql /postgres/include /opt/local/include/postgresql83 - endif -endif - -HB_INC_PGSQL_OK := $(foreach d, $(HB_INC_PGSQL), $(if $(wildcard $(d)/libpq-fe.h),$(d),)) - -ifneq ($(strip $(HB_INC_PGSQL_OK)),) - -HB_CFLAGS += $(foreach d,$(HB_INC_PGSQL_OK),-I$(d)) - C_SOURCES := \ pgsqldd.c \ -include $(TOP)$(ROOT)config/lib.mk +_DET_DSP_NAME := postgresql +_DET_VAR_INC_ := HB_INC_PGSQL +_DET_VAR_HAS_ := HB_HAS_PGSQL +_DET_FLT_PLAT := +_DET_FLT_COMP := +_DET_INC_DEFP := /usr/include /usr/local/pgsql/include /usr/local/pgsql/include/libpq +_DET_INC_DEFP += /usr/include/pgsql /usr/include/postgresql /postgres/include /opt/local/include/postgresql83 +_DET_INC_HEAD := /libpq-fe.h +include $(TOP)$(ROOT)config/detfun.mk + +ifneq ($(HB_HAS_PGSQL),) + + HB_CFLAGS += $(foreach d,$(HB_HAS_PGSQL),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: + $(INSTALL_RULE_HEADERS) + else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/mpkg_deb.sh b/harbour/mpkg_deb.sh index 47164dddbb..3302b457bc 100755 --- a/harbour/mpkg_deb.sh +++ b/harbour/mpkg_deb.sh @@ -64,7 +64,7 @@ then export HB_CONTRIBLIBS="${HB_CONTRIBLIBS} hbhpdf" fi -if [ -z "$HB_WITHOUT_ADS" ] && \ +if ( [ -z "$HB_INC_ADS" ] || [ "$HB_INC_ADS" != "no" ] ) && \ [ ! -f "/usr/local/ads/acesdk/ace.h" ] && \ [ ! -f "${HOME}/ads/acesdk/ace.h" ] then @@ -103,7 +103,7 @@ then export HB_CONTRIBLIBS="${HB_CONTRIBLIBS} hbmysql" fi -if [ -z "$HB_WITHOUT_ODBC" ] && test_reqpkg unixodbc-dev +if [ -z "$HB_INC_ODBC" ] || [ "$HB_INC_ODBC" != "no" ] && test_reqpkg unixodbc-dev then export HB_CONTRIBLIBS="${HB_CONTRIBLIBS} hbodbc" fi