bug-make
[Top][All Lists]
Advanced

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

Re: sh embedding


From: Paul Smith
Subject: Re: sh embedding
Date: Mon, 23 Jul 2012 15:14:56 -0400

On Mon, 2012-07-23 at 11:59 -0700, icegood wrote:
> .PHONEY: all
> all:
>         if [ \( "$$(ls *.lock 2>/dev/null)" == "" \) ]; then \
>     touch address@hidden; \
>     if [ \( ! -e $@ \) -o \( ../$(tag_fn) -nt $@ \) ]; then \
>       echo $@ done; \
>     else \
>       touch $@; \
>     fi; \
>     rm -f address@hidden; \
>   else \
>     sleep 1; \
>   fi;

The code as you've shown it looks fine to me (except you misspelled
".PHONY").  When I run it, it works as expected; no errors.

So obviously there's something different about your environment that you
haven't shown us.  For example, you don't show what the value of the
"tag_fn" variable is here.  If it contains special characters that could
explain it.  You probably want to quote it (along with all other
variables like $@, etc., just to be safe).

What does make print out to the screen when you run the makefile?  If
you examine that carefully you should be able to see the problem; that's
what make sends to the shell and the shell is the one that's
complaining.




reply via email to

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