Please keep the conversation on the mailing list, and we prefer it if you don't top-post. Thanks!
On Mon, 2011-01-10 at 15:36 -0800, samantha domville wrote: > I tried putting that line in my makefile and it doesn't seem to create > a list that I need (probably operator error). > > Here is what I am currently doing: > > in my include directory I have a bunch of .h files. > >ls include/* > a.h > b.h > c.h > > Then, in a makefile I typed a list of identical filenames except I > changed the extension Why did you change the extension? > makefile: > ############################### > HEADER = a.hh > HEADER += b.hh > HEADER += c.hh > > #and there is this for loop later that uses this list: > @for f in $(HEADER) ; do echo "HOWDY!" ; done > ################################## > > I was hoping to use whatever headers are in the include directory > instead of trying to remember to modify this makefile. > When I try to compile, the C source files which include the .hh files > can't find the header (.hh). Is there a way to do this? Hm. I don't understand what you want to do. You have a bunch of .h files, and you have some C source files which include some .hh files. That is not related to make variables; your compiler cannot see make variables while it's compiling. You have to either change your code to include .h files, or else write some make rules to create .hh files. That would involve some kind of copy command or something. It can't be done entirely inside make with just variables, since the compiler needs to actually find the other-named files in your directory. Someone or something has to create those files. _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
