Bug 3811 - MPC drops variables under certain conditions
Summary: MPC drops variables under certain conditions
Status: RESOLVED FIXED
Alias: None
Product: MPC
Classification: Unclassified
Component: MPC (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal
Assignee: Adam Mitz
URL:
Depends on:
Blocks:
 
Reported: 2010-01-14 22:00 CST by Abdul Sowayan
Modified: 2010-06-15 06:43 CDT (History)
1 user (show)

See Also:


Attachments
reproducer (1.94 KB, application/zip)
2010-01-14 22:02 CST, Abdul Sowayan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Abdul Sowayan 2010-01-14 22:00:28 CST
I am using the HEAD version of MPC, along with the HEAD version of ACE/TAO

I have a base project Foo.mpb that looks like this:

project {
  Define_Custom(Foo) {
    automatic             = 1
    command               = <%quote%>Foo<%quote%>
    commandflags          = <%input_noext%>C.h
    dependent             = <%quote%>Foo<%quote%>
    source_outputext      = .cpp
    header_outputext      = .h

    keyword foo_flags = commandflags
  }
}

So assume I have something like this in an MPC file called Bar1.mpc

project : Foo {
  Foo_Files {
    Bar.adl
  }
}

Then I should see the following when I make:

"Foo" BarC.h Bar.adl


----------
$ make Bar1

GNUmakefile: /builds/tmp/GNUmakefile.Bar1 MAKEFLAGS=

"Foo" BarC.h Bar.adl
/bin/sh: Foo: command not found
make[1]: *** [Bar.h] Error 127
make: *** [Bar1] Error 2
----------

The above gave me what I was expecting, no problemo.




Now say I have something like this in an MPC file called Bar2.mpc

Then I should see the following when I make:

"Foo" BarC.h Abdul Bar.adl

project : Foo {
  Foo_Files {
    Bar.adl
  }

  foo_flags += Abdul
}

-----------------
$ make Bar2

GNUmakefile: /builds/tmp/GNUmakefile.Bar2 MAKEFLAGS=

"Foo" C.h Abdul Bar.adl
/bin/sh: Foo: command not found
make[1]: *** [Bar.h] Error 127
make: *** [Bar2] Error 2
-----------------

Notice the above when I make. I get C.h not BarC.h. When I set foo_flags += in an MPC project MPC then set <%input_noext%> to NULL.
Comment 1 Abdul Sowayan 2010-01-14 22:02:19 CST
Created attachment 1242 [details]
reproducer
Comment 2 Johnny Willemsen 2010-05-19 06:53:36 CDT
to Adam
Comment 3 Chad Elliott 2010-06-15 06:43:12 CDT
This has been fixed.

Mon Jun 14 22:06:56 UTC 2010  Chad Elliott  <elliott_c@ociweb.com>
        
        * modules/ProjectCreator.pm:
                                    
          Only replace psuedo variables on actual keywords during variable
          modification.  User defined keywords must not have the parameters
          replaced in order for them to get the correct replacement values 
          later on.