help-make
[Top][All Lists]
Advanced

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

Re: Help copying & renaming file names


From: Paul Smith
Subject: Re: Help copying & renaming file names
Date: Mon, 10 Jan 2011 18:49:23 -0500

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.





reply via email to

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