incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duft Markus" <Markus.D...@salomon.at>
Subject problem with config.h
Date Thu, 14 Sep 2006 13:58:46 GMT
hey there!
 
i have following problem: i'm writing a compiler wrapper (interix-wgcc,
on sourceforge) for which i want to use stdcxx as the default STL
implementation. the only problem is, that the config.h will conflict
with every single config.h generated by autotools managed packages. so i
for now did the following:
 
i changed rw/_config.h to be
 
#ifdef _RWSTD_USE_CONFIG
#   ifndef __WGCC
#  include <config.h>
#   else
#       include <15d/config.h>
#   endif
#else
#  include <rw/config/rwconfig_std.h>
#endif   // _RWSTD_USE_CONFIG
 
__WGCC is defined as soon as i'm using wgcc of course. the 15d is
substed by a sed after building (see below). This has just the drawback,
that only ONE single configuration is supported for now. my build script
is (ksh or bash):
 
src_build() {
    ${RMDIRF} ${BUILDDIR}/${HOSTNAME} || die
    ${MKDIRP} ${BUILDDIR}/${HOSTNAME} || die
 
    cd ${BUILDDIR}/${NAMEDVERSION} || die
 
    cmd.exe /C generate.bat /BUILDDIR:`unixpath2win
${BUILDDIR}/${HOSTNAME}` /CONFIG:VC71 || die
 
    cd ${BUILDDIR}/${HOSTNAME} || die
 
    ${RMDIRF} ${BUILDDIR}/${HOSTNAME}/examples || die
    ${RMDIRF} ${BUILDDIR}/${HOSTNAME}/tests || die
 
    # this _must only_ be done on VS2005
    cl_out=`cl.exe`
    case "$cl_out" in
    *13.00*)    # vs 2002
        ;;
    *13.10*)    # vs 2003
        ;;
    *14.00*)    # vs 2005
        devenv.exe /upgrade VC71.sln
        ;;
    esac
 
    cmd.exe /C build.bat 15d || die
}
 
src_install() {
    ${MKDIRP} ${DISTDIR}${DESTDIR}/bin
    ${MKDIRP} ${DISTDIR}${DESTDIR}/lib
    ${MKDIRP} ${DISTDIR}${DESTDIR}/include
 
    cp ${BUILDDIR}/${HOSTNAME}/lib/*.dll ${DISTDIR}${DESTDIR}/bin
    cp ${BUILDDIR}/${HOSTNAME}/lib/*.pdb ${DISTDIR}${DESTDIR}/bin
    cp ${BUILDDIR}/${HOSTNAME}/lib/*.lib ${DISTDIR}${DESTDIR}/lib
 
    cp -R ${BUILDDIR}/${HOSTNAME}/include/* ${DISTDIR}${DESTDIR}/include
    cp -R ${BUILDDIR}/${NAMEDVERSION}/include/*
${DISTDIR}${DESTDIR}/include
 
    ${SED} -i -e 's,@CONFIG@,15d,g'
${DISTDIR}${DESTDIR}/include/rw/_config.h
 
    tbenvext PATH "${DESTDIR}/bin"
    tbenvset STDCXX_HOME "${DESTDIR}"
    tbenvset STDCXX_STD "15d"
    tbenvset STDCXX_DBG "15d"
    tbenvset STDCXX_FLAGS "/D_RWSTD_USE_CONFIG /D_RWSHARED"
}
 
the script is needed anyway, so for now this is not a too big problem,
but it would be really cool if config.h would be something else, like
rwstd_config.h or so...
 
Cheers, Markus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message