How to keep the archive involatile if the members are involatile?

Pan ruochen panruochen@gmail.com
Wed Jul 8 04:03:00 GMT 2009


Hi All:

$cat Makefile
all:
	gcc -c 1.c 2.c
	ar rcs $$(date +%Y%m%d_%H%M%S).a 1.o 2.o
1. o and 2.o are not changed on each building since the source file
1.c and 2.c are not changed.
But the output archive is changed every time.

And I try in another way.
$cat Makefile
all:
	ar rcs $$(date +%Y%m%d_%H%M%S).a 1.txt 2.txt
The output archive are kept unchanged. (1.txt and 2.txt are two normal
text files.)
So I think there is some option for ar to keep the archive unchanged
if the members are not changed.
But I can't find it in the manual.

Best Regards
PRC
Jul 8, 2009



More information about the Binutils mailing list