diff --git a/Makefile.am b/Makefile.am index d1884fe8..ba6cf846 100644 --- a/Makefile.am +++ b/Makefile.am @@ -200,24 +200,26 @@ endif if DTRACE_NEEDS_OBJECTS libuv_la_SOURCES += src/unix/uv-dtrace.d libuv_la_DEPENDENCIES = src/unix/uv-dtrace.o -libuv_la_LIBADD = src/unix/uv-dtrace.lo +libuv_la_LIBADD = uv-dtrace.lo CLEANFILES += src/unix/uv-dtrace.o src/unix/uv-dtrace.lo endif SUFFIXES = .d include/uv-dtrace.h: src/unix/uv-dtrace.d - $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -h -xnolibs -s $< -o $@ + $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -h -xnolibs -s $< -o $(top_srcdir)/$@ src/unix/uv-dtrace.o: src/unix/uv-dtrace.d ${libuv_la_OBJECTS} +# It's ok to specify the output here, because we have 1 .d file, and we process +# every created .o, most projects don't need to include more than one .d .d.o: - $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -G -o $@ -s $< \ + $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -G -o $(top_builddir)/uv-dtrace.o -s $< \ `grep '^pic_object' ${top_builddir}/*.lo | cut -f 2 -d\'` $(AM_V_GEN)printf %s\\n \ - '# $(patsubst %.o, %.lo, $@) - a libtool object file' \ + '# ${top_builddir}/uv-dtrace.lo - a libtool object file' \ '# Generated by libtool (GNU libtool) 2.4' \ '# libtool wants a .lo not a .o' \ "pic_object='uv-dtrace.o'" \ "non_pic_object='uv-dtrace.o'" \ - > $(patsubst %.o, %.lo, $@) + > ${top_builddir}/uv-dtrace.lo