🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3720

Re: GNU Make: Is it illegal to include within targets?

#3720
From: Måns Rullgård
Date: Wed, 29 Mar 2006 18:37
42 lines
2212 bytes
"nopa" <nopaperfound@yahoo.com> writes:

> Hi,
>
> I've a Makefile which I thought to be legal because it always worked
> fine in the past with non-GNU versions of Make.
>
> First I've a command file named "commands.incl", like this (for
> example):
>
> ---cut here---
>     cp here there
>     cd mydir ; make depend
> ---cut here---
>
> (where every line begins by one and just one TAB)
>
> And then I've a Makefile like this:
>
> all:
>     make alltools
>     make allstuff
> include commands.incl
>     make therestoftestuff
>
> alltools:
>     blah blah blah
>
> When trying this with GNU Make it complains "commands commence before
> first target. Stop.", and the error is reported at line 1 of
> "commands.incl". The docs say that it's because there's a line
> beginning with Tab, and outside of a target.
>
> It's true that the line 1 of "commands.incl" begins with a Tab, but
> it's _INSIDE_ of the "all:" target. And, as I said, it works with
> commercial versions of Make.

The include directive is not standardized at all.

-- 
M�ns Rullg�rd
mru@inprovide.com
Technical Details
Message-ID: <yw1xslp1qeq7.fsf@agrajag.inprovide.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <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
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Måns Rullgård <mru@inprovide.com>
Newsgroups: comp.unix.programmer,gnu.utils.help
Subject: Re: GNU Make: Is it illegal to include within targets?
Followup-To: comp.unix.programmer
Date: Wed, 29 Mar 2006 19:37:36 +0100
Lines: 42
Message-ID: <yw1xslp1qeq7.fsf@agrajag.inprovide.com>
References: <1143625957.870353.299610@u72g2000cwu.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: individual.net EfvNNftMqmVLksJmABpWMApE2qJ0DLtx8nQlbUtNKVtRCvwreX
User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.15 (Security Through Obscurity, linux)
Cancel-Lock: sha1:K2gqnnDa7DosW3SGyomr541BW4I=