🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3722

Re: Makefile with a function in dependency side

#3722
From: Paul D. Smith
Date: Tue, 24 Sep 2002 13:46
31 lines
2538 bytes
%% wsoto@uol.com.br (Walter Encinas) writes:

  we> I need to build a makefile with a make rule that uses a function
  we> result as a dependency.

  >> You can't.

  we> For the sake of curiosity, is any intrinsic reason why make
  we> doesn't have this feature?

Makes rules for the order in which it evaluates variables and functions
have been in existence since the program was first created, and are very
consistent.  Not to mention that the POSIX standard for make requires
them (in the case of variables--there are no such things as functions in
the POSIX standard.)

It would be extremely confusing, not to mention breaking many, many
existing makefiles, to change the order of expansion so that it's not
consistent any longer.  Expansion is hard enough to understand as it
is.


Anyway, the next version of GNU make contains a feature that allows you
to do what you want in a different way, without requiring a re-exec and
without mucking with expansion ordering.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
Technical Details
Message-ID: <p5u1kfsdpc.fsf@lemming.engeast.baynetworks.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsswitch.lcs.mit.edu!snoopy.risq.qc.ca!torn!qcarhaaa.nortelnetworks.com!bcarh189.ca.nortel.com!bcarh8ab.ca.nortel.com!not-for-mail
References: <bcf444eb.0209230934.19aac7fb@posting.google.com> <p53cs0bni0.fsf@lemming.engeast.baynetworks.com> <bcf444eb.0209240410.51b4c2a@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109f73,b1afc18c7dca1ca8
X-Google-Attributes: gid109f73,public
X-Google-Thread: 1025b4,b1afc18c7dca1ca8
X-Google-Attributes: gid1025b4,public
X-Google-Thread: fc89c,b1afc18c7dca1ca8
X-Google-Attributes: gidfc89c,public
X-Google-ArrivalTime: 2002-09-24 06:53:33 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsswitch.lcs.mit.edu!snoopy.risq.qc.ca!torn!qcarhaaa.nortelnetworks.com!bcarh189.ca.nortel.com!bcarh8ab.ca.nortel.com!not-for-mail
From: "Paul D. Smith" <psmith@gnu.org>
Newsgroups: comp.unix.programmer,gnu.utils.help,gnu.misc.discuss
Subject: Re: Makefile with a function in dependency side
Date: 24 Sep 2002 09:46:07 -0400
Organization: GNU's Not Unix!
Lines: 31
Message-ID: <p5u1kfsdpc.fsf@lemming.engeast.baynetworks.com>
References: <bcf444eb.0209230934.19aac7fb@posting.google.com> <p53cs0bni0.fsf@lemming.engeast.baynetworks.com> <bcf444eb.0209240410.51b4c2a@posting.google.com>
Reply-To: psmith@gnu.org
NNTP-Posting-Host: lemming.engeast.baynetworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2