delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/27/17:16:45

Date: Wed, 27 Jan 1999 14:01:15 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Ya'qub" <rick AT nct-active DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: How to force make to recompile?
In-Reply-To: <36aee665.0@nnrp1.news.uk.psi.net>
Message-ID: <Pine.SUN.3.91.990127135834.10495C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Wed, 27 Jan 1999, Ya'qub wrote:

>     Compilation in my makefile depends on several switches that I define in
> the makefile. However, if I decde to edit the makefile and add a new switch,
> when I run make it says that the executable is up to date. How can I force
> make to rebuild everything since now there is a new set of compilation
> switches that I want?

The simplest (and the most correct) way is to make all important targets 
of the Makefile be dependent on the Makefile itself.

Another possibility is to invoke Make with the `-W' switch, so it 
``thinks'' that some file has changed.  For example, if all of your files 
include a header called `foo.h', "make -W foo.h" will recompile and 
relink everything.

- Raw text -


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