help-make
[Top][All Lists]
Advanced

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

Re: Makefile Includes Remake ? / files .d dependencies


From: Günter Neiß
Subject: Re: Makefile Includes Remake ? / files .d dependencies
Date: Mon, 12 Feb 2001 08:28:53 +0100

Peter Biechele schrieb:
> 
> Hello !
> 
> I have two problems, which I could not solve with the help of the manual
> (although, I am pretty sure there is something in there, but i did not
> understand).
> 
> (first of all: all my questions are about C programs)
Doesn't make any difference (here).
 

> 1) I have used an implicit rule for producing %.d files from .c files like
> described in the GNU Make manual. This works fine, but it ALWAYS produces .d
> files, although I have changed only ONE c-file. Does it have to be this way,
> or can I avoid producing all .d files ??
> By the way I am using "vpath %d DEPENDDIR" and "vpath %c .......", so make is
> able to find the .d files to check if they have to be remade.
Without the Makefile that's had to say.
I sugest that there is a mistake in the prerequisite for the .d files.
In my Makefiles it works as expected (only the .d files that has to be
remade, are remade.
But for a better way of doing 'dependency file generation' take a look
at: 
        http://www.paulandlesley.org/gmake/
Here Paul D. Smith describes a better way of doing it (very good).

> 2) I have split up the makefile into one main Makefile and 5 included
> MAkefiles to seperate settings for paths, flags, etc. in seperate files. Now
> I want to make sure, if someone changes ONE of the Makefiles, I want to
> remake everything ! This means I would like to call "make realclean" and then
> "make all", if one of the Makefiles have changed !! (This is because, if
> someone changes a define I have to recompile everything).
> Is there an easy solution ???
Easy: Just put the makefiles itself into a prerequisite:
$(OBJS): Makefile1 Makefile2 ...

Now if someone changes a Makefile all .o will be remade.

> Thank you very much for any help !
> 
> Best Regards
> Peter Biechele, Germany

 Greetings

   Guenter Neiss
   Schoenhofer Sales and Engeniering GmbH (SSE)
   address@hidden

Attachment: smime.p7s
Description: Kryptographische Unterschrift mit S/MIME


reply via email to

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