I know one way to get around the problem, not very good, but! During my chain of rules I have all : proj proj : proj+bb proj+bb : proj+bb+topic proj+bb+topic : $(src+proj+bb+topic:.c=.o) %.o : %.c compile $< create dependencies $< archive $@
At the "proj+bb :" target I could do the commands there for archiving in a loop. By the time that command fires all .o's will have been created. But why should I put them in there every time. They only need to be put in when something changes. The most obvious place would be where/when I compile. But that puts me back to the problem of multiple processes accessing the .a at the same time. Not using -j is not an option. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of PATTON, BILLY (SBCSI) > Sent: Thursday, May 18, 2006 7:48 AM > To: [email protected] > Subject: serial vs parallel for ar > > > I'm trying to add files to a .a file. As long as I don't run > make with > -j it runs ok. But when I run with the -j I get the following error > messages: > ar: > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li > b/libinfgn > .a not in archive format > make: *** > [/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/g > ipasswd.o] > Error 1 > make: *** Waiting for unfinished jobs.... > ar: > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li > b/libinfgn > .a not in archive format > make: *** > [/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/c > ryptut.o] > Error 1 > ar: > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li > b/libinfgn > .a not in archive format > make: *** > [/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/giconv.o] > Error 1 > ar: > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li > b/libinfgn > .a not in archive format > make: *** > [/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/extfsh.o] > Error 1 > ar: > /makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/li > b/libinfgn > .a not in archive format > make: *** > [/makefile_test/dev/bp1497/test/v0608/PRODUCT_TREE/ldb/infgn/gifile.o] > Error 1 > > It is probably the fact that several processes are trying to > access this > .a at the same time. > What can I do? > > > _______________________________________________ > Help-make mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-make > _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
