On Mon, 2012-07-23 at 11:59 -0700, icegood wrote: > .PHONEY: all > all: > if [ \( "$$(ls *.lock 2>/dev/null)" == "" \) ]; then \ > touch $@.lock; \ > if [ \( ! -e $@ \) -o \( ../$(tag_fn) -nt $@ \) ]; then \ > echo $@ done; \ > else \ > touch $@; \ > fi; \ > rm -f $@.lock; \ > 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. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make