[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing environment variables in reciepes
From: |
David Boyce |
Subject: |
Re: Passing environment variables in reciepes |
Date: |
Wed, 8 Dec 2010 07:52:51 -0500 |
On Wed, Dec 8, 2010 at 7:23 AM, Greg Chicares <address@hidden> wrote:
> I'd change the makefile:
>
> - fi
> - @echo ${message}, $${message}, $message, $$message, eval $$message
> + fi; \
> + echo ${message}, $${message}, $message, $$message, eval $$message
Though it doesn't matter in this case, using ";" to join lines is a
bad and way-too-common pattern because it breaks basic make semantics.
Normally in the case
target:
line 1
line 2
make will fail if line 1 fails. Joining lines with ";" will change
that (unless you're using 3.82+ and running in POSIX mode). It's
almost always preferable to join lines with "&&". Consider
clean:
cd $(TMP_DIR) ;\
rm -rf *
-David Boyce