×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    27

    Problem with bld.inf and abld test - duplicate entries

    Hi,

    I'm experimenting with a project which contains also some testing code.
    I want to use abld's 'test' switch to control building process:
    abld build ... - for regular builds
    abld test build ... - for builds with testing enabled.

    So I have such bld.inf

    Code:
    PRJ_PLATFORMS
    DEFAULT
    
    PRJ_EXPORTS
    ../inc/Mathematics.h
    ../inc/LetterCaseModifier.h
    
    PRJ_MMPFILES
    TestedClasses.mmp
    
    
    ////////////////////////////////////////////////////////////////////////////////
    
    PRJ_TESTEXPORTS
    ../inc/Mathematics.h        /epoc32/include/Mathematics.h
    ../inc/LetterCaseModifier.h /epoc32/include/LetterCaseModifier.h
    
    
    PRJ_TESTMMPFILES
    TestedClasses_tf.mmp
    When executing 'bldmake bldfiles' I got fatal errors:

    Code:
    C:\Symbian\Carbide\workspace\Sixth\FirstProject\TestedClasses\group>bldmake bldf
    iles
    
    \Symbian\Carbide\workspace\Sixth\FirstProject\TestedClasses\group\BLD.INF FATAL
    ERROR(S):
    \Symbian\Carbide\workspace\Sixth\FirstProject\TestedClasses\group\BLD.INF(15) :
    Duplicate export \Symbian\9.2\S60_3rd_FP1\EPOC32\include\Mathematics.h (from lin
    e \Symbian\Carbide\workspace\Sixth\FirstProject\TestedClasses\group\BLD.INF: 5)
    \Symbian\Carbide\workspace\Sixth\FirstProject\TestedClasses\group\BLD.INF(16) :
    Duplicate export \Symbian\9.2\S60_3rd_FP1\EPOC32\include\LetterCaseModifier.h (f
    rom line \Symbian\Carbide\workspace\Sixth\FirstProject\TestedClasses\group\BLD.I
    NF: 6)
    It seems that given header file can appear in bld.inf only once even when both occurences belong to different sections (PRJ_EXPORTS and PRJ_TESTEXPORTS).
    I observed similar problem with mmp files - given file cannot be used for PRJ_MMPFILES and PRJ_TESTMMPFILES at the same time.

    I need to export those files for both scenarios.
    Is there some smart solution to achieve this utilising 'test' switch?
    Or maybe I'm doing something wrong?

    Thanks for your time

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Problem with bld.inf and abld test - duplicate entries

    PRJ_TESTEXPORTS may operate as addition to PRJ_EXPORT, at least
    Quote Originally Posted by SDK Help
    Note that, for certain abld commands, not all the parameters, such as platform, build and program, apply. For example, abld export does not take these parameters, as exports do not depend on any of build, platform or program.
    and
    test
    Where test is specified before command, the command will operate on all the projects defined by .mmp files listed in the prj_testmmpfiles section of the component description file, rather than those projects defined by .mmp files listed in the prj_mmpfiles section.

    Note that the test parameter is irrelevant for some commands and, in those cases, cannot be specified.
    may be interpreted this way.

  3. #3
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: Problem with bld.inf and abld test - duplicate entries

    Quote Originally Posted by FerdynandKiepski View Post
    Hi,
    I need to export those files for both scenarios.
    Is there some smart solution to achieve this utilising 'test' switch?
    Or maybe I'm doing something wrong?
    All projects I've seen that use the 'abld test' facility use it in a slightly different way. The normal build builds everything that needs to be "released". The test build builds additional components for testing the system. Therefore, a non-test build would be just "abld build" while a test build would be "abld build" followed by "abld test build".

    The PRJ_TESTEXPORTS section is usually used for example to install test data and such into emulator filesystem.

  4. #4
    Registered User
    Join Date
    Feb 2008
    Posts
    27

    Re: Problem with bld.inf and abld test - duplicate entries

    Thank you for your answers!

    @wizard_hu_:

    The funny thing is that 'test' works with export command to some extent - files get exported from appropriate section, it's just that they cannot be in both sections at the same time. What makes me wonder is this duplication issue.

    @laa-laa:

    I see, this is nice example but my case is a bit different. I'm not creating additional components in test build but I want to change components that are released, i.e:
    - Non-test build contains key functionality of the component.
    - Test build uses different mmp file to define some macros and use additional source files with test code. This extends key functionality but within single component

    This might be strange approach but as I mentioned - this is an experiment.

    I can solve the problem by:
    - putting header only to PRJ_EXPORTS
    - running abld export
    - running abld test build

    It's just that single line 'abld test build' with two sections in bld.inf would be more intuitive, elegant and convenient. And since it works partially - I'm wondering whether this is known limitation of bldmake.

  5. #5
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: Problem with bld.inf and abld test - duplicate entries

    Quote Originally Posted by FerdynandKiepski View Post
    I can solve the problem by:
    - putting header only to PRJ_EXPORTS
    - running abld export
    - running abld test build
    Yes, this fits within the model of test build = "abld build" + "abld test build", since "export" is one subphase in "build".

    It's just that single line 'abld test build' with two sections in bld.inf would be more intuitive, elegant and convenient. And since it works partially - I'm wondering whether this is known limitation of bldmake.
    It's well known by everyone who has discovered the issue experimentally :)

    Think of bldmake as essentially a makefile generator. The bld.inf sections specify the tools to run on files (e.g. copy for PRJ_EXPORTS, makmake for PRJ_MMPFILES). Files listed in these sections map to makefile targets. Now, there can only be one set of commands for each target. Specifying the same target more than once leads to an error.

  6. #6
    Registered User
    Join Date
    Feb 2008
    Posts
    27

    Re: Problem with bld.inf and abld test - duplicate entries

    It works with this two-phase approach and now I understand it better - thanks for help!

Similar Threads

  1. in bld.inf structure ...
    By barkja in forum Symbian Tools & SDKs
    Replies: 8
    Last Post: 2010-05-04, 15:06
  2. bld.inf
    By Burim in forum Symbian
    Replies: 6
    Last Post: 2008-08-25, 11:48
  3. Problem with importing a bld.inf file in Carbide C++ express
    By svdwal in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2006-12-06, 18:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×