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
--
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make