diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e0bf4db254..b12c38ced3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,36 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-17 19:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/wce/mingwarm.mk + * config/wce/msvcarm.mk + * config/win/mingw.mk + * config/win/icc.mk + * config/win/cygwin.mk + * config/win/msvc.mk + ! Removed delete command which was called when $(AR) command failed. + (usually: '|| $(RM) $(subst /,$(DIRSEP),$(LIB_DIR)/$@)') + This fixes three issues: + - It won't force GNU Make into using cmd shell (in fact temporary batch file) + to execute these commands, thus it won't hit cmd shell length limitations + on NT and W2K systems (maybe Win9x also? TOCHECK). + - Build process will properly stop in case $(AR) (lib assembly) command + fails, instead of deleting the wrong lib and continuing with the build. + Best would be to delete it and fail, but I found no clean way to do this. + - This incorrect variation is no longer used: '|| $(RM) $(LIB_DIR)/$@' + (pathsep conversion is missing) + NOTE: If someone can recommend a way to fail the build after deleting + the partial lib, all above logic can be reintroduced, but in this + case the lib creation cmds need to be rewritten like mingw to + avoid long cmdline lengths. + IOW I'm looking for a win shell equivalent of this sequence: + AR_RULE = $(AR) ... || ( $(RM) ... && **false** ) + where **false** is something which creates no output and returns + non-zero errorlevel. + + * ChangeLog + + More explanation to prev log entry. + 2010-06-17 09:18 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/resources/setup.ui * contrib/hbide/resources/setup.uic @@ -51,6 +81,11 @@ * config/win/cygwin.mk + Added support for host systems with shorter cmdline limits (in lib creation command). F.e. on WinW2K or WinNT. + Here the problem was that on these targets the $(AR) command + is a command sequence which is executed via cmd shell by + GNU Make, so all shell command length limitations apply. + These limits are much smaller than for CreateProcess() + calls. * config/win/cygwin.mk ! Fixed delete command on 'ar' failure to work on native diff --git a/harbour/config/wce/mingwarm.mk b/harbour/config/wce/mingwarm.mk index 5461758810..07326cbf54 100644 --- a/harbour/config/wce/mingwarm.mk +++ b/harbour/config/wce/mingwarm.mk @@ -66,7 +66,7 @@ endef define create_library $(if $(wildcard __lib__.tmp),@$(RM) __lib__.tmp,) $(foreach file,$^,$(library_object)) - ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ @__lib__.tmp $(ARSTRIP) ) || $(RM) $(subst /,$(DIRSEP),$(LIB_DIR)/$@) + ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ @__lib__.tmp $(ARSTRIP) ) endef AR_RULE = $(create_library) diff --git a/harbour/config/wce/msvcarm.mk b/harbour/config/wce/msvcarm.mk index 5b8686ef7e..fd82deba88 100644 --- a/harbour/config/wce/msvcarm.mk +++ b/harbour/config/wce/msvcarm.mk @@ -95,7 +95,7 @@ endif LDFLAGS += $(LIBPATHS) AR := lib.exe -AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR)/$@ $(^F) DY := $(LD) DFLAGS += -nologo -dll -subsystem:windowsce -nodefaultlib:oldnames.lib $(LIBPATHS) diff --git a/harbour/config/win/cygwin.mk b/harbour/config/win/cygwin.mk index eb2f170177..dec9db3e0b 100644 --- a/harbour/config/win/cygwin.mk +++ b/harbour/config/win/cygwin.mk @@ -63,7 +63,7 @@ endef define create_library $(if $(wildcard __lib__.tmp),@$(RM) __lib__.tmp,) $(foreach file,$^,$(library_object)) - ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ @__lib__.tmp $(ARSTRIP) ) || $(RM) $(subst /,$(DIRSEP),$(LIB_DIR)/$@) + ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ @__lib__.tmp $(ARSTRIP) ) endef AR_RULE = $(create_library) diff --git a/harbour/config/win/icc.mk b/harbour/config/win/icc.mk index 81b89d7e8e..39a8b8fbfa 100644 --- a/harbour/config/win/icc.mk +++ b/harbour/config/win/icc.mk @@ -50,7 +50,7 @@ LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT)) LDFLAGS += -nologo $(LIBPATHS) AR := xilib.exe -AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR)/$@ $(^F) DY := $(LD) DFLAGS += -nologo -dll -subsystem:console $(LIBPATHS) diff --git a/harbour/config/win/mingw.mk b/harbour/config/win/mingw.mk index a868f7fc22..9550f992a9 100644 --- a/harbour/config/win/mingw.mk +++ b/harbour/config/win/mingw.mk @@ -107,7 +107,7 @@ endef define create_library $(if $(wildcard __lib__.tmp),@$(RM) __lib__.tmp,) $(foreach file,$^,$(library_object)) - ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ @__lib__.tmp $(ARSTRIP) ) || $(RM) $(subst /,$(DIRSEP),$(LIB_DIR)/$@) + ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ @__lib__.tmp $(ARSTRIP) ) endef AR_RULE = $(create_library) diff --git a/harbour/config/win/msvc.mk b/harbour/config/win/msvc.mk index c5fcf405b7..0a5f0b3ec1 100644 --- a/harbour/config/win/msvc.mk +++ b/harbour/config/win/msvc.mk @@ -83,7 +83,7 @@ LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT)) LDFLAGS += -nologo $(LIBPATHS) AR := lib.exe -AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ +AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR)/$@ $(^F) DY := $(LD) DFLAGS += -nologo -dll -subsystem:console $(LIBPATHS)