help-make
[Top][All Lists]
Advanced

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

Re: More details: "Unexpected end of file" on Solaris 8


From: Paul D. Smith
Subject: Re: More details: "Unexpected end of file" on Solaris 8
Date: Fri, 18 Jul 2003 09:59:23 -0400

%% Andrei Lenkei <address@hidden> writes:

  al> As some kind souls correctly pointed out; I should have appended the 
  al> rule and/or the output of "make -n" at least as soon as I sent the 
  al> e-mail. Sorry for that.

I have two thoughts:

  al> clean:
  al>     @dirlist="$(SRC1) $(INCLUDE1) $(SRC2) $(INCLUDE2) $(SRC3) 
  al> $(INCLUDE3)" ; \
  al>     for dir in $$dirlist ; \

First, if $dirlist is nothing but whitespace some versions of Bourne
shell will not work properly.  Having an empty list is not legal syntax
in a for loop in many versions of sh.

  al>     do \
  al>         $(RM) $$dir/*pure_* $$dir/#* ##dir/,* $$dir/*~ ; \

Second, you must have a typo above; you write "##dir/,*"; maybe you mean
"$$dir/,*"?  Also you have "#" in other places.

If you want to use "#" in the command line you need to escape it,
because otherwise some versions of Bourne shell will treat it like a
comment.  Since this entire loop is really one line, a comment in the
middle will cause the shell to ignore the rest of the line, so it would
look like:

  for dir in $dirlist ; do rm $dir/*pure_* $dir/

which is not a legal shell command.

Try adding backslashes before the # characters, and/or quoting the
strings like "$$dir/#*".

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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