delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/28/03:12:33

Date: Tue, 28 May 1996 10:00:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Rain Ouellet <wildfire AT artifax DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: More Make Woes
In-Reply-To: <4obpig$obj@atlas.uniserve.com>
Message-Id: <Pine.SUN.3.91.960528094820.11160C-100000@is>
Mime-Version: 1.0

On Mon, 27 May 1996, Rain Ouellet wrote:

> ..c.obj:
>    $(CC) -c $<

Somebody has already told you that you need to use TABs as the first 
character of the command in the rules.  But this Makefile has two other 
problems that could haunt you down the line:

	1) You assume that the object file is called .obj by default.  
This isn't so with DJGPP which uses .o.  If you *must* call it .obj, use 
an explicit -o switch to $(CC).  (However, be warned that this way, you 
defeat most of the built-in rules that GNU Make already knows about, 
because it doesn't know about .obj).

	2) The implicit rule has one dot too much.  You should write thus:

	.c.obj:

>  Okay, great.  What separator is missing?  Maybe I'm missing something
> obvious, but I'll be hanged if I can figure out, even from the
> so-called "documentation", what's going wrong.

What's wrong with the Make on-line docs?  Did you read it?  The chapter
called ``Rule Introduction (What a Rule Looks Like)'' in there
specifically warns you to be sure to put a TAB character at the beginning
of every command. 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019