Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3F14D8B3.5020502@hsa.com.au> Date: Wed, 16 Jul 2003 14:46:43 +1000 From: Andrew Jacka User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: RE: Makefile *** missing separator Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit >> I have a question about gnumake under cygwin... >> I am getting an error "*** missing separator" compliling using a >> home-baked makefile. > > I believe "separator" in makefiles equals the TAB character. > > a) Ensure that you type them at apropriate positions ($ info make) > b) Ensure that your editor *keeps* them where you typed them > (i.e. do not use notepad - or similar tools) > >/Hannu E K Nevalainen, B.Sc. EE - Micro Computer Systems, 59~14'N, >17~12'E > <=> degree Hi, Just to confirm... This isn't anything to do with tab characters. That was the first thing I checked (mentioned in the original post). I have done some more digging... Here is the line where the missing separator message comes up. ---------------------------------------------------- $(LIB): $(LIB)($(OBJS)) $(OBJS) <----- ERROR REFERS TO THIS LINE $(CC) $(CFLAGS) -o $@ $(LDLIBS) $^ ---------------------------------------------------- It turns out that when the variable "LIB" is not defined, make is expanding it to be a single space character. On all other platforms that I have used this setup on, an undefined variable comes out as an empty string, and doesn't cause a problem since this expands to an empty rule. Whats more, the test "#ifdef..." comes back with TRUE in this case (should be FALSE). If I define $(LIB) to be empty earlier (ie using the line --------------- LIB := --------------- then it correctly expands the rule and #ifdef works properly. This only breaks down when LIB hasn't been defined... I mentioned in the original post that this exact setup works fine on Linux, FreeBSD, Solaris, SolarisX86 - Cygwin seems to be the only platform where this happens. Is this a known bug in the Cygwin variant of Make? Cheers, Andrew Jacka -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/