| View previous topic :: View next topic |
| Author |
Message |
Horacius ReX Guest
|
Posted: Sat Nov 15, 2008 10:44 am Post subject: Makefile to detect files whose content is changed |
|
|
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 |
|
| |
|
Back to top |
Joachim Schmitz Guest
|
Posted: Sat Nov 15, 2008 4:58 pm Post subject: Re: Makefile to detect files whose content is changed |
|
|
Horacius ReX wrote:
| Quote: | 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
|
How do you send the files across? If you just copy them (e.g. via NFS, ftp,
scp), then of course you update the on the target. Use a backup utility to
back them up into an archive file on CA, transfer the backup file to CB and
restore from it there. Chekc the manuel of that backup program on how to
retain timestamps (so do this by default, others need to be told)
Bye, Jojo |
|
| |
|
Back to top |
John Hasler Guest
|
Posted: Sat Nov 15, 2008 8:15 pm Post subject: Re: Makefile to detect files whose content is changed |
|
|
Horacius ReX writes:
| Quote: | 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.
|
Use rsync or unison to synchonize the files on the two machines. That
will preserve the timestamps, transfer only the altered files, and
eliminate the manual packing and copying. You might also want to look at
distcc.
| Quote: | ...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.
|
Why are you copying over all the files when you are changing only some?
| Quote: | ...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.
|
Then either your IDE (which you do not identify) is buggy or you are not
using it correctly.
You may also want to consider using a network file system.
--
John Hasler
john@dhh.gt.org
Dancing Horse Hill
Elmwood, WI USA |
|
| |
|
Back to top |
Maxwell Lol Guest
|
Posted: Sat Nov 15, 2008 10:38 pm Post subject: Re: Makefile to detect files whose content is changed |
|
|
John Hasler <john@dhh.gt.org> writes:
| Quote: | Horacius ReX writes:
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.
Use rsync or unison to synchonize the files on the two machines. That
will preserve the timestamps, transfer only the altered files, and
eliminate the manual packing and copying. You might also want to look at
distcc.
|
Or you can use a cvs or svn server.
Worst case you can copy all of the files over, and upack them into a
temporary directory.
Compare each to it's mate, and if the new file is different, copy it into the
parallel directory. |
|
| |
|
Back to top |
|