PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Makefile dependency problem


Your Ad Here

Your Ad Here

Lets say that I have source code file, foo.c, that directly includes header files a.h and b.h. Further, suppose a.h, include aa.h and similarly, b.h includes bb.h. I would like to set up a Makefile so that if aa.h or bb.h is modified, foo.c is compiled. However, I would like to do it by saying that foo.c depends upon a.h and b.h, and that a.h "depends" upon aa.h, and that b.h "depends" upon bb.h. Note that on the last two I put depends in since a.h and b.h don't really need to be updated.

Uptime Statistics 4895
Aragorn snips In my oldest machine (since repaired, then donated to the deserving poor), my ATI video board died an interesting rest. X did not work at all (it was probably working...

I would like to do something similar to:

foo.o: a.h b.h compile foo.c

Makefile dependency problem Ping JeanDavid
Roy Schestowitz Actually, IIRC, it got up to 106 days and some. First, Red Hat chose to...

a.h: aa.h do something

b.h: bb.h do something

Thus if bb.h is modified, foo.c gets recompiled. At the moment I can have the "do something" be "touch b.h" which will make foo.c get recompile. However, since b.h is not really changed, I would really not prefer not to force a time stamp change on the file in the manner.

Obvisously, I could also do something like

foo.o: a.h b.h aa.h bb.h

but suppose I have many other source files with similar dependencies. (Yes I know about makedepend but it puts in a lot of system file headers even with the -Y flag which I don't want in the file)

Uptime Statistics 4896
Well, that could be one of those 'urban myth' kinda things, but I for one would believe it. I've run Novell Netware on our fileserver for many years and Novell is the real deal...

So I'm looking for a way for a dependency to force another dependency without modifying the time-stamp of the file that occurs between the two.



Your Ad Here

List | Previous | Next

Makefile dependency problem Ping JeanDavid

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

Manual Fix 4892