mirror of
https://github.com/libuv/libuv
synced 2025-03-28 21:13:16 +00:00
build: hide dtrace rules unless needed
When using configure, there are situations where libuv will attempt to build uv-dtrace.h, even if it is configured with --disable-dtrace. For example, if libuv is first configured with dtrace enabled, then built, the .deps files will contain references to include/uv-dtrace.h. After a make clean and configure --disable-dtrace, the build will still attempt to create include/uv-dtrace.h and fail. make will see the dependency reference (which survives the make clean), use the rule (which is always added to the Makefile), and fail since DTRACE is not defined. This commit protects the rules to make uv-dtrace.h with the proper conditionals to ensure the rules are not written if --disable-dtrace is chosen. Fix #963.
This commit is contained in:
parent
6c063317b7
commit
f44f8124e0
@ -272,10 +272,13 @@ pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = @PACKAGE_NAME@.pc
|
||||
endif
|
||||
|
||||
SUFFIXES = .d
|
||||
|
||||
if HAVE_DTRACE
|
||||
include/uv-dtrace.h: src/unix/uv-dtrace.d
|
||||
$(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -h -xnolibs -s $< -o $(top_srcdir)/$@
|
||||
endif
|
||||
|
||||
if DTRACE_NEEDS_OBJECTS
|
||||
SUFFIXES = .d
|
||||
|
||||
src/unix/uv-dtrace.o: src/unix/uv-dtrace.d ${libuv_la_OBJECTS}
|
||||
|
||||
@ -291,3 +294,4 @@ src/unix/uv-dtrace.o: src/unix/uv-dtrace.d ${libuv_la_OBJECTS}
|
||||
"pic_object='uv-dtrace.o'" \
|
||||
"non_pic_object='uv-dtrace.o'" \
|
||||
> ${top_builddir}/uv-dtrace.lo
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user