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/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to