Article View: comp.unix.programmer
Article #3719Re: GNU Make: Is it illegal to include within targets?
From: Paul D. Smith
Date: Wed, 29 Mar 2006 18:04
Date: Wed, 29 Mar 2006 18:04
33 lines
2379 bytes
2379 bytes
%% "nopa" <nopaperfound@yahoo.com> writes: n> First I've a command file named "commands.incl", like this n> ---cut here--- n> cp here there n> cd mydir ; make depend n> ---cut here--- n> (where every line begins by one and just one TAB) n> And then I've a Makefile like this: n> all: n> make alltools n> make allstuff n> include commands.incl n> make therestoftestuff n> When trying this with GNU Make it complains "commands commence n> before first target. Stop.", and the error is reported at line 1 of n> "commands.incl". The docs say that it's because there's a line n> beginning with Tab, and outside of a target. n> What's happenning? Does GNU Make assume that "include" also means n> "end of target"? Correct. Rules cannot "contain" include files like this in GNU make. -- ------------------------------------------------------------------------------- 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:
<vpdrvetxunyv.fsf@lemming.engeast.baynetworks.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.aset.psu.edu!news.cse.psu.edu!elk.ncren.net!newsflash.concordia.ca!news.sfu.ca!utnut!qcarhaaa.nortelnetworks.com!zcars129!not-for-mailReferences:
<1143625957.870353.299610@u72g2000cwu.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: fc89c,81d76b36bcbdef2a X-Google-Thread: 109f73,81d76b36bcbdef2a X-Google-Attributes: gidfc89c,gid109f73,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.aset.psu.edu!news.cse.psu.edu!elk.ncren.net!newsflash.concordia.ca!news.sfu.ca!utnut!qcarhaaa.nortelnetworks.com!zcars129!not-for-mail From: "Paul D. Smith" <psmith@gnu.org> Newsgroups: comp.unix.programmer,gnu.utils.help Subject: Re: GNU Make: Is it illegal to include within targets? Date: 29 Mar 2006 13:04:24 -0500 Organization: GNU's Not Unix! Lines: 33 Sender: psmith@lemming.engeast.baynetworks.com Message-ID: <vpdrvetxunyv.fsf@lemming.engeast.baynetworks.com> References: <1143625957.870353.299610@u72g2000cwu.googlegroups.com> Reply-To: psmith@gnu.org NNTP-Posting-Host: lemming.engeast.baynetworks.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: zcars129.ca.nortel.com 1143655466 5563 47.17.140.90 (29 Mar 2006 18:04:26 GMT) X-Complaints-To: hawkinsj@nortelnetworks.com NNTP-Posting-Date: Wed, 29 Mar 2006 18:04:26 +0000 (UTC) To: "nopa" <nopaperfound@yahoo.com> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4