Opened 18 years ago

Closed 18 years ago

#42 closed defect (fixed)

"macro_append constituents" does prepend instead of append

Reported by: pere.mato@… Owned by: arnault
Priority: normal Milestone:
Component: a. Usage Version: v1r18
Severity: normal Keywords:
Cc: Pere.Mato@… OS: All
If Other, could you precise: Experiment: LHCb
If Other, could you precise:
Stack trace:
Steps to reproduce:

Description

I would like to define a post_build action by manipulating the constituents macro and it does not work properly. It seems that command "macro_prepend constituents A" does define the macro constutients with only "A" and then the default action for the package, which seems to be applyed afterwords, adds the rest of the constituents. The net effect is that constituents has "A" in the first position instead of what is really wanted.

Change History (1)

comment:1 Changed 18 years ago by /C=FR/O=CNRS/OU=UMR8607/CN=Vincent Garonne/emailAddress=garonne@…

Cc: Pere.Mato@… added
Resolution: fixed
Status: newclosed

After investigations, it appears that constituents is a special macro system as cmt first applies the package requirements and then you have the standart constituents whihc are applied.

We have found one possible solution for your problem. We introduce two new standart macros in the group fragments:<group>_post_constituents, <group>_pre_constituents.

So now, you will be able to do what you want by:

library A  A.cxx

action post_build             '@echo  "post_build"' 
macro_append all_post_constituents "post_build"

action pre_build             '@echo  "pre_build"' 
macro_append all_pre_constituents "pre_build"

We still have the two other bugs related to windows to fix ; but normally this should be available for the next release.

Best regards,

Vincent.

Note: See TracTickets for help on using tickets.