help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need to know how to do something with a makefile


From: Paul Smith
Subject: Re: need to know how to do something with a makefile
Date: Sat, 13 Apr 2002 23:10:45 -0400

%% Jonathan Wilson <address@hidden> 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 <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]