[Top][All Lists]

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

RE: Macros and include?

From: timothy . llewellynn
Subject: RE: Macros and include?
Date: Wed, 23 Apr 2003 17:50:38 +0200

Hi Paul,

I managed to overcome the problem by letting make generate my
files. This way a include directive will call the rule to build each which replaces the MODDIR variable with the path of where the lives. Although the solution has its drawbacks, it does require
less work for maintaining large directory structures, especially if they

Thanks for the help.

include $(OBJDIR)/submod1/
include $(OBJDIR)/submod2/

        #rule that replaces $(MODDIR)/ in with $(dir $*)

-----Original Message-----
From: Paul D. Smith [mailto:address@hidden 
Sent: mercredi, 23. avril 2003 16:09
To: address@hidden
Cc: address@hidden
Subject: RE: Macros and include?

%% address@hidden writes:

  tl> Yes I've looked at the eval function and it will probably work,
  tl> thou upgrading to 3.80 is sadly not an option, we are using 3.79.

Then you're out of luck... you'll have to write it all out by hand. There's
no other choice with GNU make 3.79.

  tl> It would be nice if when a file was included using the include
  tl> directive, make would let that file know where it was included
  tl> from, this way I wouldn't have to manually keep track of the
  tl> directory hirechery. Just an idea.

There are lots of things that would be nice :), but in fact this is doable
already, without a huge amount of pain, with the functionality currently
available in the latest version of GNU make, and I don't want to add tons of
"special purpose" features simply as syntactic sugar for things that are
already possible--more things to test, more things to break.

After all, even if I did agree to add this feature to GNU make going
forward, you still couldn't do it in GNU make 3.79 :).

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

Attachment: InterScan_Disclaimer.txt
Description: Text document

reply via email to

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