[vox-tech] Make question: headers depending on other headers

ME vox-tech@lists.lugod.org
Wed, 31 Mar 2004 15:14:36 -0800 (PST)


I would expect that a choice to do such a thing in a makefile makes little
sense to most users who would use it. Few people would ever modify the
header files at all. Testing of the header files would likely be done by
the developers.

Making a makefile option for "debug:" which includes deps for the heads
you are actually altering as well as -ggdb (etc) for debugging for
developers.

I generally have separate projects which test my own custom header files
separate from the project which is using them. Then, there is no need to
check the headers files for modification since they should not be modified
if they were properly tested. (Test the custom classes/headers extensively
so that projects relying upon them don't have weird surprises... the idea
of ensuring your foundations are solid before trying to build upon them.)

I'd like to see what others say about this though.

-ME


Bill Kendrick said:
>
> I have some source files that depend on some other sources' headers.
>
> In turn, some of THOSE headers depend on other headers (e.g., a header
> defining a structure might depend on another header that defines some
> other
> structures).
>
> Is it useful to list these 'dependencies' within the Makefile?
>
> For example, consider foo.c:
>
>   /* foo.c
>      I do foo things */
>
>   #include "foo.h"  /* My header */
>   #include "bar.h"  /* bar.c's header, so I can get to its function(s)
> and/or
>                        typedefs... */
>
>   ...
>
>
> In Makefile, I'd do:
>
>   foo.o:  foo.c foo.h bar.h
>           ...compile foo.c into foo.o...
>
>
> However, say in "bar.h", I have:
>
>
>   /* bar.h
>      I do things with alcohol (get it? "bar?" hahaha...) */
>
>   #include "bar.h"  /* My header */
>   #include "zzz.h"  /* Contains some #define's for compile-time options */
>
>   ...
>
>
> Should I make "bar.h" depend on "zzz.h"?  Or "foo.o" depend on it?  Or...?
>
>
> I just want to make sure that in case I touch something somewhere, that
> everybody who needs to get update GETS updated.
>
> Thx!
>
> -bill!
> bill@newbreedsoftware.com              Have you visited the Linux Users'
> Group
> http://newbreedsoftware.com/bill/        of Davis yet!?
> http://www.lugod.org/
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>
>