From 419e6e8e042eb2d8d32e3fb05247478aeba714b4 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 4 Feb 2008 08:32:17 +0000 Subject: [PATCH] 2008-02-04 09:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/harbour.spec * harbour/harbour-ce-spec * harbour/harbour-w32-spec * updated for new library names * harbour/ChangeLog * harbour/include/hbexprb.c * formatting * harbour/source/rtl/net.c ! fixed casting * harbour/harbour.spec * harbour/harbour-ce-spec * harbour/harbour-w32-spec * harbour/contrib/Makefile * removed hbzlib - it cannot be longer part of default build because Viktor removed zlib header files. Viktor sorry but IMHO you should revert it and also restore ace.h - it creates serious problems without any valuable addition. Now we will have to rebuild Harbour on many different platforms and often it will not be possible to install some libraries. We cannot force installing additional libs by people who will create binaries for incoming releases so it's important to revert it. Please do it. * harbour/config/bsd/install.cf * harbour/config/darwin/install.cf * harbour/config/hpux/install.cf * harbour/config/linux/install.cf * harbour/config/sunos/install.cf * harbour/config/dos/install.cf * harbour/config/os2/install.cf * harbour/config/w32/install.cf * redirected echo error messages to stderr when *sh shell is used * harbour/config/lib.cf * harbour/config/bin.cf * harbour/config/global.cf * harbour/config/hpux/gcc.cf * harbour/config/hpux/global.cf * harbour/config/darwin/gcc.cf * harbour/config/darwin/global.cf * harbour/config/dos/owatcom.cf * harbour/config/dos/global.cf * harbour/config/dos/rsx32.cf * harbour/config/global.cf * harbour/config/linux/owatcom.cf * harbour/config/linux/global.cf * harbour/config/os2/gcc.cf * harbour/config/os2/global.cf * harbour/config/sunos/gcc.cf * harbour/config/sunos/global.cf * harbour/config/bsd/global.cf * harbour/config/w32/owatcom.cf * harbour/config/w32/bcc32.cf * harbour/config/w32/gcc.cf * harbour/config/w32/rsxnt.cf * harbour/config/w32/global.cf ! fixed build process. DOS and WINDOWS users should make tests for different compilers. I tested only DOS-OpenWatcom, DOS-DJGPP, W32-BCC32, W32-OpenWatcom, W32-POCC, W32-XCC and corss builds W32-MinGW, W32-MinGW-CE. OS2 version not testes at all - I hope it will work. LINUX-GCC, LINUX-G++, LINUX-OpenWatcom, BSD-GCC, HPUX-GCC tested and they are working. I hope that SunOS version also works though I do not have any solaris installation where I can make real tests. --- harbour/ChangeLog | 71 +++++++++++++++++++++++++++++++- harbour/config/bin.cf | 9 +--- harbour/config/bsd/global.cf | 7 +--- harbour/config/bsd/install.cf | 5 +-- harbour/config/darwin/gcc.cf | 4 +- harbour/config/darwin/global.cf | 7 +--- harbour/config/darwin/install.cf | 7 ++-- harbour/config/dos/global.cf | 19 ++++----- harbour/config/dos/install.cf | 4 +- harbour/config/dos/owatcom.cf | 28 ++++++------- harbour/config/dos/rsx32.cf | 4 +- harbour/config/global.cf | 1 + harbour/config/hpux/gcc.cf | 4 +- harbour/config/hpux/global.cf | 8 +--- harbour/config/hpux/install.cf | 5 +-- harbour/config/lib.cf | 11 +---- harbour/config/linux/global.cf | 7 +--- harbour/config/linux/install.cf | 4 +- harbour/config/linux/owatcom.cf | 12 +++--- harbour/config/os2/gcc.cf | 4 +- harbour/config/os2/global.cf | 29 ++++++------- harbour/config/os2/install.cf | 24 +++++------ harbour/config/sunos/gcc.cf | 8 ++-- harbour/config/sunos/global.cf | 8 +--- harbour/config/sunos/install.cf | 5 +-- harbour/config/w32/bcc32.cf | 27 ++++++------ harbour/config/w32/gcc.cf | 2 +- harbour/config/w32/global.cf | 30 +++++--------- harbour/config/w32/install.cf | 4 +- harbour/config/w32/owatcom.cf | 12 +++--- harbour/config/w32/rsxnt.cf | 2 +- harbour/contrib/Makefile | 3 +- harbour/harbour-ce-spec | 14 +++---- harbour/harbour-w32-spec | 14 +++---- harbour/harbour.spec | 4 +- harbour/include/hbexprb.c | 2 +- harbour/source/rtl/net.c | 4 +- 37 files changed, 211 insertions(+), 202 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0d2278ca49..b595cd1d49 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,75 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2008-02-04 09:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/harbour.spec + * harbour/harbour-ce-spec + * harbour/harbour-w32-spec + * updated for new library names + + * harbour/ChangeLog + * harbour/include/hbexprb.c + * formatting + + * harbour/source/rtl/net.c + ! fixed casting + + * harbour/harbour.spec + * harbour/harbour-ce-spec + * harbour/harbour-w32-spec + * harbour/contrib/Makefile + * removed hbzlib - it cannot be longer part of default build + because Viktor removed zlib header files. Viktor sorry but + IMHO you should revert it and also restore ace.h - it creates + serious problems without any valuable addition. Now we will + have to rebuild Harbour on many different platforms and often + it will not be possible to install some libraries. We cannot + force installing additional libs by people who will create + binaries for incoming releases so it's important to revert + it. Please do it. + + * harbour/config/bsd/install.cf + * harbour/config/darwin/install.cf + * harbour/config/hpux/install.cf + * harbour/config/linux/install.cf + * harbour/config/sunos/install.cf + * harbour/config/dos/install.cf + * harbour/config/os2/install.cf + * harbour/config/w32/install.cf + * redirected echo error messages to stderr when *sh shell is used + + * harbour/config/lib.cf + * harbour/config/bin.cf + * harbour/config/global.cf + * harbour/config/hpux/gcc.cf + * harbour/config/hpux/global.cf + * harbour/config/darwin/gcc.cf + * harbour/config/darwin/global.cf + * harbour/config/dos/owatcom.cf + * harbour/config/dos/global.cf + * harbour/config/dos/rsx32.cf + * harbour/config/global.cf + * harbour/config/linux/owatcom.cf + * harbour/config/linux/global.cf + * harbour/config/os2/gcc.cf + * harbour/config/os2/global.cf + * harbour/config/sunos/gcc.cf + * harbour/config/sunos/global.cf + * harbour/config/bsd/global.cf + * harbour/config/w32/owatcom.cf + * harbour/config/w32/bcc32.cf + * harbour/config/w32/gcc.cf + * harbour/config/w32/rsxnt.cf + * harbour/config/w32/global.cf + ! fixed build process. DOS and WINDOWS users should make tests for + different compilers. I tested only DOS-OpenWatcom, DOS-DJGPP, + W32-BCC32, W32-OpenWatcom, W32-POCC, W32-XCC and corss builds + W32-MinGW, W32-MinGW-CE. OS2 version not testes at all - I hope + it will work. LINUX-GCC, LINUX-G++, LINUX-OpenWatcom, BSD-GCC, + HPUX-GCC tested and they are working. I hope that SunOS version + also works though I do not have any solaris installation where + I can make real tests. + 2008-02-02 23:40 UTC+0100 Ryszard Glab (harbour//rglab.pl) * config/os2/global.cf * restored double backslash in deletion command @@ -434,7 +503,7 @@ * contrib/hbtip/cgi.prg + contrib/hbtip/sessid.prg moved statis funcs GenerateSID, CheckSID, DateToGmt from cgi.prg - to new sessid.prg and renamed to TIP_* + to new sessid.prg and renamed to TIP_* * contrib/hbtip/httpcln.prg fixed few typos that generated RT errors * source/rtl/gtxwc/gtxwc.c diff --git a/harbour/config/bin.cf b/harbour/config/bin.cf index 8dbdd0619b..5337c9d9ca 100644 --- a/harbour/config/bin.cf +++ b/harbour/config/bin.cf @@ -23,15 +23,8 @@ EXE_NAME = $(PRG_MAIN:.prg=$(EXE_EXT)) endif endif -_EXE_ARCH = $(notdir $(ARCH_DIR)) -ifeq ($(_EXE_ARCH),) -# ARCH_DIR ends with a slash -EXE_ARCH = $(ARCH_DIR)$(EXE_NAME) -LIB_DIR := $(TOP)$(ROOT)lib/$(ARCH_DIR) -else EXE_ARCH = $(ARCH_DIR)/$(EXE_NAME) -LIB_DIR := $(TOP)$(ROOT)lib/$(ARCH_DIR)/ -endif +LIB_DIR = $(TOP)$(ROOT)lib/$(ARCH_DIR) ALL_OBJS = $(ALL_C_OBJS) $(ALL_PRG_OBJS) diff --git a/harbour/config/bsd/global.cf b/harbour/config/bsd/global.cf index efca27869e..62d1e36dfa 100644 --- a/harbour/config/bsd/global.cf +++ b/harbour/config/bsd/global.cf @@ -48,10 +48,7 @@ RANLIB = ranlib dirbase:: @[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR) - @[ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) clean:: - -$(RD) $(ARCH_DIR) - ifneq ($(LIBNAME),) - -$(RM) $(LIB_DIR)/$(LIB_NAME) - endif + -$(RD) $(ARCH_DIR) $(LIB_ARCH) diff --git a/harbour/config/bsd/install.cf b/harbour/config/bsd/install.cf index 239603d970..47dbdda067 100644 --- a/harbour/config/bsd/install.cf +++ b/harbour/config/bsd/install.cf @@ -5,7 +5,7 @@ INSTALL_RULE =\ @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found:" $(INSTALL_DIR); \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ for i in $(INSTALL_OBJS); \ do \ @@ -14,8 +14,7 @@ INSTALL_RULE =\ echo "! Installing $$i on $(INSTALL_DIR)"; \ $(CP) $$i $(INSTALL_DIR); \ else \ - echo "! Can't install $$i, not found"; \ + echo "! Can't install $$i, not found" 1>&2; \ fi \ done \ fi - diff --git a/harbour/config/darwin/gcc.cf b/harbour/config/darwin/gcc.cf index 5dc09c6f9f..209929060a 100644 --- a/harbour/config/darwin/gcc.cf +++ b/harbour/config/darwin/gcc.cf @@ -51,7 +51,7 @@ endif # Add the specified GT driver library and other RTLs ifeq ($(findstring rtl,$(LIBS)),rtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lrtl +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl # screen driver libraries ifeq ($(HB_CRS_LIB),) @@ -102,7 +102,7 @@ LD_RULE = $(LD) $(CFLAGS) $(LD_OUT) $@ $(^F) $(LDFLAGS) $(L_USR) $(LINKLIBS) $(L #AR_RULE = $(AR) $(ARFLAGS) r $@ $(^F) || $(RM) $@ LIBTOOL = libtool LIBTOOLFLAGS = $(LIBTOOL_USR) -AR_RULE = $(LIBTOOL) -static $(LIBTOOLFLAGS) -o $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +AR_RULE = $(LIBTOOL) -static $(LIBTOOLFLAGS) -o $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) RANLIB = ranlib include $(TOP)$(ROOT)config/rules.cf diff --git a/harbour/config/darwin/global.cf b/harbour/config/darwin/global.cf index e011a12e41..f496206a18 100644 --- a/harbour/config/darwin/global.cf +++ b/harbour/config/darwin/global.cf @@ -46,10 +46,7 @@ RANLIB = ranlib dirbase:: @[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR) - @[ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) clean:: - -$(RD) $(ARCH_DIR) - ifneq ($(LIBNAME),) - -$(RM) $(LIB_DIR)/$(LIB_NAME) - endif + -$(RD) $(ARCH_DIR) $(LIB_ARCH) diff --git a/harbour/config/darwin/install.cf b/harbour/config/darwin/install.cf index 8823259c16..32b7508328 100644 --- a/harbour/config/darwin/install.cf +++ b/harbour/config/darwin/install.cf @@ -5,7 +5,7 @@ INSTALL_RULE =\ @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found:" $(INSTALL_DIR); \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ for i in $(INSTALL_OBJS); \ do \ @@ -14,12 +14,11 @@ INSTALL_RULE =\ echo "! Installing $$i on $(INSTALL_DIR)"; \ $(CP) $$i $(INSTALL_DIR); \ else \ - echo "! Can't install $$i, not found"; \ + echo "! Can't install $$i, not found" 1>&2; \ fi \ - done; \ + done \ if [ $(INSTALL_DIR) = $(HB_LIB_INSTALL) ]; \ then \ $(RANLIB) $(foreach file,$(notdir $(INSTALL_OBJS)),$(INSTALL_DIR)/$(file)); \ fi \ fi - diff --git a/harbour/config/dos/global.cf b/harbour/config/dos/global.cf index b1a51a9cbd..25f3c136bd 100644 --- a/harbour/config/dos/global.cf +++ b/harbour/config/dos/global.cf @@ -36,6 +36,7 @@ ARCH_DIR = $(subst \,/,$(HB_ARCH)) ARCH_DOS = $(subst /,\,$(HB_ARCH)) LIB_DIR_DOS = $(subst /,\,$(LIB_DIR)) LIB_PATH_DOS = $(subst /,\,$(LIB_PATH)) +LIB_ARCH_DOS = $(subst /,\,$(LIB_ARCH)) DIRSEP = $(subst /,\,\) MK := $(subst \,/,$(subst \~,~,$(MAKE))) @@ -77,13 +78,12 @@ RANLIB = ranlib dirbase:: -@$(COMSPEC) /Cfor %d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %d\nul $(MD) %d - -@$(COMSPEC) /Cfor %d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %d\nul $(MD) %d + $(if $(LIB_PATH_DOS),-@$(COMSPEC) /Cfor %d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %d\nul $(MD) %d,) clean:: -@$(COMSPEC) /Cfor %f in ($(ARCH_DOS)\*.* *.bak *.obj *.o *.tds) do $(RM) %f -@$(COMSPEC) /Cfor %d in ($(ARCH_DOS) $(HB_ARCHITECTURE)) do if exist %d\nul $(RD) %d - -@$(COMSPEC) /Cfor %f in ($(LIB_DIR_DOS)\*.*) do $(RM) %f - -@$(COMSPEC) /Cfor %d in ($(LIB_DIR_DOS) $(LIB_PATH_DOS)) do if exist %d\nul $(RD) %d + $(if $(LIB_ARCH_DOS),-@$(COMSPEC) /Cif exist $(LIB_ARCH_DOS) $(RM) $(LIB_ARCH_DOS),) else # bash @@ -95,22 +95,17 @@ RD = rm -f -r CP = cp -f MV = mv -f MD = mkdir +MDP = mkdir -p #this will be used only under MINGW RANLIB = ranlib - dirbase:: - @[ -d $(HB_ARCHITECTURE) ] || $(MD) $(HB_ARCHITECTURE); \ - [ -d $(ARCH_DIR) ] || $(MD) $(ARCH_DIR) - @[ -d $(LIB_PATH) ] || $(MD) $(LIB_PATH); \ - [ -d $(LIB_DIR) ] || $(MD) $(LIB_DIR) + @[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) clean:: - -$(RD) $(HB_ARCH) - ifneq ($(LIBNAME),) - -$(RM) $(LIB_DIR)/$(LIB_NAME) - endif + -$(RD) $(ARCH_DIR) $(LIB_ARCH) endif endif diff --git a/harbour/config/dos/install.cf b/harbour/config/dos/install.cf index 6c62a89c7c..d9acedbf59 100644 --- a/harbour/config/dos/install.cf +++ b/harbour/config/dos/install.cf @@ -28,7 +28,7 @@ INSTALL_OBJSH = $(subst \,/,$(INSTALL_OBJS)) INSTALL_RULE =\ @if [ ! -d $(INSTALL_DIRSH) ]; \ then \ - echo "! Can't install, path not found:" $(INSTALL_DIRSH); \ + echo "! Can't install, path not found: $(INSTALL_DIRSH)" 1>&2; \ else \ for i in $(INSTALL_OBJSH); \ do \ @@ -37,7 +37,7 @@ INSTALL_RULE =\ echo "! Installing $$i on $(INSTALL_DIRSH)"; \ $(CP) $$i $(INSTALL_DIRSH); \ else \ - echo "! Can't install $$i, not found"; \ + echo "! Can't install $$i, not found" 1>&2; \ fi \ done \ fi diff --git a/harbour/config/dos/owatcom.cf b/harbour/config/dos/owatcom.cf index bb2b0e2ee7..0d5fc1f381 100644 --- a/harbour/config/dos/owatcom.cf +++ b/harbour/config/dos/owatcom.cf @@ -53,9 +53,9 @@ define link_exe_file echo. $(LDFLAGS) NAME $@ > __link__.tmp $(foreach file, $(^F), $(link_file)) $(foreach lib, $(HB_USER_LIBS), $(link_lib)) -$(foreach lib, $(LINKLIBS), $(link_lib)) -$(foreach lib, $(RDDLIBS), $(link_lib)) -$(foreach lib, $(GTLIBS), $(link_lib)) +$(foreach lib, $(subst /,\,$(LINKLIBS)), $(link_lib)) +$(foreach lib, $(subst /,\,$(RDDLIBS)), $(link_lib)) +$(foreach lib, $(subst /,\,$(GTLIBS)), $(link_lib)) -$(LD) @__link__.tmp endef @@ -63,30 +63,28 @@ LD = wlink LDFLAGS = debug all OP osn=DOS OP stack=65536 OP CASEEXACT OP stub=cwstub.exe ifeq ($(HB_LIB_COMPILE),) - LINKLIBS := $(foreach lib, $(CONTRIBS), $(subst /,\,$(LIB_DIR)/$(lib))) - LINKLIBS += $(foreach lib, $(LIBS), $(subst /,\,$(LIB_DIR)/$(lib))) + LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib)) + LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)) else - LINKLIBS := $(foreach lib, $(CONTRIBS), $(subst /,\,$(HB_LIB_COMPILE)/$(lib))) - LINKLIBS += $(foreach lib, $(LIBS), $(subst /,\,$(HB_LIB_COMPILE)/$(lib))) + LINKLIBS = $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib)) + LINKLIBS += $(foreach lib, $(LIBS), $(HB_LIB_COMPILE)/$(lib)) endif # If LIBS specifies the rdd library, add all DB drivers. ifeq ($(findstring rdd,$(LIBS)),rdd) ifeq ($(HB_LIB_COMPILE),) - RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) + RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) else - RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv)) + RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv)) endif - RDDLIBS := $(subst /,\,$(RDDLIBS)) endif ifeq ($(findstring rtl,$(LIBS)),rtl) ifeq ($(HB_LIB_COMPILE),) - GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) + GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) else - GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt)) + GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt)) endif - GTLIBS := $(subst /,\,$(GTLIBS)) endif LD_RULE = $(link_exe_file) @@ -97,10 +95,8 @@ echo. -+$(file) >> __lib__.tmp endef -LIB_DDIR := $(subst /,\,$(LIB_DIR)) - define create_library -echo. $(LIB_DDIR)\$@ > __lib__.tmp +echo. $(subst /,\,$(LIB_DIR))\$@ > __lib__.tmp $(foreach file, $(^F), $(lib_object)) $(AR) $(ARFLAGS) @__lib__.tmp endef diff --git a/harbour/config/dos/rsx32.cf b/harbour/config/dos/rsx32.cf index bd855d9d3e..4f7e1222e1 100644 --- a/harbour/config/dos/rsx32.cf +++ b/harbour/config/dos/rsx32.cf @@ -42,7 +42,7 @@ endif # Add the specified GT driver library and other RTLs ifeq ($(findstring rtl,$(LIBS)),rtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lrtl +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl endif # The -) option could be appropriate to link against libraries with @@ -54,6 +54,6 @@ LDFLAGS += $(LINKPATHS) AR = ar ARFLAGS = $(A_USR) -AR_RULE = $(AR) $(ARFLAGS) r $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +AR_RULE = $(AR) $(ARFLAGS) r $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) include $(TOP)$(ROOT)config/rules.cf diff --git a/harbour/config/global.cf b/harbour/config/global.cf index d23561141a..9ca2b21292 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -26,6 +26,7 @@ HB_DB_DIRS=\ ifneq ($(HB_DB_DRVEXT),) HB_DB_DRIVERS += $(HB_DB_DRVEXT) +HB_DB_DIRS += $(HB_DB_DRVEXT) endif ifeq ($(HB_BIN_COMPILE),) diff --git a/harbour/config/hpux/gcc.cf b/harbour/config/hpux/gcc.cf index 0059ad09cd..703ccdf03a 100644 --- a/harbour/config/hpux/gcc.cf +++ b/harbour/config/hpux/gcc.cf @@ -45,7 +45,7 @@ endif # Add the specified GT driver library ifeq ($(findstring rtl,$(LIBS)),rtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lrtl +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl # screen driver libraries ifeq ($(HB_CRS_LIB),) @@ -83,6 +83,6 @@ LDFLAGS += $(LINKPATHS) AR = ar ARFLAGS = $(A_USR) -AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) include $(TOP)$(ROOT)config/rules.cf diff --git a/harbour/config/hpux/global.cf b/harbour/config/hpux/global.cf index 75c7d09695..baf96f10ae 100644 --- a/harbour/config/hpux/global.cf +++ b/harbour/config/hpux/global.cf @@ -43,13 +43,9 @@ MV = mv -f MD = mkdir MDP = mkdir -p - dirbase:: @[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR) - @[ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) clean:: - -$(RD) $(ARCH_DIR) - ifneq ($(LIBNAME),) - -$(RM) $(LIB_DIR)/$(LIB_NAME) - endif + -$(RD) $(ARCH_DIR) $(LIB_ARCH) diff --git a/harbour/config/hpux/install.cf b/harbour/config/hpux/install.cf index 239603d970..47dbdda067 100644 --- a/harbour/config/hpux/install.cf +++ b/harbour/config/hpux/install.cf @@ -5,7 +5,7 @@ INSTALL_RULE =\ @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found:" $(INSTALL_DIR); \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ for i in $(INSTALL_OBJS); \ do \ @@ -14,8 +14,7 @@ INSTALL_RULE =\ echo "! Installing $$i on $(INSTALL_DIR)"; \ $(CP) $$i $(INSTALL_DIR); \ else \ - echo "! Can't install $$i, not found"; \ + echo "! Can't install $$i, not found" 1>&2; \ fi \ done \ fi - diff --git a/harbour/config/lib.cf b/harbour/config/lib.cf index a6acaad683..942ed092de 100644 --- a/harbour/config/lib.cf +++ b/harbour/config/lib.cf @@ -16,14 +16,7 @@ LIB_PATH := $(TOP)$(ROOT)lib/$(HB_ARCHITECTURE) #no slash at the end LIB_DIR := $(LIB_PATH)/$(HB_COMPILER) -LIB_ARCH := $(notdir $(ARCH_DIR)) -ifeq ($(LIB_ARCH),) -# ARCH_DIR ends with a slash -LIB_ARCH := $(ARCH_DIR)$(LIB_NAME) -else -# there is no slash at the end of ARCH_DIR -LIB_ARCH := $(ARCH_DIR)/$(LIB_NAME) -endif +LIB_ARCH := $(LIB_DIR)/$(LIB_NAME) ALL_OBJS = $(ALL_C_OBJS) $(ALL_PRG_OBJS) @@ -37,7 +30,7 @@ $(LIB_NAME) : $(ALL_OBJS) $(AR_RULE) -INSTALL_OBJS = $(LIB_DIR)/$(LIB_NAME) +INSTALL_OBJS = $(LIB_ARCH) INSTALL_DIR = $(HB_LIB_INSTALL) include $(TOP)$(ROOT)config/install.cf diff --git a/harbour/config/linux/global.cf b/harbour/config/linux/global.cf index e011a12e41..f496206a18 100644 --- a/harbour/config/linux/global.cf +++ b/harbour/config/linux/global.cf @@ -46,10 +46,7 @@ RANLIB = ranlib dirbase:: @[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR) - @[ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) clean:: - -$(RD) $(ARCH_DIR) - ifneq ($(LIBNAME),) - -$(RM) $(LIB_DIR)/$(LIB_NAME) - endif + -$(RD) $(ARCH_DIR) $(LIB_ARCH) diff --git a/harbour/config/linux/install.cf b/harbour/config/linux/install.cf index 0c71da1194..47dbdda067 100644 --- a/harbour/config/linux/install.cf +++ b/harbour/config/linux/install.cf @@ -5,7 +5,7 @@ INSTALL_RULE =\ @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found:" $(INSTALL_DIR); \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ for i in $(INSTALL_OBJS); \ do \ @@ -14,7 +14,7 @@ INSTALL_RULE =\ echo "! Installing $$i on $(INSTALL_DIR)"; \ $(CP) $$i $(INSTALL_DIR); \ else \ - echo "! Can't install $$i, not found"; \ + echo "! Can't install $$i, not found" 1>&2; \ fi \ done \ fi diff --git a/harbour/config/linux/owatcom.cf b/harbour/config/linux/owatcom.cf index b89758c8fb..aa4ac546d6 100644 --- a/harbour/config/linux/owatcom.cf +++ b/harbour/config/linux/owatcom.cf @@ -38,27 +38,27 @@ LD = wlink LDFLAGS = debug all sys Linux OP CASEEXACT ifeq ($(HB_LIB_COMPILE),) - LINKLIBS := $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib)) + LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib)) LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)) else - LINKLIBS := $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib)) + LINKLIBS = $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib)) LINKLIBS += $(foreach lib, $(LIBS), $(HB_LIB_COMPILE)/$(lib)) endif # If LIBS specifies the rdd library, add all DB drivers. ifeq ($(findstring rdd,$(LIBS)),rdd) ifeq ($(HB_LIB_COMPILE),) - RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) + RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) else - RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv)) + RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv)) endif endif ifeq ($(findstring rtl,$(LIBS)),rtl) ifeq ($(HB_LIB_COMPILE),) - GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) + GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) else - GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt)) + GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt)) endif endif diff --git a/harbour/config/os2/gcc.cf b/harbour/config/os2/gcc.cf index e5c8230c6a..cd41aecbe4 100644 --- a/harbour/config/os2/gcc.cf +++ b/harbour/config/os2/gcc.cf @@ -45,8 +45,6 @@ LINKLIBS += $(foreach lib, $(LIBS), -l$(lib)) # If LIBS specifies the rdd library, add all DB drivers. ifeq ($(findstring rdd,$(LIBS)),rdd) LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) -# add a last round of rtl/vm to solve positional interdependencies (at the moment hbrun requires this) -LINKLIBS += -lrtl -lvm -lrtl endif # Add the specified GT driver library @@ -58,7 +56,7 @@ LINKLIBS += -l$(HB_GT_LIB) LINKLIBS += -lgtos2 else -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lrtl +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl endif endif diff --git a/harbour/config/os2/global.cf b/harbour/config/os2/global.cf index 0b74b5b65b..677be979b9 100644 --- a/harbour/config/os2/global.cf +++ b/harbour/config/os2/global.cf @@ -25,6 +25,7 @@ ARCH_DIR = $(HB_ARCH) OS2_ARCH_DIR = $(subst /,\,$(HB_ARCH)) OS2_LIB_DIR = $(subst /,\,$(LIB_DIR)) OS2_LIB_PATH = $(subst /,\,$(LIB_PATH)) +OS2_LIB_ARCH = $(subst /,\,$(LIB_ARCH)) DIRSEP = $(subst /,\,\) MK = $(subst /,\,$(subst \~,~,$(MAKE))) @@ -44,20 +45,18 @@ MD = md dirbase:: -CMD.EXE /c IF NOT EXIST $(HB_ARCHITECTURE) $(MD) $(HB_ARCHITECTURE) -CMD.EXE /c IF NOT EXIST $(OS2_ARCH_DIR) $(MD) $(OS2_ARCH_DIR) - -CMD.EXE /c IF NOT EXIST $(OS2_LIB_PATH) $(MD) $(OS2_LIB_PATH) - -CMD.EXE /c IF NOT EXIST $(OS2_LIB_DIR) $(MD) $(OS2_LIB_DIR) + $(if $(OS2_LIB_PATH),-CMD.EXE /c IF NOT EXIST $(OS2_LIB_PATH) $(MD) $(OS2_LIB_PATH),) + $(if $(OS2_LIB_PATH),-CMD.EXE /c IF NOT EXIST $(OS2_LIB_DIR) $(MD) $(OS2_LIB_DIR),) clean:: - -CMD.EXE /c IF EXIST $(OS2_ARCH_DIR) $(RM) $(OS2_ARCH_DIR)\\*.* - -CMD.EXE /c IF EXIST $(OS2_ARCH_DIR) $(RD) $(OS2_ARCH_DIR) - -CMD.EXE /c IF EXIST $(HB_ARCHITECTURE) $(RD) $(HB_ARCHITECTURE) - ifneq ($(LIBNAME),) - -CMD.EXE /c IF EXIST $(OS2_LIB_DIR)\$(LIB_NAME) $(RM) $(OS2_LIB_DIR)\$(LIB_NAME) - endif + -CMD.EXE /c IF EXIST $(OS2_ARCH_DIR) $(RM) $(OS2_ARCH_DIR)\\*.* + -CMD.EXE /c IF EXIST $(OS2_ARCH_DIR) $(RD) $(OS2_ARCH_DIR) + -CMD.EXE /c IF EXIST $(HB_ARCHITECTURE) $(RD) $(HB_ARCHITECTURE) + $(if $(OS2_LIB_ARCH),-CMD.EXE /c IF EXIST $(OS2_LIB_ARCH) $(RM) $(OS2_LIB_ARCH),) else # bash -ARCH_DIR = $(HB_ARCH)/ +ARCH_DIR = $(HB_ARCH) MK = $(MAKE) RM = rm -f @@ -65,17 +64,13 @@ RD = rm -f -r CP = cp -f MV = mv -f MD = mkdir +MDP = mkdir -p dirbase:: - @[ -d $(HB_ARCHITECTURE) ] || $(MD) $(HB_ARCHITECTURE); \ - [ -d $(HB_ARCH) ] || $(MD) $(HB_ARCH) - @[ -d $(LIB_PATH) ] || $(MD) $(LIB_PATH); \ - [ -d $(LIB_DIR) ] || $(MD) $(LIB_DIR) + @[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) clean:: - -$(RD) $(ARCH_DIR) - ifneq ($(LIBNAME),) - -$(RM) $(LIB_DIR)/$(LIB_NAME) - endif + -$(RD) $(ARCH_DIR) $(LIB_ARCH) endif diff --git a/harbour/config/os2/install.cf b/harbour/config/os2/install.cf index e58baa4305..71379a9157 100644 --- a/harbour/config/os2/install.cf +++ b/harbour/config/os2/install.cf @@ -17,20 +17,20 @@ INSTALL_RULE = $(foreach file, $(INSTALL_LIST), $(inst_file)) \ else # bash INSTALL_RULE =\ -@if [ ! -d $(INSTALL_DIR) ]; \ + @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found:" $(INSTALL_DIR); \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ - for i in $(INSTALL_OBJS); \ - do \ - if [ -r $$i ]; \ - then \ - echo "! Installing $$i on $(INSTALL_DIR)"; \ - $(CP) $$i $(INSTALL_DIR); \ - else \ - echo "! Can't install $$i, not found"; \ - fi \ - done \ + for i in $(INSTALL_OBJS); \ + do \ + if [ -r $$i ]; \ + then \ + echo "! Installing $$i on $(INSTALL_DIR)"; \ + $(CP) $$i $(INSTALL_DIR); \ + else \ + echo "! Can't install $$i, not found" 1>&2; \ + fi \ + done \ fi endif diff --git a/harbour/config/sunos/gcc.cf b/harbour/config/sunos/gcc.cf index b50b143e87..af9cf3726c 100644 --- a/harbour/config/sunos/gcc.cf +++ b/harbour/config/sunos/gcc.cf @@ -11,7 +11,7 @@ LIB_EXT = .a CC = $(HB_CCACHE) gcc CC_IN = -c -CC_OUT = -o +CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) CFLAGS = -DHB_OS_SUNOS -Wall -W @@ -38,10 +38,10 @@ ifeq ($(findstring rdd,$(LIBS)),rdd) LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv)) endif -# Add the specified GT driver library and other RTLs +# Add the specified GT driver library ifeq ($(findstring rtl,$(LIBS)),rtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lrtl +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl # screen driver libraries ifeq ($(HB_CRS_LIB),) @@ -79,6 +79,6 @@ LDFLAGS = $(LINKPATHS) AR = ar ARFLAGS = $(A_USR) -AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) include $(TOP)$(ROOT)config/rules.cf diff --git a/harbour/config/sunos/global.cf b/harbour/config/sunos/global.cf index 75c7d09695..baf96f10ae 100644 --- a/harbour/config/sunos/global.cf +++ b/harbour/config/sunos/global.cf @@ -43,13 +43,9 @@ MV = mv -f MD = mkdir MDP = mkdir -p - dirbase:: @[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR) - @[ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) clean:: - -$(RD) $(ARCH_DIR) - ifneq ($(LIBNAME),) - -$(RM) $(LIB_DIR)/$(LIB_NAME) - endif + -$(RD) $(ARCH_DIR) $(LIB_ARCH) diff --git a/harbour/config/sunos/install.cf b/harbour/config/sunos/install.cf index 239603d970..47dbdda067 100644 --- a/harbour/config/sunos/install.cf +++ b/harbour/config/sunos/install.cf @@ -5,7 +5,7 @@ INSTALL_RULE =\ @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found:" $(INSTALL_DIR); \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ for i in $(INSTALL_OBJS); \ do \ @@ -14,8 +14,7 @@ INSTALL_RULE =\ echo "! Installing $$i on $(INSTALL_DIR)"; \ $(CP) $$i $(INSTALL_DIR); \ else \ - echo "! Can't install $$i, not found"; \ + echo "! Can't install $$i, not found" 1>&2; \ fi \ done \ fi - diff --git a/harbour/config/w32/bcc32.cf b/harbour/config/w32/bcc32.cf index feff3d7835..be7d65ee25 100644 --- a/harbour/config/w32/bcc32.cf +++ b/harbour/config/w32/bcc32.cf @@ -27,30 +27,29 @@ LD_OUT = -e # Add all libraries specified in CONTRIBS and LIBS. ifeq ($(HB_LIB_COMPILE),) -LINKLIBS += $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib)$(LIB_EXT)) -LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)$(LIB_EXT)) +LINKPATHS += -L$(LIB_DIR) else LINKPATHS += -L$(HB_LIB_COMPILE) -LINKLIBS += $(foreach lib, $(CONTRIBS), $(subst lib,,$(lib))$(lib)$(LIB_EXT)) -LINKLIBS += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) endif +LIBLIST = $(foreach lib, $(CONTRIBS), $(lib)$(LIB_EXT)) +LIBLIST += $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) # If LIBS specifies the rdd library, add all DB drivers. ifeq ($(findstring rdd,$(LIBS)),rdd) -ifeq ($(HB_LIB_COMPILE),) -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)$(LIB_EXT)) -else -LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) -endif +LIBLIST += $(foreach drv, $(HB_DB_DRIVERS), $(drv)$(LIB_EXT)) endif # Add the specified GT driver library ifeq ($(findstring rtl,$(LIBS)),rtl) -ifeq ($(HB_LIB_COMPILE),) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)$(LIB_EXT)) -else -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) +LIBLIST += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) endif + +# It's probably not necessary in native Windows but I need it +# for my Linux box because -L seems to not work with WINE +ifeq ($(HB_LIB_COMPILE),) +LINKLIBS += $(foreach lib, $(LIBLIST), $(LIB_DIR)/$(lib)) +else +LINKLIBS += $(foreach lib, $(LIBLIST), $(HB_LIB_COMPILE)/$(lib)) endif # HB_SCREEN_LIB: empty, or one of ncurses, slang @@ -76,6 +75,6 @@ LDFLAGS = $(LINKPATHS) AR = tlib.exe ARFLAGS = $(A_USR) AROBJS = $(foreach file, $(^F), -+$(file)) -AR_RULE = $(AR) $(ARFLAGS) $(LIB_DIR)/$@ $(AROBJS),, +AR_RULE = $(AR) $(ARFLAGS) "$(subst /,\,$(LIB_DIR)/$@)" $(AROBJS),, include $(TOP)$(ROOT)config/rules.cf diff --git a/harbour/config/w32/gcc.cf b/harbour/config/w32/gcc.cf index c4c4ec6876..39255957b4 100644 --- a/harbour/config/w32/gcc.cf +++ b/harbour/config/w32/gcc.cf @@ -42,7 +42,7 @@ endif # Add the specified GT driver library ifeq ($(findstring rtl,$(LIBS)),rtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lrtl +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl endif # HB_SCREEN_LIB: empty, or one of ncurses, slang diff --git a/harbour/config/w32/global.cf b/harbour/config/w32/global.cf index b63b1f2aec..54a4505b05 100644 --- a/harbour/config/w32/global.cf +++ b/harbour/config/w32/global.cf @@ -35,6 +35,7 @@ ARCH_DIR = $(subst \,/,$(HB_ARCH)) ARCH_DOS = $(subst /,\,$(HB_ARCH)) LIB_DIR_DOS = $(subst /,\,$(LIB_DIR)) LIB_PATH_DOS = $(subst /,\,$(LIB_PATH)) +LIB_ARCH_DOS = $(subst /,\,$(LIB_ARCH)) DIRSEP = $(subst /,\,\) MK := $(subst \,/,$(subst \~,~,$(MAKE))) @@ -67,35 +68,30 @@ RD = rmdir /q /s dirbase:: -@$(COMSPEC) /c \ 'for %d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %d\. $(MD) %d' - -@$(COMSPEC) /c \ - 'for %d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %d\. $(MD) %d' + $(if $(LIB_PATH_DOS),-@$(COMSPEC) /c \ + 'for %d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %d\. $(MD) %d',) clean:: -@$(COMSPEC) /c \ 'if exist $(ARCH_DOS) $(RD) $(ARCH_DOS)' - ifneq ($(LIBNAME),) - -@$(COMSPEC) /c \ - 'if exist $(LIB_DIR_DOS)\$(LIB_NAME) $(RM) $(LIB_DIR_DOS)\$(LIB_NAME)' - endif + $(if $(LIB_ARCH_DOS),-@$(COMSPEC) /c 'if exist $(LIB_ARCH_DOS) $(RM) $(LIB_ARCH_DOS),)' else # command.com dirbase:: -@for %%d in ($(HB_ARCHITECTURE) $(ARCH_DOS)) do if not exist %%d\nul $(MD) %%d - -@for %%d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %%d\nul $(MD) %%d + $(if $(LIB_PATH_DOS),-@for %%d in ($(LIB_PATH_DOS) $(LIB_DIR_DOS)) do if not exist %%d\nul $(MD) %%d,) clean:: -@for %%f in ($(ARCH_DOS)\*.* *.bak *.obj *.o *.tds) do $(RM) %%f -@for %%d in ($(ARCH_DOS) $(HB_ARCHITECTURE)) do if exist %%d\nul $(RD) %%d - ifneq ($(LIBNAME),) - if exist $(LIB_DIR_DOS)\$(LIB_NAME) $(RM) $(LIB_DIR_DOS)\$(LIB_NAME) - endif + $(if $(LIB_ARCH_DOS),-@if exist $(LIB_ARCH_DOS) $(RM) $(LIB_ARCH_DOS),) endif else # bash -ARCH_DIR = $(HB_ARCH)/ +ARCH_DIR = $(HB_ARCH) MK = $(MAKE) RM = rm -f @@ -103,17 +99,13 @@ RD = rm -f -r CP = cp -f MV = mv -f MD = mkdir +MDP = mkdir -p dirbase:: - @[ -d $(HB_ARCHITECTURE) ] || $(MD) $(HB_ARCHITECTURE); \ - [ -d $(HB_ARCH) ] || $(MD) $(HB_ARCH) - @[ -d $(LIB_PATH) ] || $(MD) $(LIB_PATH); \ - [ -d $(LIB_DIR) ] || $(MD) $(LIB_DIR) + @[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR) + @[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR) clean:: - -$(RD) $(ARCH_DIR) - ifneq ($(LIBNAME),) - -$(RM) $(LIB_DIR)/$(LIB_NAME) - endif + -$(RD) $(ARCH_DIR) $(LIB_ARCH) endif diff --git a/harbour/config/w32/install.cf b/harbour/config/w32/install.cf index f6cd2474bb..e23fc5e33a 100644 --- a/harbour/config/w32/install.cf +++ b/harbour/config/w32/install.cf @@ -33,7 +33,7 @@ else # bash INSTALL_RULE =\ @if [ ! -d $(INSTALL_DIR) ]; \ then \ - echo "! Can't install, path not found:" $(INSTALL_DIR); \ + echo "! Can't install, path not found: $(INSTALL_DIR)" 1>&2; \ else \ for i in $(INSTALL_OBJS); \ do \ @@ -42,7 +42,7 @@ INSTALL_RULE =\ echo "! Installing $$i on $(INSTALL_DIR)"; \ $(CP) $$i $(INSTALL_DIR); \ else \ - echo "! Can't install $$i, not found"; \ + echo "! Can't install $$i, not found" 1>&2; \ fi \ done \ fi diff --git a/harbour/config/w32/owatcom.cf b/harbour/config/w32/owatcom.cf index 349a10b53c..d31a4ab3bc 100644 --- a/harbour/config/w32/owatcom.cf +++ b/harbour/config/w32/owatcom.cf @@ -62,27 +62,27 @@ LD = wlink LDFLAGS = debug all OP osn=NT OP stack=65536 OP CASEEXACT ifeq ($(HB_LIB_COMPILE),) - LINKLIBS := $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib)) + LINKLIBS = $(foreach lib, $(CONTRIBS), $(LIB_DIR)/$(lib)) LINKLIBS += $(foreach lib, $(LIBS), $(LIB_DIR)/$(lib)) else - LINKLIBS := $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib)) + LINKLIBS = $(foreach lib, $(CONTRIBS), $(HB_LIB_COMPILE)/$(lib)) LINKLIBS += $(foreach lib, $(LIBS), $(HB_LIB_COMPILE)/$(lib)) endif # If LIBS specifies the rdd library, add all DB drivers. ifeq ($(findstring rdd,$(LIBS)),rdd) ifeq ($(HB_LIB_COMPILE),) - RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) + RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(LIB_DIR)/$(drv)) else - RDDLIBS := $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv)) + RDDLIBS = $(foreach drv, $(HB_DB_DRIVERS), $(HB_LIB_COMPILE)/$(drv)) endif endif ifeq ($(findstring rtl,$(LIBS)),rtl) ifeq ($(HB_LIB_COMPILE),) - GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) + GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(LIB_DIR)/$(gt)) else - GTLIBS := $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt)) + GTLIBS = $(foreach gt, $(HB_GT_LIBS), $(HB_LIB_COMPILE)/$(gt)) endif endif diff --git a/harbour/config/w32/rsxnt.cf b/harbour/config/w32/rsxnt.cf index 1f2248baae..3c81e7d6d1 100644 --- a/harbour/config/w32/rsxnt.cf +++ b/harbour/config/w32/rsxnt.cf @@ -45,7 +45,7 @@ endif # Add the specified GT driver library ifeq ($(findstring rtl,$(LIBS)),rtl) -LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lrtl +LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl endif # HB_SCREEN_LIB: empty, or one of ncurses, slang diff --git a/harbour/contrib/Makefile b/harbour/contrib/Makefile index 0a6047effc..37b4f91796 100644 --- a/harbour/contrib/Makefile +++ b/harbour/contrib/Makefile @@ -11,10 +11,9 @@ DIRS=\ hbmisc \ hbnf \ hbclipsm \ - hbzlib \ xhb \ # examples \ - +# hbzlib \ ifneq ($(HB_ARCHITECTURE),dos) diff --git a/harbour/harbour-ce-spec b/harbour/harbour-ce-spec index 5e853047a1..472808497a 100644 --- a/harbour/harbour-ce-spec +++ b/harbour/harbour-ce-spec @@ -117,7 +117,7 @@ export HB_BIN_INSTALL=%{_bindir} export HB_INC_INSTALL=%{_includedir}/harbour export HB_LIB_INSTALL=%{_libdir}/%{name} export HB_GTALLEG=%{?_with_allegro:yes} -export HB_CONTRIBLIBS="%{?_with_gd:gd} %{?_with_pgsql:pgsql} %{?_with_mysql:mysql}" +export HB_CONTRIBLIBS="%{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}" make -r @@ -148,7 +148,7 @@ export HB_BIN_INSTALL=%{_bindir} export HB_INC_INSTALL=%{_includedir}/harbour export HB_LIB_INSTALL=%{_libdir}/%{name} export HB_GTALLEG=%{?_with_allegro:yes} -export HB_CONTRIBLIBS="%{?_with_gd:gd} %{?_with_pgsql:pgsql} %{?_with_mysql:mysql}" +export HB_CONTRIBLIBS="%{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}" export _DEFAULT_BIN_DIR=$HB_BIN_INSTALL export _DEFAULT_INC_DIR=$HB_INC_INSTALL @@ -322,21 +322,21 @@ rm -fR $RPM_BUILD_ROOT %{_libdir}/%{name}/libhbmainwin.a %{_libdir}/%{name}/libhbusrrdd.a -%{?_with_adsrdd: %{_libdir}/%{name}/libhbrddads.a} +%{?_with_adsrdd: %{_libdir}/%{name}/librddads.a} %{!?_without_odbc: %{_libdir}/%{name}/libhbodbc.a} %{!?_without_nf: %{_libdir}/%{name}/libhbnf.a} %{?_with_mysql: %{_libdir}/%{name}/libhbmysql.a} -%{?_with_pgsql: %{_libdir}/%{name}/libhbpg.a} +%{?_with_pgsql: %{_libdir}/%{name}/libhbpgsql.a} %{?_with_gd: %{_libdir}/%{name}/libhbgd.a} %{_libdir}/%{name}/libhbbtree.a %{_libdir}/%{name}/libhbmisc.a %{_libdir}/%{name}/libhbct.a -%{_libdir}/%{name}/libhbzlib.a +#%{_libdir}/%{name}/libhbzlib.a %{_libdir}/%{name}/libhbtip.a %{_libdir}/%{name}/libxhb.a -%{_libdir}/%{name}/libhbrddado.a +%{_libdir}/%{name}/librddado.a %{_libdir}/%{name}/libhbw32.a -%{_libdir}/%{name}/libhbgtwvg.a +%{_libdir}/%{name}/libgtwvg.a %{_libdir}/%{name}/libhbgt.a %{_libdir}/%{name}/libhbbmcdx.a %{_libdir}/%{name}/libhbclipsm.a diff --git a/harbour/harbour-w32-spec b/harbour/harbour-w32-spec index 867c56b2fd..f7b30edc01 100644 --- a/harbour/harbour-w32-spec +++ b/harbour/harbour-w32-spec @@ -117,7 +117,7 @@ export HB_BIN_INSTALL=%{_bindir} export HB_INC_INSTALL=%{_includedir}/harbour export HB_LIB_INSTALL=%{_libdir}/%{name} export HB_GTALLEG=%{?_with_allegro:yes} -export HB_CONTRIBLIBS="%{?_with_gd:gd} %{?_with_pgsql:pgsql} %{?_with_mysql:mysql}" +export HB_CONTRIBLIBS="%{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}" make -r @@ -148,7 +148,7 @@ export HB_BIN_INSTALL=%{_bindir} export HB_INC_INSTALL=%{_includedir}/harbour export HB_LIB_INSTALL=%{_libdir}/%{name} export HB_GTALLEG=%{?_with_allegro:yes} -export HB_CONTRIBLIBS="%{?_with_gd:gd} %{?_with_pgsql:pgsql} %{?_with_mysql:mysql}" +export HB_CONTRIBLIBS="%{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql}" export _DEFAULT_BIN_DIR=$HB_BIN_INSTALL export _DEFAULT_INC_DIR=$HB_INC_INSTALL @@ -321,21 +321,21 @@ rm -fR $RPM_BUILD_ROOT %{_libdir}/%{name}/libhbmainstd.a %{_libdir}/%{name}/libhbusrrdd.a -%{?_with_adsrdd: %{_libdir}/%{name}/libhbrddads.a} +%{?_with_adsrdd: %{_libdir}/%{name}/librddads.a} %{!?_without_odbc: %{_libdir}/%{name}/libhbodbc.a} %{!?_without_nf: %{_libdir}/%{name}/libhbnf.a} %{?_with_mysql: %{_libdir}/%{name}/libhbmysql.a} -%{?_with_pgsql: %{_libdir}/%{name}/libhbpg.a} +%{?_with_pgsql: %{_libdir}/%{name}/libhbpgsql.a} %{?_with_gd: %{_libdir}/%{name}/libhbgd.a} %{_libdir}/%{name}/libhbbtree.a %{_libdir}/%{name}/libhbmisc.a %{_libdir}/%{name}/libhbct.a -%{_libdir}/%{name}/libhbzlib.a +#%{_libdir}/%{name}/libhbzlib.a %{_libdir}/%{name}/libhbtip.a %{_libdir}/%{name}/libxhb.a -%{_libdir}/%{name}/libhbrddado.a +%{_libdir}/%{name}/librddado.a %{_libdir}/%{name}/libhbw32.a -%{_libdir}/%{name}/libhbgtwvg.a +%{_libdir}/%{name}/libgtwvg.a %{_libdir}/%{name}/libhbgt.a %{_libdir}/%{name}/libhbbmcdx.a %{_libdir}/%{name}/libhbclipsm.a diff --git a/harbour/harbour.spec b/harbour/harbour.spec index 6359c69b0d..87d8a299f1 100644 --- a/harbour/harbour.spec +++ b/harbour/harbour.spec @@ -507,7 +507,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %dir %{_libdir}/%{name} %{!?_without_nf: %{_libdir}/%{name}/libhbnf.a} -%{?_with_adsrdd: %{_libdir}/%{name}/libhbrddads.a} +%{?_with_adsrdd: %{_libdir}/%{name}/librddads.a} %{?_with_odbc: %{_libdir}/%{name}/libhbodbc.a} %{?_with_mysql: %{_libdir}/%{name}/libhbmysql.a} %{?_with_pgsql: %{_libdir}/%{name}/libhbpgsql.a} @@ -516,7 +516,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/%{name}/libhbbtree.a %{_libdir}/%{name}/libhbmisc.a %{_libdir}/%{name}/libhbct.a -%{_libdir}/%{name}/libhbzlib.a +#%{_libdir}/%{name}/libhbzlib.a %{_libdir}/%{name}/libhbtip.a %{_libdir}/%{name}/libxhb.a %{_libdir}/%{name}/libhbgt.a diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index 150a15d191..bc3882d833 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -1628,7 +1628,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) if( HB_SUPPORT_HARBOUR ) hb_compExprReduceASC( pSelf, HB_COMP_PARAM ); } - else if( ( strcmp( "STOD", pName->value.asSymbol ) == 0 || + else if( ( strcmp( "STOD", pName->value.asSymbol ) == 0 || strcmp( "HB_STOD", pName->value.asSymbol ) == 0 ) && usCount < 2 ) { if( HB_SUPPORT_HARBOUR ) diff --git a/harbour/source/rtl/net.c b/harbour/source/rtl/net.c index a32cccf67b..2cf4b04e91 100644 --- a/harbour/source/rtl/net.c +++ b/harbour/source/rtl/net.c @@ -114,7 +114,7 @@ char * hb_netname( void ) # if defined(__WATCOMC__) return hb_getenv( "HOSTNAME" ); # else - char * pszValue = hb_xgrab( MAXGETHOSTNAME + 1 ); + char * pszValue = ( char * ) hb_xgrab( MAXGETHOSTNAME + 1 ); pszValue[ 0 ] = '\0'; gethostname( pszValue, MAXGETHOSTNAME ); return pszValue; @@ -129,7 +129,7 @@ char * hb_netname( void ) return pszValue; # else union REGS regs; - char * pszValue = hb_xgrab( 16 ); + char * pszValue = ( char * ) hb_xgrab( 16 ); pszValue[ 0 ] = '\0'; regs.HB_XREGS.ax = 0x5E00;