[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
archive members - a HUGE confusion
From: |
Payal |
Subject: |
archive members - a HUGE confusion |
Date: |
Sat, 8 May 2010 04:25:36 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi all,
I am trying to figure how archives are handled in make and have boiled
down to this short Makefile.
$ cat Makefile2
libfashion.a : libfashion(ready.o)
@ranlib $@
libfashion.a(ready.o) : ready.o
ar rv libfashion.a $^
$ make -f Makefile2
cc -c -o ready.o ready.c
ar rv libfashion ready.o
ar: creating libfashion
a - ready.o
ranlib: 'libfashion.a': No such file
make: *** [libfashion.a] Error 1
Why is ar trying to make libfashion when I told it EXPLICTLY to make
libfashion.a?
Strangely, when I remove first 2 lines, ar behaves correctly like below.
$ cat Makefile2
libfashion.a(ready.o) : ready.o
ar rv libfashion.a $^
$ make -f Makefile2
cc -c -o ready.o ready.c
ar rv libfashion.a ready.o
ar: creating libfashion.a
a - ready.o
I have already spend 2 hrs on this. Can someone please help?
Thanks a lot in advance.
With warm regards,
-Payal
--
- archive members - a HUGE confusion,
Payal <=