From 93fe529517302015bbca42673455505924153c2e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 24 Aug 2009 00:04:06 +0000 Subject: [PATCH] 2009-08-24 02:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/global.mk + Will now show the autodetected compiler path. * utils/hbmk2/hbmk2.prg ! Fixed to not pass bogus resource source files to linker when resource compiling isn't supported on given compiler (win/icc). * config/common/watcom.mk ! Fixed double .exe extension (regression). * contrib/hbqt/Makefile * contrib/hbxbp/Makefile * contrib/gtqtc/Makefile + Experimental changes: Now showing reason why library was skipped. Configuration also works a little differently: HB_INC_QT should either be set to the header dir, or set to 'no' which will disables any autodetection (on *nix systems). This method replaces HB_HAVE_QT=no setting and leaves only one setting to control QT lib building. Experimental, probably the control method should be further tuned. Possible log messages: - component not found - component location not set - deselected - platform not supported - compiler not supported - (...) not supported + not necessary NOTE: I've used 3.81 'if/else if' structure here. % Streamlined the way darwin autodetection is solved. (not yet tested) * contrib/hbfbird/Makefile * contrib/hbfimage/Makefile % Optimized prerequisit check by using $(filter) * config/win/icc.mk ! Changed to use xilink instead of using the compiler for linking. This syncs it with msvc and hbmk2, and it also fixes .dll creation. + Added /nologo. * config/global.mk * config/wce/poccarm.mk * config/wce/msvcarm.mk * config/win/xcc.mk * config/win/pocc.mk * config/win/bcc.mk * config/win/watcom.mk * config/win/icc.mk * config/win/msvc.mk * config/rules.mk * config/os2/watcom.mk % Optimized OBJ_DYN_POSTFIX variable to be an internal one, it doesn't need to be set in compiler .mk file anymore. If there is any extra C compiler flag set for dynamic mode, it will be set automatically. --- harbour/ChangeLog | 61 ++++++++++++++ harbour/config/common/watcom.mk | 2 +- harbour/config/global.mk | 88 +++++++++++++------- harbour/config/os2/watcom.mk | 1 - harbour/config/rules.mk | 6 ++ harbour/config/wce/msvcarm.mk | 1 - harbour/config/wce/poccarm.mk | 1 - harbour/config/win/bcc.mk | 1 - harbour/config/win/icc.mk | 21 +++-- harbour/config/win/msvc.mk | 1 - harbour/config/win/pocc.mk | 1 - harbour/config/win/watcom.mk | 1 - harbour/config/win/xcc.mk | 1 - harbour/contrib/gtqtc/Makefile | 121 +++++++++++++-------------- harbour/contrib/hbfbird/Makefile | 6 +- harbour/contrib/hbfimage/Makefile | 14 +--- harbour/contrib/hbqt/Makefile | 117 +++++++++++++------------- harbour/contrib/hbxbp/Makefile | 131 ++++++++++++++---------------- harbour/utils/hbmk2/hbmk2.prg | 6 ++ 19 files changed, 317 insertions(+), 264 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index cf33f9b928..4822d75b63 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,67 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-24 02:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/global.mk + + Will now show the autodetected compiler path. + + * utils/hbmk2/hbmk2.prg + ! Fixed to not pass bogus resource source files to linker when + resource compiling isn't supported on given compiler (win/icc). + + * config/common/watcom.mk + ! Fixed double .exe extension (regression). + + * contrib/hbqt/Makefile + * contrib/hbxbp/Makefile + * contrib/gtqtc/Makefile + + Experimental changes: + Now showing reason why library was skipped. + Configuration also works a little differently: + HB_INC_QT should either be set to the header dir, + or set to 'no' which will disables any autodetection + (on *nix systems). This method replaces HB_HAVE_QT=no + setting and leaves only one setting to control QT + lib building. Experimental, probably the control + method should be further tuned. + Possible log messages: + - component not found + - component location not set + - deselected + - platform not supported + - compiler not supported + - (...) not supported + + not necessary + NOTE: I've used 3.81 'if/else if' structure here. + % Streamlined the way darwin autodetection is solved. + (not yet tested) + + * contrib/hbfbird/Makefile + * contrib/hbfimage/Makefile + % Optimized prerequisit check by using $(filter) + + * config/win/icc.mk + ! Changed to use xilink instead of using the compiler for + linking. This syncs it with msvc and hbmk2, and it also + fixes .dll creation. + + Added /nologo. + + * config/global.mk + * config/wce/poccarm.mk + * config/wce/msvcarm.mk + * config/win/xcc.mk + * config/win/pocc.mk + * config/win/bcc.mk + * config/win/watcom.mk + * config/win/icc.mk + * config/win/msvc.mk + * config/rules.mk + * config/os2/watcom.mk + % Optimized OBJ_DYN_POSTFIX variable to be an internal one, + it doesn't need to be set in compiler .mk file anymore. + If there is any extra C compiler flag set for dynamic mode, + it will be set automatically. + 2009-08-23 19:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) - doc/howtobsd.txt * doc/Makefile diff --git a/harbour/config/common/watcom.mk b/harbour/config/common/watcom.mk index daba5e3d2a..e930d40597 100644 --- a/harbour/config/common/watcom.mk +++ b/harbour/config/common/watcom.mk @@ -26,7 +26,7 @@ ARFLAGS := -q -p=64 -c -n comma := , LDFILES_COMMA = $(subst $(subst x,x, ),$(comma) ,$(^F)) LDLIBS_COMMA := $(subst $(subst x,x, ),$(comma) ,$(strip $(LDLIBS))) -LD_RULE = $(LD) $(LDFLAGS) $(HB_USER_LDFLAGS) NAME $(BIN_DIR)/$@$(BIN_EXT) FILE $(LDFILES_COMMA) $(if $(LDLIBS_COMMA), LIB $(LDLIBS_COMMA),) +LD_RULE = $(LD) $(LDFLAGS) $(HB_USER_LDFLAGS) NAME $(BIN_DIR)/$@ FILE $(LDFILES_COMMA) $(if $(LDLIBS_COMMA), LIB $(LDLIBS_COMMA),) AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) $(LIB_DIR)/$@ $(foreach file,$(^F),-+$(file)) ifeq ($(HB_SHELL),os2) diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 5371455db7..54af099077 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -37,6 +37,9 @@ HB_VER_STATUS_SH := b2 -include $(TOP)$(ROOT)config/conf.mk +# Arbitrary pattern which we don't expect to occur in real-world path names +substpat := !@!@ + # This isn't strictly necessary, but it does signficantly reduce # the number of rules that make has to evaluate otherwise, which may give # a performance boost on a slow system. @@ -56,17 +59,17 @@ MAKE_381 := $(filter $(need),$(firstword $(sort $(MAKE_VERSION) $(need)))) # Don't indent this subroutine define find_in_path -$(strip $(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),#,$(PATH))), $(wildcard $(subst #,\ ,$(subst \,/,$(dir)))/$(1)$(HB_HOST_BIN_EXT)))) +$(strip $(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),$(substpat),$(PATH))), $(wildcard $(subst $(substpat),\ ,$(subst \,/,$(dir)))/$(1)$(HB_HOST_BIN_EXT)))) endef # Don't indent this subroutine define find_in_path_par -$(strip $(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),#,$(2))), $(wildcard $(subst #,\ ,$(subst \,/,$(dir)))/$(1)$(HB_HOST_BIN_EXT)))) +$(strip $(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),$(substpat),$(2))), $(wildcard $(subst $(substpat),\ ,$(subst \,/,$(dir)))/$(1)$(HB_HOST_BIN_EXT)))) endef # Don't indent this subroutine define find_in_path_raw -$(strip $(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),#,$(2))), $(wildcard $(subst #,\ ,$(subst \,/,$(dir)))/$(1)))) +$(strip $(foreach dir, $(subst $(PTHSEP), ,$(subst $(subst x, ,x),$(substpat),$(2))), $(wildcard $(subst $(substpat),\ ,$(subst \,/,$(dir)))/$(1)))) endef define check_host @@ -507,6 +510,7 @@ ifeq ($(HB_PLATFORM),) endif HB_COMP_AUTO := +HB_COMP_PATH := ifeq ($(HB_COMPILER),) ifneq ($(HB_HOST_PLAT),$(HB_PLATFORM)) # cross-build section *nix -> win/wce @@ -561,6 +565,7 @@ ifeq ($(HB_COMPILER),) endif ifneq ($(HB_CCPATH)$(HB_CCPREFIX),) + HB_COMP_PATH := $(dir $(HB_CCPATH)) HB_COMPILER := mingw HB_PLATFORM := win export HB_TOOLS_PREF := hbw @@ -623,6 +628,7 @@ ifeq ($(HB_COMPILER),) endif ifneq ($(HB_CCPATH)$(HB_CCPREFIX),) + HB_COMP_PATH := $(dir $(HB_CCPATH)) HB_PLATFORM := wce export HB_TOOLS_PREF := hbce export HB_XBUILD := wce @@ -638,58 +644,73 @@ ifeq ($(HB_COMPILER),) endif ifeq ($(HB_COMPILER),) ifeq ($(HB_PLATFORM),win) - ifneq ($(call find_in_path,arm-wince-mingw32ce-gcc),) + HB_COMP_PATH := $(call find_in_path,arm-wince-mingw32ce-gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := mingwarm HB_PLATFORM := wce HB_CCPREFIX := arm-wince-mingw32ce- else - ifneq ($(call find_in_path,arm-mingw32ce-gcc),) + HB_COMP_PATH := $(call find_in_path,arm-mingw32ce-gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := mingwarm HB_PLATFORM := wce HB_CCPREFIX := arm-mingw32ce- else - ifneq ($(call find_in_path,i386-mingw32ce-gcc),) + HB_COMP_PATH := $(call find_in_path,i386-mingw32ce-gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := mingw HB_PLATFORM := wce HB_CCPREFIX := i386-mingw32ce- else - ifneq ($(call find_in_path,cygstart),) + HB_COMP_PATH := $(call find_in_path,cygstart) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := cygwin else - ifneq ($(call find_in_path,gcc),) + HB_COMP_PATH := $(call find_in_path,gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := mingw else - ifneq ($(call find_in_path,wpp386),) + HB_COMP_PATH := $(call find_in_path,wpp386) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := watcom else - ifneq ($(call find_in_path,clarm),) + HB_COMP_PATH := $(call find_in_path,clarm) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := msvcarm HB_PLATFORM := wce export HB_VISUALC_VER_PRE80 := yes else - ifneq ($(call find_in_path,armasm),) + HB_COMP_PATH := $(call find_in_path,armasm) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := msvcarm HB_PLATFORM := wce else - ifneq ($(call find_in_path,ml64),) + HB_COMP_PATH := $(call find_in_path,ml64) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := msvc64 else - ifneq ($(call find_in_path,icl),) + HB_COMP_PATH := $(call find_in_path,icl) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := icc else - ifneq ($(call find_in_path,cl),) + HB_COMP_PATH := $(call find_in_path,cl) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := msvc else - ifneq ($(call find_in_path,bcc32),) + HB_COMP_PATH := $(call find_in_path,bcc32) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := bcc else - ifneq ($(call find_in_path,pocc),) + HB_COMP_PATH := $(call find_in_path,pocc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := pocc else - ifneq ($(call find_in_path,xcc),) + HB_COMP_PATH := $(call find_in_path,xcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := xcc else - ifneq ($(call find_in_path,x86_64-w64-mingw32-gcc),) + HB_COMP_PATH := $(call find_in_path,x86_64-w64-mingw32-gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := mingw64 HB_CCPREFIX := x86_64-w64-mingw32- endif @@ -709,42 +730,51 @@ ifeq ($(HB_COMPILER),) endif else ifeq ($(HB_PLATFORM),linux) - ifneq ($(call find_in_path,wpp386),) + HB_COMP_PATH := $(call find_in_path,wpp386) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := watcom else - ifneq ($(call find_in_path,gcc),) + HB_COMP_PATH := $(call find_in_path,gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := gcc endif endif else ifneq ($(filter $(HB_PLATFORM),darwin hpux bsd),) - ifneq ($(call find_in_path,gcc),) + HB_COMP_PATH := $(call find_in_path,gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := gcc endif else ifeq ($(HB_PLATFORM),sunos) - ifneq ($(call find_in_path,suncc),) + HB_COMP_PATH := $(call find_in_path,suncc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := sunpro else - ifneq ($(call find_in_path,gcc),) + HB_COMP_PATH := $(call find_in_path,gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := gcc endif endif else ifeq ($(HB_PLATFORM),dos) - ifneq ($(call find_in_path,gcc),) + HB_COMP_PATH := $(call find_in_path,gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := djgpp else - ifneq ($(call find_in_path,wpp386),) + HB_COMP_PATH := $(call find_in_path,wpp386) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := watcom endif endif else ifeq ($(HB_PLATFORM),os2) - ifneq ($(call find_in_path,gcc),) + HB_COMP_PATH := $(call find_in_path,gcc) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := gcc else - ifneq ($(call find_in_path,wpp386),) + HB_COMP_PATH := $(call find_in_path,wpp386) + ifneq ($(HB_COMP_PATH),) HB_COMPILER := watcom endif endif @@ -758,7 +788,8 @@ ifeq ($(HB_COMPILER),) endif endif ifneq ($(HB_COMPILER),) - HB_COMP_AUTO := (autodetected) + HB_COMP_PATH := $(subst $(substpat), ,$(dir $(subst $(subst x, ,x),$(substpat),$(HB_COMP_PATH)))) + HB_COMP_AUTO := (autodetected$(if $(HB_COMP_PATH),: $(HB_COMP_PATH),)) endif export HB_CCPATH export HB_CCPREFIX @@ -799,7 +830,6 @@ ifeq ($(ROOT),./) else PKG_DIR := endif -OBJ_DYN_POSTFIX := # Assemble relative path from OBJ_DIR to source. GRANDP := $(subst $(subst x,x, ),,$(foreach item, $(subst /, ,$(OBJ_DIR)), ../)) diff --git a/harbour/config/os2/watcom.mk b/harbour/config/os2/watcom.mk index 139fad2efb..eb546585fe 100644 --- a/harbour/config/os2/watcom.mk +++ b/harbour/config/os2/watcom.mk @@ -9,7 +9,6 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn ifeq ($(HB_BUILD_MODE),c) CC := wcc386 diff --git a/harbour/config/rules.mk b/harbour/config/rules.mk index e340a6ca6e..21a6985c71 100644 --- a/harbour/config/rules.mk +++ b/harbour/config/rules.mk @@ -20,6 +20,12 @@ ifeq ($(HB_BUILD_UNICODE),yes) HB_CFLAGS := -DUNICODE $(HB_CFLAGS) endif +ifeq ($(HB_DYN_COPT),) + OBJ_DYN_POSTFIX := +else + OBJ_DYN_POSTFIX := _dyn +endif + # How to run Harbour HB := $(HB_HOST_BIN_DIR)/harbour$(HB_HOST_BIN_EXT) HB_FLAGS := -n1 $(HB_INC_DEPEND) -i$(HB_INC_COMPILE) -q0 -w3 -es2 -kmo $(HB_PRGFLAGS) diff --git a/harbour/config/wce/msvcarm.mk b/harbour/config/wce/msvcarm.mk index edb5b634fa..38a4a2ea5f 100644 --- a/harbour/config/wce/msvcarm.mk +++ b/harbour/config/wce/msvcarm.mk @@ -7,7 +7,6 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn CC := cl.exe ifeq ($(HB_COMPILER),msvcarm) diff --git a/harbour/config/wce/poccarm.mk b/harbour/config/wce/poccarm.mk index c977109112..5a2773f562 100644 --- a/harbour/config/wce/poccarm.mk +++ b/harbour/config/wce/poccarm.mk @@ -9,7 +9,6 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn CC := pocc.exe CC_IN := -c diff --git a/harbour/config/win/bcc.mk b/harbour/config/win/bcc.mk index 3549b06265..b9798462c0 100644 --- a/harbour/config/win/bcc.mk +++ b/harbour/config/win/bcc.mk @@ -9,7 +9,6 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn CC := bcc32.exe CC_IN := -c diff --git a/harbour/config/win/icc.mk b/harbour/config/win/icc.mk index eac1396bdd..e641916ac7 100644 --- a/harbour/config/win/icc.mk +++ b/harbour/config/win/icc.mk @@ -10,14 +10,13 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn CC := icl.exe CC_IN := -c CC_OUT := -Fo -CPPFLAGS := -nologo -I. -I$(HB_INC_COMPILE) -CFLAGS := -Gs +CPPFLAGS := -nologo -I. -I$(HB_INC_COMPILE) -Gs +CFLAGS := LDFLAGS := ifeq ($(HB_BUILD_MODE),c) @@ -28,30 +27,30 @@ ifeq ($(HB_BUILD_MODE),cpp) endif ifneq ($(HB_BUILD_WARN),no) - CFLAGS += -W3 + CPPFLAGS += -W3 endif ifneq ($(HB_BUILD_OPTIM),no) # maximum optimizations - # CFLAGS += -Ox - CFLAGS += -O3 + # CPPFLAGS += -Ox + CPPFLAGS += -O3 endif ifeq ($(HB_BUILD_DEBUG),yes) - CFLAGS += -Zi + CPPFLAGS += -Zi endif -LD := icl.exe -LD_OUT := -Fe +LD := xilink.exe +LD_OUT := /out: LIBPATHS := /libpath:$(LIB_DIR) LDLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT)) -LDFLAGS += /link $(LIBPATHS) +LDFLAGS += /nologo $(LIBPATHS) AR := xilib.exe ARFLAGS := -AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) /out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) /nologo /out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ DY := $(LD) DFLAGS := /nologo /dll /subsystem:console diff --git a/harbour/config/win/msvc.mk b/harbour/config/win/msvc.mk index dc2904fd91..d8ba797524 100644 --- a/harbour/config/win/msvc.mk +++ b/harbour/config/win/msvc.mk @@ -7,7 +7,6 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn CC := cl.exe CC_IN := -c diff --git a/harbour/config/win/pocc.mk b/harbour/config/win/pocc.mk index e3b0429cc3..4c6918c386 100644 --- a/harbour/config/win/pocc.mk +++ b/harbour/config/win/pocc.mk @@ -9,7 +9,6 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn CC := pocc.exe CC_IN := -c diff --git a/harbour/config/win/watcom.mk b/harbour/config/win/watcom.mk index 23386e41bc..40949eb4b0 100644 --- a/harbour/config/win/watcom.mk +++ b/harbour/config/win/watcom.mk @@ -9,7 +9,6 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn ifeq ($(HB_BUILD_MODE),c) CC := wcc386 diff --git a/harbour/config/win/xcc.mk b/harbour/config/win/xcc.mk index a3dd9a47d1..de97b32274 100644 --- a/harbour/config/win/xcc.mk +++ b/harbour/config/win/xcc.mk @@ -9,7 +9,6 @@ LIB_PREF := LIB_EXT := .lib HB_DYN_COPT := -DHB_DYNLIB -OBJ_DYN_POSTFIX := _dyn CC := xcc.exe CC_IN := -c diff --git a/harbour/contrib/gtqtc/Makefile b/harbour/contrib/gtqtc/Makefile index a5a4dc695f..f707f0bc79 100644 --- a/harbour/contrib/gtqtc/Makefile +++ b/harbour/contrib/gtqtc/Makefile @@ -8,83 +8,76 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := gtqtc -ifeq ($(HB_WITH_QT),) - HB_WITH_QT := yes - ifeq ($(HB_PLATFORM),dos) - HB_WITH_QT := no - endif - ifeq ($(HB_PLATFORM),os2) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),mingw64) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),watcom) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),bcc) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),pocc) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),pocc64) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),poccarm) - HB_WITH_QT := no - endif +ifneq ($(filter $(HB_PLATFORM),dos os2),) + PREREQ_MISS := platform +else ifneq ($(filter $(HB_COMPILER),mingw64 watcom bcc pocc pocc64 poccarm),) + PREREQ_MISS := compiler +else + PREREQ_MISS := endif -ifeq ($(HB_WITH_QT),yes) +ifeq ($(PREREQ_MISS),) -ifeq ($(HB_INC_QT),) - ifeq ($(HB_XBUILD),) - HB_INC_QT := /usr/include/qt4 /usr/lib/qt4/include /usr/include /Developer/qt/include - endif -endif + ifneq ($(HB_INC_QT),no) -HB_INC_QT_OK := $(foreach d, $(HB_INC_QT), $(if $(wildcard $(d)/Qt/qglobal.h),$(d),)) -ifeq ($(HB_PLATFORM),darwin) - ifeq ($(strip $(HB_INC_QT_OK)),) - HB_INC_QT_OK := $(if $(wildcard /Library/Frameworks/QtCore.framework/Versions/4/Headers/QtCore),spec,) - ifeq ($(HB_INC_QT_OK),spec) - HB_CFLAGS += -I/Library/Frameworks/QtCore.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtGui.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtNetwork.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtWebKit.framework/Headers + ifeq ($(HB_INC_QT),) + ifeq ($(HB_XBUILD),) + ifeq ($(HB_OS_UNIX),yes) + HB_INC_QT := /usr/include/qt4 /usr/lib/qt4/include /usr/include /Developer/qt/include + ifeq ($(HB_PLATFORM),darwin) + HB_INC_QT += /Library/Frameworks/QtCore.framework/Versions/4/Headers/QtCore + endif + endif + endif endif - endif -endif -ifneq ($(strip $(HB_INC_QT_OK)),) + ifneq ($(HB_INC_QT),) -ifneq ($(HB_QT_STATIC),) - LIBNAME=gtqtcs - HB_CFLAGS += -DQT_NODLL -endif + HB_INC_QT_OK := $(strip $(foreach d, $(HB_INC_QT), $(if $(wildcard $(d)/Qt/qglobal.h),$(d),))) -ifneq ($(strip $(HB_INC_QT_OK)),spec) - HB_CFLAGS += $(foreach d,$(HB_INC_QT_OK),-I$(d) -I$(d)/Qt -I$(d)/QtCore -I$(d)/QtGui -I$(d)/QtNetwork -I$(d)/QtWebKit) -endif + ifneq ($(HB_INC_QT_OK),) -CPP_SOURCES := \ - gtqtc.cpp \ - moc_gtqtc.cpp \ + ifneq ($(HB_QT_STATIC),) + LIBNAME := gtqtcs + HB_CFLAGS += -DQT_NODLL + endif -C_HEADERS := \ - gtqtc.h \ + ifeq ($(HB_INC_QT_OK),/Library/Frameworks/QtCore.framework/Versions/4/Headers/QtCore) + HB_CFLAGS += -I/Library/Frameworks/QtCore.framework/Headers + HB_CFLAGS += -I/Library/Frameworks/QtGui.framework/Headers + HB_CFLAGS += -I/Library/Frameworks/QtNetwork.framework/Headers + HB_CFLAGS += -I/Library/Frameworks/QtWebKit.framework/Headers + else + HB_CFLAGS += $(foreach d,$(HB_INC_QT_OK),-I$(d) -I$(d)/Qt -I$(d)/QtCore -I$(d)/QtGui -I$(d)/QtNetwork -I$(d)/QtWebKit) + endif -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk + CPP_SOURCES := \ + gtqtc.cpp \ + moc_gtqtc.cpp \ -install:: + C_HEADERS := \ + gtqtc.h \ + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) + else + HB_SKIP_REASON := component not found + include $(TOP)$(ROOT)config/none.mk + endif + else + HB_SKIP_REASON := component location not set + include $(TOP)$(ROOT)config/none.mk + endif + else + HB_SKIP_REASON := deselected + include $(TOP)$(ROOT)config/none.mk + endif else -include $(TOP)$(ROOT)config/none.mk -endif -else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(PREREQ_MISS) not supported + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbfbird/Makefile b/harbour/contrib/hbfbird/Makefile index 4ad4eb9b17..5243599d19 100644 --- a/harbour/contrib/hbfbird/Makefile +++ b/harbour/contrib/hbfbird/Makefile @@ -8,8 +8,7 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbfbird -ifneq ($(HB_COMPILER),pocc64) -ifneq ($(HB_COMPILER),poccarm) +ifeq ($(filter $(HB_COMPILER),pocc64 poccarm),) ifeq ($(HB_INC_FIREBIRD),) ifeq ($(HB_XBUILD),) @@ -37,6 +36,3 @@ endif else include $(TOP)$(ROOT)config/none.mk endif -else -include $(TOP)$(ROOT)config/none.mk -endif diff --git a/harbour/contrib/hbfimage/Makefile b/harbour/contrib/hbfimage/Makefile index d1f8e7aab2..d746ef0f57 100644 --- a/harbour/contrib/hbfimage/Makefile +++ b/harbour/contrib/hbfimage/Makefile @@ -10,11 +10,8 @@ LIBNAME := hbfimage HB_INC_FREEIMAGE_OK := -ifneq ($(HB_PLATFORM),dos) -# disabled until a proper solution is found for type collision -ifneq ($(HB_PLATFORM),os2) -ifneq ($(HB_PLATFORM),linux) -ifneq ($(HB_PLATFORM),darwin) +# disabled until a proper solution is found for type collision (except for dos) +ifeq ($(filter $(HB_PLATFORM),dos os2 linux darwin),) ifeq ($(HB_INC_FREEIMAGE),) ifeq ($(HB_XBUILD),) @@ -23,7 +20,6 @@ ifeq ($(HB_INC_FREEIMAGE),) endif HB_INC_FREEIMAGE_OK := $(foreach d, $(HB_INC_FREEIMAGE), $(if $(wildcard $(d)/FreeImage.h),$(d),)) -endif ifneq ($(strip $(HB_INC_FREEIMAGE_OK)),) @@ -51,9 +47,3 @@ endif else include $(TOP)$(ROOT)config/none.mk endif -else -include $(TOP)$(ROOT)config/none.mk -endif -else -include $(TOP)$(ROOT)config/none.mk -endif diff --git a/harbour/contrib/hbqt/Makefile b/harbour/contrib/hbqt/Makefile index 6e70a1f475..2c60c4ef15 100644 --- a/harbour/contrib/hbqt/Makefile +++ b/harbour/contrib/hbqt/Makefile @@ -8,81 +8,74 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbqt -ifeq ($(HB_WITH_QT),) - HB_WITH_QT := yes - ifeq ($(HB_PLATFORM),dos) - HB_WITH_QT := no - endif - ifeq ($(HB_PLATFORM),os2) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),mingw64) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),watcom) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),bcc) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),pocc) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),pocc64) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),poccarm) - HB_WITH_QT := no - endif +ifneq ($(filter $(HB_PLATFORM),dos os2),) + PREREQ_MISS := platform +else ifneq ($(filter $(HB_COMPILER),mingw64 watcom bcc pocc pocc64 poccarm),) + PREREQ_MISS := compiler +else + PREREQ_MISS := endif -ifeq ($(HB_WITH_QT),yes) +ifeq ($(PREREQ_MISS),) -ifeq ($(HB_INC_QT),) - ifeq ($(HB_XBUILD),) - HB_INC_QT := /usr/include/qt4 /usr/lib/qt4/include /usr/include /Developer/qt/include - endif -endif + ifneq ($(HB_INC_QT),no) -HB_INC_QT_OK := $(foreach d, $(HB_INC_QT), $(if $(wildcard $(d)/Qt/qglobal.h),$(d),)) -ifeq ($(HB_PLATFORM),darwin) - ifeq ($(strip $(HB_INC_QT_OK)),) - HB_INC_QT_OK := $(if $(wildcard /Library/Frameworks/QtCore.framework/Versions/4/Headers/QtCore),spec,) - ifeq ($(HB_INC_QT_OK),spec) - HB_CFLAGS += -I/Library/Frameworks/QtCore.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtGui.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtNetwork.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtWebKit.framework/Headers + ifeq ($(HB_INC_QT),) + ifeq ($(HB_XBUILD),) + ifeq ($(HB_OS_UNIX),yes) + HB_INC_QT := /usr/include/qt4 /usr/lib/qt4/include /usr/include /Developer/qt/include + ifeq ($(HB_PLATFORM),darwin) + HB_INC_QT += /Library/Frameworks/QtCore.framework/Versions/4/Headers/QtCore + endif + endif + endif endif - endif -endif -ifneq ($(strip $(HB_INC_QT_OK)),) + ifneq ($(HB_INC_QT),) -ifneq ($(HB_QT_STATIC),) - LIBNAME := hbqts - HB_CFLAGS += -DQT_NODLL -endif + HB_INC_QT_OK := $(strip $(foreach d, $(HB_INC_QT), $(if $(wildcard $(d)/Qt/qglobal.h),$(d),))) -ifneq ($(strip $(HB_INC_QT_OK)),spec) - HB_CFLAGS += $(foreach d,$(HB_INC_QT_OK),-I$(d) -I$(d)/Qt -I$(d)/QtCore -I$(d)/QtGui -I$(d)/QtNetwork -I$(d)/QtWebKit) -endif + ifneq ($(HB_INC_QT_OK),) -include $(TOP)$(ROOT)contrib/hbqt/filelist.mk + ifneq ($(HB_QT_STATIC),) + LIBNAME := hbqts + HB_CFLAGS += -DQT_NODLL + endif -PRG_HEADERS := \ - hbqt.ch \ + ifeq ($(HB_INC_QT_OK),/Library/Frameworks/QtCore.framework/Versions/4/Headers/QtCore) + HB_CFLAGS += -I/Library/Frameworks/QtCore.framework/Headers + HB_CFLAGS += -I/Library/Frameworks/QtGui.framework/Headers + HB_CFLAGS += -I/Library/Frameworks/QtNetwork.framework/Headers + HB_CFLAGS += -I/Library/Frameworks/QtWebKit.framework/Headers + else + HB_CFLAGS += $(foreach d,$(HB_INC_QT_OK),-I$(d) -I$(d)/Qt -I$(d)/QtCore -I$(d)/QtGui -I$(d)/QtNetwork -I$(d)/QtWebKit) + endif -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk + include $(TOP)$(ROOT)contrib/hbqt/filelist.mk -install:: + PRG_HEADERS := \ + hbqt.ch \ + + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) + else + HB_SKIP_REASON := component not found + include $(TOP)$(ROOT)config/none.mk + endif + else + HB_SKIP_REASON := component location not set + include $(TOP)$(ROOT)config/none.mk + endif + else + HB_SKIP_REASON := deselected + include $(TOP)$(ROOT)config/none.mk + endif else -include $(TOP)$(ROOT)config/none.mk -endif -else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(PREREQ_MISS) not supported + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/hbxbp/Makefile b/harbour/contrib/hbxbp/Makefile index f1ba108035..41aca82f40 100644 --- a/harbour/contrib/hbxbp/Makefile +++ b/harbour/contrib/hbxbp/Makefile @@ -6,87 +6,74 @@ ROOT := ../../ include $(TOP)$(ROOT)config/global.mk -HB_INC_DEPEND := -I$(TOP)$(ROOT)contrib/hbqt - LIBNAME := hbxbp -ifeq ($(HB_WITH_QT),) - HB_WITH_QT := yes - ifeq ($(HB_PLATFORM),dos) - HB_WITH_QT := no - endif - ifeq ($(HB_PLATFORM),os2) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),mingw64) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),watcom) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),bcc) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),pocc) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),pocc64) - HB_WITH_QT := no - endif - ifeq ($(HB_COMPILER),poccarm) - HB_WITH_QT := no - endif +HB_INC_DEPEND := -I$(TOP)$(ROOT)contrib/hbqt + +ifneq ($(filter $(HB_PLATFORM),dos os2),) + PREREQ_MISS := platform +else ifneq ($(filter $(HB_COMPILER),mingw64 watcom bcc pocc pocc64 poccarm),) + PREREQ_MISS := compiler +else + PREREQ_MISS := endif -ifeq ($(HB_WITH_QT),yes) +ifeq ($(PREREQ_MISS),) -PRG_SOURCES := \ - xbpgeneric.prg \ - xbpdialog.prg \ - xbpwindow.prg \ - xbpparthandler.prg \ - xbpmenubar.prg \ - xbptoolbar.prg \ - xbppushbutton.prg \ - xbpdataref.prg \ - xbpcheckbox.prg \ - xbp3state.prg \ - xbpradiobutton.prg \ - xbptabpage.prg \ - xbplistbox.prg \ - xbpstatusbar.prg \ - xbpscrollbar.prg \ - xbpsle.prg \ - xbpmle.prg \ - xbpspinbutton.prg \ - xbpcombobox.prg \ - xbptreeview.prg \ - xbpstyle.prg \ - xbpappevent.prg \ - xbpstatic.prg \ - xbphtmlviewer.prg \ - xbpfiledialog.prg \ - xbpfontdialog.prg \ - xbpbitmap.prg \ - xbprtf.prg \ - xbppresspace.prg \ - xbpprinter.prg \ - xbpprintdialog.prg \ - xbpbrowse.prg \ + ifneq ($(HB_INC_QT),no) -PRG_HEADERS := \ - xbp.ch \ - xbpdev.ch \ - appevent.ch \ - gra.ch \ + PRG_SOURCES := \ + xbpgeneric.prg \ + xbpdialog.prg \ + xbpwindow.prg \ + xbpparthandler.prg \ + xbpmenubar.prg \ + xbptoolbar.prg \ + xbppushbutton.prg \ + xbpdataref.prg \ + xbpcheckbox.prg \ + xbp3state.prg \ + xbpradiobutton.prg \ + xbptabpage.prg \ + xbplistbox.prg \ + xbpstatusbar.prg \ + xbpscrollbar.prg \ + xbpsle.prg \ + xbpmle.prg \ + xbpspinbutton.prg \ + xbpcombobox.prg \ + xbptreeview.prg \ + xbpstyle.prg \ + xbpappevent.prg \ + xbpstatic.prg \ + xbphtmlviewer.prg \ + xbpfiledialog.prg \ + xbpfontdialog.prg \ + xbpbitmap.prg \ + xbprtf.prg \ + xbppresspace.prg \ + xbpprinter.prg \ + xbpprintdialog.prg \ + xbpbrowse.prg \ -include $(TOP)$(ROOT)config/header.mk -INSTALL_RULE_HEADERS := $(INSTALL_RULE) -include $(TOP)$(ROOT)config/lib.mk + PRG_HEADERS := \ + xbp.ch \ + xbpdev.ch \ + appevent.ch \ + gra.ch \ -install:: + include $(TOP)$(ROOT)config/header.mk + INSTALL_RULE_HEADERS := $(INSTALL_RULE) + include $(TOP)$(ROOT)config/lib.mk + + install:: $(INSTALL_RULE_HEADERS) + else + HB_SKIP_REASON := deselected + include $(TOP)$(ROOT)config/none.mk + endif else -include $(TOP)$(ROOT)config/none.mk + HB_SKIP_REASON := $(PREREQ_MISS) not supported + include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 57b95c7b9d..534b1ba5d5 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -3411,6 +3411,12 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) ENDIF ENDIF + /* Avoid this list being added at link phase if resource compiling isn't available + in target compiler. */ + IF Empty( cBin_Res ) + ASize( hbmk[ _HBMK_aRESSRC ], 0 ) + ENDIF + IF Len( l_aRESSRC_TODO ) > 0 .AND. ! Empty( cBin_Res ) .AND. ! l_lCLEAN IF hbmk[ _HBMK_lINC ] .AND. ! hbmk[ _HBMK_lQuiet ]