Message: 3
Date: Mon, 4 Sep 2006 15:33:45 +0530
From: "Delicia" 
  <
deliciap@xxxxxxxxxx>
Subject: [cdt-dev] Re: 
  generateCommandLineInfo() of
IManagedCommandLineGenerator
To: <
cdt-dev@xxxxxxxxxxx>
Message-ID: <
2b7e01c6d009$6aaeee10$4301a8c0@xxxxxxxxxxxxx>
Content-Type: 
  text/plain; charset="iso-8859-1"
Hi,
  I made use of make 
  pattern rules and got the expected output. I now have a different 
  problem.
My build rule for "tool A" consists of:
    
  exe1 $< $(<:.b=.es)
    sed 's/.type fr/.type f/g' 
  $(<:.b=.es) > $(<:.b=.ei)
    exe2 -Dopo 
  $(<:.b=.ei) > $(<:.b=.eo)
    exe3 --binary 
  --pin-info  $@ $(<:.b=.eo)
Apparently, the CDT makefile 
  generator method: "addRuleForTool()" does:
buffer.append(TAB + AT + ECHO + 
  WHITESPACE + buildCmd + NEWLINE);
buffer.append(TAB + AT + 
  buildCmd);
As a result my generated makefile 
  contains:
    @echo exe1 $< 
  $(<:.b=.es)
    sed 's/.type fr/.type f/g' $(<:.b=.es) 
  > $(<:.b=.ei)
    exe2 -Dopo $(<:.b=.ei) > 
  $(<:.b=.eo)
    exe3 --binary --pin-info  $@ 
  $(<:.b=.eo)
    @exe1 $< 
  $(<:.b=.es)
    sed 's/.type fr/.type f/g' $(<:.b=.es) 
  > $(<:.b=.ei)
    exe2 -Dopo $(<:.b=.ei) > 
  $(<:.b=.eo)
    exe3 --binary --pin-info  $@ 
  $(<:.b=.eo)
Since the 1st stmt is @echo, the .es file does not get 
  generated, and then the 2nd 'sed' command gives an error.
Could someone 
  give me some suggestions 
  please?
Thankyou,
Delicia.
________________________________
 
  Hi Delicia,
   
  The GnuMakefileGenerator generates pattern rules 
  when possible. That is
why make auto variables are passed to the command 
  line generator, and
the generator is expected to generate the command 
  suitable for the
pattern rule as well.
   
  You might want to raise an enhancement request in 
  bugzilla if your
integration requires more flexible command line generation 
  processing.
   
  As a work-around I suggest you to use make 
  functions for extracting the
file extension from the given string in case 
  the "$<" is passed as
inputResources.
   
  The get the extension string you might 
  use:
$(suffix $(notdir $<))
   
  Regards,
Mikhail
   
  
________________________________
   
  
   
  Hi,
   
      One of the tools in my toolchain has a more 
  complicated build step.
   
  Since it involves 4-5 steps to get the final output, I have written a 
  class that implements 
the "IManagedCommandLineGenerator" 
  interface.
[This class is supplied to the 'commandLineGenerator' attribute 
  of the 'tool'].
   
  In my generateCommandLineInfo() method, I have 'String[] inputResources', 
  which contains $<
But what I need, is the input filename (sans the 
  extension), which I then use in subsequent build steps.
   
  Could someone please tell me where/how to get this information.
   
  Thankyou,
Delicia.