[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make doesn't understand wich files have been modified
From: |
Michael Ludwig |
Subject: |
Re: Make doesn't understand wich files have been modified |
Date: |
Fri, 25 Nov 2011 16:15:23 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
address@hidden schrieb am 25.11.2011 um 10:03 (+0100):
>
> When i modify an header file (.h) and then i compile the project, not
> all sorce (.c) files that include the modified header are re-compiled
> by make. I've no problems when i modify only the source .c files.
Do you specify the dependency of source files on header files?
| Since our source files now include header files, these new
| dependencies should be recorded in our makefile so that when
| a header file is modified, the corresponding object file will
| be updated.
|
| count_words: count_words.o counter.o lexer.o -lfl
| gcc $^ -o $@
http://www.makelinux.net/make3/make3-CHP-2-SECT-3
I'm a Make newbie, so I don't know - but there might be a way to have
make (or rather some other program invoked by make) scan C source files
to create Makefile snippets (includes) that translate the dependencies
of source files on header files into Makefile rules.
--
Michael Ludwig