From c7888e9b4260f8881981c41782540418fd3c686c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 23 Feb 2009 21:19:25 +0000 Subject: [PATCH] 2009-02-23 22:17 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * utils/hbmk2/hbmk2.prg ! Fixed bug in path normalization which stripped leading (root) path separator. Guy, could you please retest now? - bin/hb-mkdll.bat + bin/hb-mkdyn.bat * bin/postinst.bat * harbour-win-spec * harbour-wce-spec * harbour.spec * bin/postinst.sh * bin/hb-func.sh - bin/hb-mkslib.sh + bin/hb-mkdyn.sh * Synced the name of these tools with similar function, name also converted to 8.3. ; NOTE: lib/dll creation functionality (which is the difference now between .sh and .bat flavour) may once in the future be implemented in hbmk2. See existing TODO there. --- harbour/ChangeLog | 22 ++++++++++++++++++++++ harbour/bin/hb-func.sh | 8 ++++---- harbour/bin/{hb-mkdll.bat => hb-mkdyn.bat} | 0 harbour/bin/{hb-mkslib.sh => hb-mkdyn.sh} | 2 +- harbour/bin/postinst.bat | 2 +- harbour/bin/postinst.sh | 16 ++++++++-------- harbour/harbour-wce-spec | 2 +- harbour/harbour-win-spec | 2 +- harbour/harbour.spec | 2 +- harbour/utils/hbmk2/hbmk2.prg | 2 +- 10 files changed, 40 insertions(+), 18 deletions(-) rename harbour/bin/{hb-mkdll.bat => hb-mkdyn.bat} (100%) rename harbour/bin/{hb-mkslib.sh => hb-mkdyn.sh} (99%) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7e0eb3d285..b4927a991d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,28 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-02-23 22:17 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * utils/hbmk2/hbmk2.prg + ! Fixed bug in path normalization which stripped leading + (root) path separator. Guy, could you please retest now? + + - bin/hb-mkdll.bat + + bin/hb-mkdyn.bat + * bin/postinst.bat + * harbour-win-spec + * harbour-wce-spec + * harbour.spec + * bin/postinst.sh + * bin/hb-func.sh + - bin/hb-mkslib.sh + + bin/hb-mkdyn.sh + * Synced the name of these tools with similar function, + name also converted to 8.3. + ; NOTE: lib/dll creation functionality (which is the + difference now between .sh and .bat flavour) may + once in the future be implemented in hbmk2. See + existing TODO there. + 2009-02-23 19:36 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * utils/hbmk2/hbmk2.prg % Normalizing autodetected paths when system locations diff --git a/harbour/bin/hb-func.sh b/harbour/bin/hb-func.sh index adb652a953..89f26a2733 100755 --- a/harbour/bin/hb-func.sh +++ b/harbour/bin/hb-func.sh @@ -766,15 +766,15 @@ mk_hblibso() full_lib_name_mt="lib${name}mt-${hb_ver}${lib_ext}" fi if [ -n "${HB_TOOLS_PREF}" ]; then - hb_mkslib="${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkslib" + hb_mkdyn="${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkdyn" else - hb_mkslib="${HB_BIN_INSTALL}/hb-mkslib" + hb_mkdyn="${HB_BIN_INSTALL}/hb-mkdyn" fi echo "Making ${full_lib_name}..." - ${hb_mkslib} ${full_lib_name} $LIBS ${linker_options} + ${hb_mkdyn} ${full_lib_name} $LIBS ${linker_options} if [ "${HB_ARCHITECTURE}" != "dos" ]; then echo "Making ${full_lib_name_mt}..." - ${hb_mkslib} ${full_lib_name_mt} $LIBSMT ${linker_options} + ${hb_mkdyn} ${full_lib_name_mt} $LIBSMT ${linker_options} fi for l in ${full_lib_name} ${full_lib_name_mt} do diff --git a/harbour/bin/hb-mkdll.bat b/harbour/bin/hb-mkdyn.bat similarity index 100% rename from harbour/bin/hb-mkdll.bat rename to harbour/bin/hb-mkdyn.bat diff --git a/harbour/bin/hb-mkslib.sh b/harbour/bin/hb-mkdyn.sh similarity index 99% rename from harbour/bin/hb-mkslib.sh rename to harbour/bin/hb-mkdyn.sh index 14b71284fa..70d03337cb 100755 --- a/harbour/bin/hb-mkslib.sh +++ b/harbour/bin/hb-mkdyn.sh @@ -80,7 +80,7 @@ trap cleanup EXIT &>/dev/null if [ "${SLIB_EXT}" != ".dylib" ]; then - OTMPDIR="/tmp/hb-mkslib-$$" + OTMPDIR="/tmp/hb-mkdyn-$$" rm -fR "${OTMPDIR}" mkdir -p "${OTMPDIR}" cd "${OTMPDIR}" diff --git a/harbour/bin/postinst.bat b/harbour/bin/postinst.bat index 059d3c8b24..ce02b59734 100644 --- a/harbour/bin/postinst.bat +++ b/harbour/bin/postinst.bat @@ -18,7 +18,7 @@ goto inst_%HB_ARCHITECTURE% :inst_win rem Windows post install part -if "%OS%" == "Windows_NT" if "%HB_DLL%" == "yes" call %~dp0hb-mkdll.bat +if "%OS%" == "Windows_NT" if "%HB_DLL%" == "yes" call %~dp0hb-mkdyn.bat echo @"%%~dp0hbmk2.exe" -hbcc %%*> %HB_BIN_INSTALL%\hbcc.bat echo @"%%~dp0hbmk2.exe" -hbcmp %%*> %HB_BIN_INSTALL%\hbcmp.bat diff --git a/harbour/bin/postinst.sh b/harbour/bin/postinst.sh index c6952fe017..11b6027093 100755 --- a/harbour/bin/postinst.sh +++ b/harbour/bin/postinst.sh @@ -60,21 +60,21 @@ then fi if [ -n "${HB_TOOLS_PREF}" ]; then - hb_mkslib="${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkslib" - rm -f "${hb_mkslib}" + hb_mkdyn="${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkdyn" + rm -f "${hb_mkdyn}" sed -e "s/^# HB_ARCHITECTURE=\"\"\$/HB_ARCHITECTURE=\"${HB_ARCHITECTURE}\"/g" \ -e "s/^# CCPREFIX=\"\"\$/[ -n \"\${CCPREFIX}\" ] || CCPREFIX=\"${CCPREFIX}\"/g" \ - "${hb_root}/bin/hb-mkslib.sh" > "${hb_mkslib}" && \ - chmod 755 "${hb_mkslib}" + "${hb_root}/bin/hb-mkdyn.sh" > "${hb_mkdyn}" && \ + chmod 755 "${hb_mkdyn}" elif [ "${HB_ARCHITECTURE}" = "sunos" ] || \ [ "${HB_ARCHITECTURE}" = "hpux" ] || \ ! which install &>/dev/null; then - rm -f "${HB_BIN_INSTALL}/hb-mkslib" - cp "${hb_root}/bin/hb-mkslib.sh" "${HB_BIN_INSTALL}/hb-mkslib" && \ - chmod 755 "${HB_BIN_INSTALL}/hb-mkslib" + rm -f "${HB_BIN_INSTALL}/hb-mkdyn" + cp "${hb_root}/bin/hb-mkdyn.sh" "${HB_BIN_INSTALL}/hb-mkdyn" && \ + chmod 755 "${HB_BIN_INSTALL}/hb-mkdyn" elif [ "${HB_ARCHITECTURE}" != "dos" ]; then # Without -c some OSes _move_ the file instead of copying it! - install -c -m 755 "${hb_root}/bin/hb-mkslib.sh" "${HB_BIN_INSTALL}/hb-mkslib" + install -c -m 755 "${hb_root}/bin/hb-mkdyn.sh" "${HB_BIN_INSTALL}/hb-mkdyn" fi mk_hbtools "${HB_BIN_INSTALL}" "$@" if [ "$HB_COMPILER" = "gcc" ] || [ "$HB_COMPILER" = "gpp" ] || \ diff --git a/harbour/harbour-wce-spec b/harbour/harbour-wce-spec index dd0f6a8626..d1c68b7b4f 100644 --- a/harbour/harbour-wce-spec +++ b/harbour/harbour-wce-spec @@ -289,7 +289,7 @@ rm -fR $RPM_BUILD_ROOT %defattr(-,root,root,755) %doc doc/%{readme} -%{_bindir}/%{hb_pref}-mkslib +%{_bindir}/%{hb_pref}-mkdyn %{_bindir}/%{hb_pref}-build %{_bindir}/%{hb_pref}cc %{_bindir}/%{hb_pref}cmp diff --git a/harbour/harbour-win-spec b/harbour/harbour-win-spec index da1517ce06..665929f626 100644 --- a/harbour/harbour-win-spec +++ b/harbour/harbour-win-spec @@ -289,7 +289,7 @@ rm -fR $RPM_BUILD_ROOT %defattr(-,root,root,755) %doc doc/%{readme} -%{_bindir}/%{hb_pref}-mkslib +%{_bindir}/%{hb_pref}-mkdyn %{_bindir}/%{hb_pref}-build %{_bindir}/%{hb_pref}cc %{_bindir}/%{hb_pref}cmp diff --git a/harbour/harbour.spec b/harbour/harbour.spec index 5643771a3c..a0518f5a30 100644 --- a/harbour/harbour.spec +++ b/harbour/harbour.spec @@ -606,7 +606,7 @@ rm -rf $RPM_BUILD_ROOT %verify(not md5 mtime) %config /etc/harbour/hb-charmap.def %{_bindir}/harbour %{_bindir}/hbpp -%{_bindir}/hb-mkslib +%{_bindir}/hb-mkdyn %{_bindir}/%{hb_pref}-build %{_bindir}/%{hb_pref}cc %{_bindir}/%{hb_pref}cmp diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index e055b64bd4..c04714befd 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1930,7 +1930,7 @@ STATIC FUNCTION PathNormalize( cPath, lNormalize ) cPath := DirAddPathSep( cPath ) IF lNormalize - nLastSep := 0 + nLastSep := iif( Left( cPath, 1 ) == hb_osPathSeparator(), 1, 0 ) DO WHILE ( nNextSep := hb_At( hb_osPathSeparator(), cPath, nLastSep + 1 ) ) > 0 SWITCH SubStr( cPath, nLastSep + 1, nNextSep - nLastSep - 1 ) CASE ".."