Path: utzoo!attcan!uunet!wuarchive!emory!hubcap!grimlok From: grimlok@hubcap.clemson.edu (Mike Percy) Newsgroups: comp.lang.c Subject: Re: C + Make Message-ID: <10442@hubcap.clemson.edu> Date: 12 Sep 90 16:49:05 GMT References: <852.26ed037c@iccgcc.decnet.ab.com> Organization: Clemson University, Clemson, SC Lines: 53 [This doesn't really belong in this group but...] If you want to make your makefile reflect the include heirarchy try what I do. Given some files like: [NOTE: I use TurboC++ and the make and touch provided with it. Your milage may be different.] File test.c #include "a.h" #include "b.h" main() { printf("testing"); } File a.h #include "c.h" File a.h #include "d.h" #include File c.h #define test1 1 File d.h #define test2 2 I use a makefile like: test.exe : test.obj tcc test.obj test.obj : test.c a.h b.h tcc -c test.c a.h : c.h touch a.h b.h : d.h \tc\include\stdio.h touch b.h This does have the side effect of perhaps changing the time stamps on a,h and b.h when their contents haven't changed, but I don't mind that. You might leave off the touch commands...I'm not sure how that would work. "I don't know about your brain, but mine is really...bossy." Mike Percy grimlok@hubcap.clemson.edu ISD, Clemson University mspercy@clemson.BITNET (803)656-3780 mspercy@clemson.clemson.edu