[Scons-users] commands done in SConscript aren't displayed.

James Rinkevich rinkevichjm at gmail.com
Tue Jul 28 01:56:46 EDT 2015


I have an SConstruct with the following code and only REGEX == "builtin"
#(lots of configure stuff here -- for wxwidgets 3.02 4500+ LOC)
share="SHARED" if SHARED else "STATIC"
unicode="UNICODE" if UNICODE else "ASCII"
debug="DEBUG" if UNICODE else "NODBUG"
toolkitsetup_h=File(os.path.join(toolkitlibincs.path,"setup.h"))
env.Command(toolkitsetup_h,setup_h,Copy("$TARGET", "$SOURCE"))
if REGEX == "builtin":

 regexbuiltin=SConscript(os.path.join("src","regex","SConscript"),exports=["env","SHARED"],variant_dir=os.path.join("build",host_os,host_cpu,unicode,share,debug,"regex")
)
   env.AppendUnique(LIBPATH=["#/lib"],LIBS=["regex"])
if ZLIB == "builtin":

 regexbuiltin=SConscript(os.path.join("src","zlib","SConscript"),exports=["env","SHARED"],variant_dir=os.path.join("build",host_os,host_cpu,unicode,share,debug,"zlib")
)
   env.AppendUnique(LIBPATH=["#/lib"],LIBS=["z"])
if EXPAT == "builtin":

 regexbuiltin=SConscript(os.path.join("src","expat","SConscript"),exports=["env","SHARED"],variant_dir=os.path.join("build",host_os,host_cpu,unicode,share,debug,"expat")
)
   env.AppendUnique(LIBPATH=["#/lib"],LIBS=["expat"])
if LIBTIFF == "builtin":

 regexbuiltin=SConscript(os.path.join("src","tiff","SConscript"),exports=["env","SHARED","MAC","OS2","UNIX","WIN32"],variant_dir=os.path.join("build",host_os,host_cpu,unicode,share,debug,"tiff")
)
   env.AppendUnique(LIBPATH=["#/lib"],LIBS=["tiff","z","jpeg"])
   env.Depends(tiffbuiltin, [zlibbuiltin, jpegbuiltin])
if LIBJPEG == "builtin":

 regexbuiltin=SConscript(os.path.join("src","expat","SConscript"),exports=["env","SHARED"],variant_dir=os.path.join("build",host_os,host_cpu,unicode,share,debug,"jpeg")
)
   env.AppendUnique(LIBPATH=["#/lib"],LIBS=["jpeg","z"])
   env.Depends(libjpegbuiltin, zlibbuiltin)
if LIBPNG == "builtin":

 regexbuiltin=SConscript(os.path.join("src","png","SConscript"),exports=["env","SHARED"],variant_dir=os.path.join("build",host_os,host_cpu,unicode,share,debug,"png")
)
   env.AppendUnique(LIBPATH=["#/lib"],LIBS=["png","z"])
   env.Depends(libpngbuiltin, zlibbuiltin)
# report how we have been configured
--------------
The copy command of the config_h file named "setup.h" is correctly showing
it being copied but the regex library is also being built by scons too.
However, the compile and link of the regex library is not displayed
--------------
PPS I have a better Bigendian checker that works for cross compiling
def CheckCBigEndian(context):
    context.Message("checking for Big Endianness ... ")
    src="""#if defined(__MACH__)
#include <machine/endian.h>
#elif defined(OS_SOLARIS)
#include <sys/isa_defs.h>
  #ifdef _LITTLE_ENDIAN
    #define LITTLE_ENDIAN
  #else
    #define BIG_ENDIAN
  #endif
#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) ||
defined(OS_DRAGONFLYBSD)
#include <sys/types.h>
#include <sys/endian.h>
#else
#include <endian.h>
#endif
#ifdef LITTLE_ENDIAN
  #define IS_LITTLE_ENDIAN 1
#else
  #define IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
#endif
#ifdef IS_LITTLE_ENDIAN
mychoke choke = IS_LITTLE_ENDIAN;
#endif
int main() { return 0;}
"""
    ret=context.TryCompile(src,".cpp")
    context.Result(ret)
    if ret:
        context.Define("WORDS_BIGENDIAN")
    return ret
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150727/f3362b0d/attachment.html>


More information about the Scons-users mailing list