From e86699411594ffc074d276685a122479fa08831f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 21 Aug 2009 00:25:54 +0000 Subject: [PATCH] 2009-08-21 02:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/global.mk + Added Windows XP (or upper) detection. This will be shown with an '(xp)' mark in log. Please test, I don't have NT/2000 systems. * config/win/bcc.mk % For XP and upper now the default logic (so far only active with sh shells) is enabled which is more efficient and generates shorter log. Old one only kept to make Windows NT/2000 bcc users happy, this is the only win compiler which has such special support. * INSTALL * Minor. --- harbour/ChangeLog | 16 +++++++++++ harbour/INSTALL | 2 +- harbour/config/global.mk | 6 ++++- harbour/config/win/bcc.mk | 56 +++++++++++++++++++-------------------- 4 files changed, 49 insertions(+), 31 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8a015467cb..24d37ee098 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,22 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-21 02:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/global.mk + + Added Windows XP (or upper) detection. This will be shown + with an '(xp)' mark in log. Please test, I don't have NT/2000 + systems. + + * config/win/bcc.mk + % For XP and upper now the default logic (so far only active + with sh shells) is enabled which is more efficient and + generates shorter log. Old one only kept to make Windows + NT/2000 bcc users happy, this is the only win compiler which + has such special support. + + * INSTALL + * Minor. + 2009-08-21 00:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/common/watcom.mk * sh AR rule made the default. diff --git a/harbour/INSTALL b/harbour/INSTALL index c04847994c..b6c2a53ce6 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -372,7 +372,7 @@ OPTIONS AVAILABLE WHEN BUILDING HARBOUR -> dos/watcom -> os2/watcom -> linux/watcom - on MS-DOS hosts: + on MS-DOS compatible hosts: -> win/watcom -> os2/watcom -> linux/watcom diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 33016017fa..04962b786f 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -337,6 +337,10 @@ else HB_SHELL := dos else HB_SHELL := nt + _VER := $(shell ver) + ifeq ($(strip $(findstring 3.5,$(shell ver))$(findstring 4.0,$(shell ver))$(findstring 5.0,$(shell ver))),) + HB_SHELL_XP := (xp) + endif endif endif endif @@ -406,7 +410,7 @@ endif ifeq ($(HB_INIT_DONE),) ifneq ($(MAKE_381),) - $(info ! HB_HOST_ARCH: $(HB_HOST_ARCH) HB_SHELL: $(HB_SHELL)) + $(info ! HB_HOST_ARCH: $(HB_HOST_ARCH) HB_SHELL: $(HB_SHELL) $(HB_SHELL_XP)) endif endif diff --git a/harbour/config/win/bcc.mk b/harbour/config/win/bcc.mk index a8706a5d98..e4c37fe79c 100644 --- a/harbour/config/win/bcc.mk +++ b/harbour/config/win/bcc.mk @@ -49,39 +49,37 @@ LDFLAGS += $(LIBPATHS) AR := tlib.exe ARFLAGS := /P64 +AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) "$(subst /,\,$(LIB_DIR)/$@)" $(foreach file,$(^F),-+$(file)) ifneq ($(HB_SHELL),sh) + ifeq ($(HB_SHELL_XP),) + + ifeq ($(HB_SHELL),nt) + LINECONT := ^& + else + LINECONT := & + endif + + # NOTE: Command-line limit length defeating methods found below + # are only needed to support pre-Windows XP systems, where + # limit is 2047 chars. [vszakats] + + # NOTE: The empty line directly before 'endef' HAVE TO exist! + define lib_object + @$(ECHO) $(ECHOQUOTE)-+$(subst /,\,$(file)) $(LINECONT)$(ECHOQUOTE) >> __lib__.tmp + + endef + + define create_library + @$(ECHO) $(ECHOQUOTE)-+ $(LINECONT)$(ECHOQUOTE) > __lib__.tmp + $(foreach file,$(^F),$(lib_object)) + @$(ECHO) -+>> __lib__.tmp + $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) "$(subst /,\,$(LIB_DIR)/$@)" @__lib__.tmp + endef + + AR_RULE = $(create_library) - ifeq ($(HB_SHELL),nt) - LINECONT := ^& - else - LINECONT := & endif - - # NOTE: Command-line limit length defeating methods found below - # are only needed to support pre-Windows XP systems, where - # limit is 2047 chars. [vszakats] - - # NOTE: The empty line directly before 'endef' HAVE TO exist! - define lib_object - @$(ECHO) $(ECHOQUOTE)-+$(subst /,\,$(file)) $(LINECONT)$(ECHOQUOTE) >> __lib__.tmp - - endef - - define create_library - @$(ECHO) $(ECHOQUOTE)-+ $(LINECONT)$(ECHOQUOTE) > __lib__.tmp - $(foreach file,$(^F),$(lib_object)) - @$(ECHO) -+>> __lib__.tmp - $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) "$(subst /,\,$(LIB_DIR)/$@)" @__lib__.tmp - endef - - AR_RULE = $(create_library) - -else # sh - - AROBJS = $(foreach file,$(^F),-+$(file)) - AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) "$(subst /,\,$(LIB_DIR)/$@)" $(AROBJS) - endif include $(TOP)$(ROOT)config/rules.mk