none
Build.exe does not evaluate IF conditional statements. RRS feed

  • Question

  • Hi all,

    I have ported my BSP from CE6 to CE7 and I have the code and build process working in CE7, but when I try to build the code under CE6 I receive a build warning that I don't get in CE7 that "Build.exe does not evaluate IF conditional statements."

    I don't quite understand what that is referring to as the code it is complaining about I pulled straight from a sources.cmn in a CE7 BSP from Freescale for the iMX28, and I'm using an iMX25, so I thought it would be safe:

     

    !if "$(_WINCEOSVER)" == "700"
    
    _COMMONPUBROOT=$(SG_OUTPUT_ROOT)
    __PROJROOT=$(_PROJECTROOT)
    
    _PLATCOMMONLIB=$(_COMMONPUBROOT)\platcomm\$(_TGTPLAT)\lib
    _PLATLIB=$(_COMMONPUBROOT)\platform\$(_TGTPLAT)\lib
    !else
    _PLATCOMMONLIB=$(_PLATFORMROOT)\common\lib
    
    _COMMONPUBROOT=$(_PUBLICROOT)\common
    _PLATLIB=$(_TARGETPLATROOT)\lib
    
    !endif
    

    The code above is the offending code, and it seems to complain about the second _PLATCOMMONLIB and _PLATLIB.

    When I build under CE7 I don't have any warnings, only under CE6. How do I remove the warning? I have tried re-ordering the defines but that doesn't seem to work either. I would have thought it would be similar to CDEFINES etc where you can add defines depending on environment variables, for instance a bit further down the sources.cmn file I have a fair few lines of 

    !IF "$(WINCE_VERSION_MAJOR)" != ""
    CDEFINES=$(CDEFINES) -DWINCE_VERSION_MAJOR="$(WINCE_VERSION_MAJOR)"
    !ENDIF
    
    which I don't get any warning for. I've read http://social.msdn.microsoft.com/Forums/en-US/microsoftdeviceemu/thread/255b4fc1-2c61-4992-9a30-b597e075edf9/ but don't quite know where the documentation they are referring to is.

    Is it safe for me to just ignore this warning?

    Cheers,

    Barak

     

    Monday, October 24, 2011 5:38 AM

Answers

  • It is safe to ignore as long as the conditionals do not effect the dependencies.

    One way to eliminate the warning is to include files based on environment variables:

    !INCLUDE $(_TARGETPLATROOT)\sources.$(WINCE_VERSION_MAJOR)

    Which is of course totally unnecessary becuase the versions are defined in bldver.h.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    • Marked as answer by Barak14 Monday, October 24, 2011 10:55 PM
    Monday, October 24, 2011 12:27 PM
    Moderator

All replies

  • It is safe to ignore as long as the conditionals do not effect the dependencies.

    One way to eliminate the warning is to include files based on environment variables:

    !INCLUDE $(_TARGETPLATROOT)\sources.$(WINCE_VERSION_MAJOR)

    Which is of course totally unnecessary becuase the versions are defined in bldver.h.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    • Marked as answer by Barak14 Monday, October 24, 2011 10:55 PM
    Monday, October 24, 2011 12:27 PM
    Moderator
  • Thanks for that, I changed the lines it was complaining about to be environment variables in the project file and the warning went away.
    Monday, October 24, 2011 10:54 PM