[Top][All Lists]

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

Re: generation of rules specified on the command line

From: Paul D. Smith
Subject: Re: generation of rules specified on the command line
Date: Fri, 14 May 2004 00:52:42 -0400

%% Levent Yilmaz <address@hidden> writes:

  ly> My problem is quite simple, but I couldn't come up with any
  ly> solution but one which is convoluted and far from being elegant. I
  ly> will display it, but of course first thing's first. Here is my
  ly> simple problem:

  ly> PROBLEM: Generate rules based on the targets *specified at the time* 
  ly> make is run, and make them. For example,
  ly> %> make foo.cpp bar.f90
  ly> would generate targets 'foo.o' and 'bar.o'.

You've got it the wrong way around.  Even reading out loud it doesn't
make sense: you don't "make foo.cpp", foo.cpp is already there.

You want to make foo.o, so that is what you should ask for.  Tell make
what you want it to make:

    make foo.o bar.o

and all will work out properly.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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