Makefile to detect files whose content is changed

14/11/2008 - 18:03 von Horacius ReX | Report spam
Hi,

I am writing a program with several files in C in a computer A (CA).
Each time I modify some of the files, I pack all of them in a
program.tgz files and send it to another computer where I compile it
(computer B, CB. Now I wrote on CB a Makefile, but I realized that
each time I modify things on CA and send the files to CB , it detects
or marks all files as changed, although this is not the case for all
of them.

Do you know a possible workaround for this problem ?

Of course I could send from CA to CB only the modified files and it
would solve the problem. But I do not know how to do this. I mean,
when I modify the relative files on my IDE I just do "save all", so
all of them are "modified" even if they content does not change.

Thanks in advance
 

Lesen sie die antworten

#1 Josef Moellers
17/11/2008 - 08:53 | Warnen spam
Horacius ReX wrote:
Hi,

I am writing a program with several files in C in a computer A (CA).
Each time I modify some of the files, I pack all of them in a
program.tgz files and send it to another computer where I compile it
(computer B, CB. Now I wrote on CB a Makefile, but I realized that
each time I modify things on CA and send the files to CB , it detects
or marks all files as changed, although this is not the case for all
of them.

Do you know a possible workaround for this problem ?

Of course I could send from CA to CB only the modified files and it
would solve the problem. But I do not know how to do this. I mean,
when I modify the relative files on my IDE I just do "save all", so
all of them are "modified" even if they content does not change.



Unless someone knows an option to tar or cpio to reset these times on
the build system, you might want to take a look at the utimes(2) call.

These are my personal views and not those of Fujitsu Siemens Computers!
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html

Ähnliche fragen