%% Jonathan Wilson <[EMAIL PROTECTED]> writes:

  jw> Basicly, I have a string (called INCLUDES) thats been set to something 
  jw> like this:
  jw> -I../../x -I../../y and so on.
  jw> I need to convert it to --include-dir=../../x --include-dir=../../y
  jw> It should work regardless of the number of different paths in the string.
  jw> I am guessing that something like sed might work but I dont know the 
  jw> first thing about sed.
  jw> Anyone got any ideas what to do here?

If you're using GNU make there are many ways.  Check the manual.  You
can just use pattern substitution; something like this is the simplest:

  NEWINCLUDES = $(INCLUDES:-I%=--include-dir=%)

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]> HASMAT: HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.

_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to