From 0ae698e816963f7b7924e2e218ca504ca2f3e54c Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 16 Nov 2009 23:36:58 +0000 Subject: [PATCH] 2009-11-17 00:36 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/config/win/bcc.mk ! always use \ in paths used as ilink32.exe parameters - ilink does not accept / as path delimiter and always use them as switch separators ! enclose parameters with paths into "" to avoid \ stripping by shell ! removed old hacks used for bcc32.exe and WINE Now BCC works again with POSIX shells and WINE. Please test these modifications in native MS-Windows environment. --- harbour/ChangeLog | 9 +++++++++ harbour/config/win/bcc.mk | 16 ++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a664fac3b2..1c813c3f36 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,15 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-17 00:36 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/config/win/bcc.mk + ! always use \ in paths used as ilink32.exe parameters - ilink does not + accept / as path delimiter and always use them as switch separators + ! enclose parameters with paths into "" to avoid \ stripping by shell + ! removed old hacks used for bcc32.exe and WINE + Now BCC works again with POSIX shells and WINE. + Please test these modifications in native MS-Windows environment. + 2009-11-17 00:10 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/rddsql/sddodbc/tests/test2.prg ! fixed minor error in last commit diff --git a/harbour/config/win/bcc.mk b/harbour/config/win/bcc.mk index 7a65867302..e12dfec884 100644 --- a/harbour/config/win/bcc.mk +++ b/harbour/config/win/bcc.mk @@ -42,21 +42,17 @@ endif # Hack to autoconfig bcc, and not require properly set .cfg files in its bin dir. # It only works if we know compiler location. ifneq ($(HB_COMP_PATH_PUB),) - HB_CFLAGS += $(subst /,$(DIRSEP),-I"$(HB_COMP_PATH_PUB)../Include") - LDFLAGS += $(subst /,$(DIRSEP),-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/PSDK") - DFLAGS += $(subst /,$(DIRSEP),-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/PSDK") + HB_CFLAGS += $(subst /,\,-I"$(HB_COMP_PATH_PUB)../Include") + LDFLAGS += $(subst /,\,-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/PSDK") + DFLAGS += $(subst /,\,-L"$(HB_COMP_PATH_PUB)../Lib" -L"$(HB_COMP_PATH_PUB)../Lib/PSDK") endif LD := ilink32.exe +LIBPATHS := "$(subst /,\,-L$(LIB_DIR))" LDFLAGS += -Gn -Tpe $(LIBPATHS) -LD_RULE = $(LD) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) c0x32.obj $(^F), $(subst /,$(DIRSEP),$(BIN_DIR)/$@), nul, $(subst /,$(DIRSEP),$(LDLIBS)) cw32mt.lib import32.lib $(LDSTRIP) +LD_RULE = $(LD) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) c0x32.obj $(^F), "$(subst /,\,$(BIN_DIR)/$@)", nul, $(LDLIBS) cw32mt import32 $(LDSTRIP) -LIBPATHS := -L$(LIB_DIR) -# It's probably not necessary in native Windows but I need it -# for my Linux box because -L seems to not work with WINE -LDLIBS := $(foreach lib,$(HB_USER_LIBS),$(lib)$(LIB_EXT)) -LDLIBS += $(foreach lib,$(LIBS),$(LIB_DIR)/$(lib)$(LIB_EXT)) -LDLIBS += $(foreach lib,$(SYSLIBS),$(lib)$(LIB_EXT)) +LDLIBS := $(strip $(HB_USER_LIBS) $(LIBS) $(SYSLIBS)) AR := tlib.exe ARFLAGS := /P128