Problem with FreeBSD 10.0-RELEASE change in "make" behavior

看板FB_questions作者時間11年前 (2014/06/07 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
I have a Makefile which builds a library, which used to work using FreeBSD make but which fails using the default make installed in FreeBSD 10.0-RELEASE. It appears that library dependancy line which correctly causes out of date .o files to be re-created, will not always cause the commands following it to be executed. eg. using the following Makefile: make # This correctly builds the .c, .o & library files touch x.c # update x.o so the library needs updating make # This updates x.o, but does not update the library Is this change in how make works intended ? - and if so how should I be making a library now ? Thanks -- Dave Hines. ---------------------- Test Makefile follows ---------------------- # Test Makefile which works with old FreeBSD make, but fails # with the make installed by default in FreeBSD 10.0-RELEASE # Demonstrate using "make; touch x.c; make", and note that although # x.o is updated by the second "make", none of the commands following # the library dependancy are executed, so the libray itself is not # updated. OBJ= x.o y.o LIB= lib.a $(LIB): $(LIB)($(OBJ)) ar cru $(.TARGET) $(.OODATE) $(RANLIB) $(.TARGET) rm -f $(.OODATE) $(OBJ:.o=.c): touch $(.TARGET) clean: rm -f $(LIB) $(OBJ) $(OBJ:.o=.c) _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1JaW7V0q (FB_questions)