Hi Przemek,

Did you try latest harbour dynamic lib integration into GNU Make
on *nix systems?

Maybe I missed something for *nix platforms, but for non-*nix
it seems to work okay. In GNU make it can work also for platforms
which need different compiler settings for dlls and it also
works for all shells, which means it also works in cross-build
scenarios.

If this works well, we may not need to make them in postinst
phase. We'd still need however the link creation logic at
postinst, but that's sh specific anyway.

Brgds,
Viktor

On 2009.08.24., at 5:11, [email protected] wrote:

Revision: 12303
         
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=12303&view=rev
Author:   druzus
Date:     2009-08-24 15:11:39 +0000 (Mon, 24 Aug 2009)

Log Message:
-----------
2009-08-24 17:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
 * harbour/bin/hb-mkdyn.sh
 * harbour/bin/postinst.sh
   ! fixed win and wce cross builds when GCC cross build tools are not
     in PATH

Modified Paths:
--------------
   trunk/harbour/ChangeLog
   trunk/harbour/bin/hb-mkdyn.sh
   trunk/harbour/bin/postinst.sh

Modified: trunk/harbour/ChangeLog
===================================================================
--- trunk/harbour/ChangeLog     2009-08-24 14:37:58 UTC (rev 12302)
+++ trunk/harbour/ChangeLog     2009-08-24 15:11:39 UTC (rev 12303)
@@ -17,6 +17,12 @@
   past entries belonging to author(s): Viktor Szakats.
*/

+2009-08-24 17:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+  * harbour/bin/hb-mkdyn.sh
+  * harbour/bin/postinst.sh
+ ! fixed win and wce cross builds when GCC cross build tools are not
+      in PATH
+
2009-08-24 16:37 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
  * harbour/config/global.mk
    ! fixed MinGW cross build autodetection

Modified: trunk/harbour/bin/hb-mkdyn.sh
===================================================================
--- trunk/harbour/bin/hb-mkdyn.sh       2009-08-24 14:37:58 UTC (rev 12302)
+++ trunk/harbour/bin/hb-mkdyn.sh       2009-08-24 15:11:39 UTC (rev 12303)
@@ -14,6 +14,7 @@

# HB_PLATFORM=""
# HB_CCPREFIX=""
+# HB_CCPATH=""

if [ -n "${HB_PLATFORM}" ]
then
@@ -111,7 +112,7 @@
                d="${f##*/}"
                mkdir $d
                cd $d
-                ${HB_CCPREFIX}ar -x "${f}" || exit 1
+                ${HB_CCPATH}${HB_CCPREFIX}ar -x "${f}" || exit 1
                cd ..
                ;;
            *)
@@ -139,7 +140,7 @@
        SYSLIBS="-luser32 -lws2_32 -ladvapi32 -lgdi32"
    fi
    # -Wl,--output-def,testdll.def,--out-implib,libtestdll.a
- ${HB_CCPREFIX}gcc -shared -o "${FULLNAME}" $OBJLST $ {linker_options} ${HB_USER_DFLAGS} ${SYSLIBS} ${HB_DLLIBS} && \ + ${HB_CCPATH}${HB_CCPREFIX}gcc -shared -o "${FULLNAME}" $OBJLST $ {linker_options} ${HB_USER_DFLAGS} ${SYSLIBS} ${HB_DLLIBS} && \
        cd "${dir}" && \
        rm -f "${DSTDIR}${FULLNAME}" && \
        mv -f "${OTMPDIR}/${FULLNAME}" "${DSTDIR}${FULLNAME}"
@@ -147,7 +148,7 @@
    #FULLNAME="${BASE}-${VERSION}${SLIB_EXT}"
    #FULLNAME="${BASE}{SLIB_EXT}.${VERSION}"
    FULLNAME="${LIB_NAME}${SLIB_EXT}"
- ${HB_CCPREFIX}gcc -shared -fPIC -o "${FULLNAME}" $OBJLST $ {linker_options} ${HB_USER_DFLAGS} && \ + ${HB_CCPATH}${HB_CCPREFIX}gcc -shared -fPIC -o "${FULLNAME}" $OBJLST ${linker_options} ${HB_USER_DFLAGS} && \
        cd "${dir}" && \
        mv -f "${OTMPDIR}/${FULLNAME}" "${DSTDIR}${FULLNAME}"
fi

Modified: trunk/harbour/bin/postinst.sh
===================================================================
--- trunk/harbour/bin/postinst.sh       2009-08-24 14:37:58 UTC (rev 12302)
+++ trunk/harbour/bin/postinst.sh       2009-08-24 15:11:39 UTC (rev 12303)
@@ -52,8 +52,9 @@
    if [ -n "${HB_TOOLS_PREF}" ]; then
        hb_mkdyn="${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkdyn"
        rm -f "${hb_mkdyn}"
- sed -e "s/^# HB_PLATFORM=\"\"\$/HB_PLATFORM=\"${HB_PLATFORM} \"/g" \ - -e "s/^# HB_CCPREFIX=\"\"\$/[ -n \"\${HB_CCPREFIX}\" ] || HB_CCPREFIX=\"${HB_CCPREFIX}\"/g" \ + sed -e "s!^# HB_PLATFORM=\"\"\$!HB_PLATFORM=\"${HB_PLATFORM} \"!g" \ + -e "s!^# HB_CCPREFIX=\"\"\$![ -n \"\${HB_CCPREFIX}\" ] || HB_CCPREFIX=\"${HB_CCPREFIX}\"!g" \ + -e "s!^# HB_CCPATH=\"\"\$![ -n \"\${HB_CCPATH}\" ] || HB_CCPATH=\"${HB_CCPATH}\"!g" \
            "${hb_root}/bin/hb-mkdyn.sh" > "${hb_mkdyn}" && \
        chmod 755 "${hb_mkdyn}"
    elif [ "$HB_COMPILER" = "icc" ]; then


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to