manpagez: man pages & more
info autoconf
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.4 Backslash-Newline Before Empty Lines

A bug in Bash 2.03 can cause problems if a Make rule contains a backslash-newline followed by line that expands to nothing. For example, on Solaris 8:

SHELL = /bin/bash
EMPTY =
foo:
	touch foo \
	$(EMPTY)

executes

/bin/bash -c 'touch foo \
'

which fails with a syntax error, due to the Bash bug. To avoid this problem, avoid nullable macros in the last line of a multiline command.

On some versions of HP-UX, make reads multiple newlines following a backslash, continuing to the next non-empty line. For example,

FOO = one \

BAR = two

test:
        : FOO is "$(FOO)"
        : BAR is "$(BAR)"

shows FOO equal to one BAR = two. Other implementations sensibly let a backslash continue only to the immediately following line.


This document was generated on April 26, 2012 using texi2html 5.0.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.