bug-make
[Top][All Lists]
Advanced

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

[bug #41983] $(file) function crashes make


From: Paul D. Smith
Subject: [bug #41983] $(file) function crashes make
Date: Tue, 08 Apr 2014 22:03:01 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36

Follow-up Comment #4, bug #41983 (project make):

Thanks Tim.  Technically according to the docs it's not legal to call file
without an argument; in other words, you should be running $(file >>4touch,)
(note the comma) instead.  However, to be clear this will add a newline to the
file in all cases, which I suppose could be unwanted.

Obviously dumping core is not an appropriate response to a makefile error as
well :-)

If we keep the currently documented requirement, then the right fix is to
change the minimum number of arguments this function takes to 2, in which case
your use will fail with:  *** insufficient number of arguments (1) to function
'file'.  Stop.

Alternatively we could accept a single argument and make that do something,
and change the documentation.  For $(file >x) it's clear that would create and
truncate file "x" and "x" would be empty (rather than contain a newline).  I
guess for $(file >>x) it would create the file "x" if it didn't exist, and do
nothing if it did exist.  Does that seem useful?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41983>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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