Re: *.patch files with subdirectories under ${CONTRIBDIR}

看板DFBSD_kernel作者時間21年前 (2004/11/22 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/5 (看更多)
On Mon, Nov 22, 2004 at 12:26:31AM +0900, YONETANI Tomokazu wrote: > This still creates ${.OBJDIR}/foo/foo.c and ${.OBJDIR}/foo.o and > add foo/foo.o to OBJS, so linkage fails unless you can fix (A). I found the reason for (a) I think. What do you think of Index: sys.mk =================================================================== RCS file: /home/joerg/wd/repository/dragonflybsd/src/share/mk/sys.mk,v retrieving revision 1.12 diff -u -r1.12 sys.mk --- sys.mk 19 Jul 2004 16:24:27 -0000 1.12 +++ sys.mk 21 Nov 2004 16:03:39 -0000 @@ -136,7 +136,7 @@ # DOUBLE SUFFIX RULES .c.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.IMPSRC} .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} @@ -183,13 +183,13 @@ ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} .c.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.IMPSRC} .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} .cc.o .cpp.o .cxx.o .C.o: - ${CXX} ${CXXFLAGS} -c ${.IMPSRC} + ${CXX} ${CXXFLAGS} -c -o ${.TARGET} ${.IMPSRC} .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} The rest of the build rules have to be fixed too. > Do you like this patch? This creates ${.OBJDIR}/foo,foo.c from > ${CONTRIBDIR}/foo/foo.c and foo,foo.c.patch , and appends foo,foo.c > to SRCS, which is consistent with the current bsd.{lib,hostprog,prog}.mk . > It won't create directory under ${.OBJDIR} anymore, but it's not a problem, > since the only instance of '*,*.patch' is in gnu/usr.bin/cc34/cc_prep, > but it doesn't use bsd.dep.mk and rolls its own, so this change won't > break anything yet. The reason why I wanted to do this was, that patching header files in subdirectories needs the subdirectories to exist. The handling in cc_prep can be updated to the normal code (with the fix for no_obj), it is a left over from the old code. Joerg
文章代碼(AID): #11eDVs00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #11eDVs00 (DFBSD_kernel)