This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #130108) generate a dummy dtrace_main.o if perlmain.o doesn't contain probes
[perl5.git] / ext / XS-APItest / Makefile.PL
index d46fa64..24078a6 100644 (file)
@@ -59,7 +59,8 @@ sub MY::postamble
 DTRACE_D = ../../perldtrace.d
 
 dtrace\$(OBJ_EXT): \$(DTRACE_D) core\$(OBJ_EXT)
-       $Config{dtrace} -G -s \$(DTRACE_D) -o dtrace\$(OBJ_EXT) core\$(OBJ_EXT)
+       $Config{dtrace} -G -s \$(DTRACE_D) -o dtrace\$(OBJ_EXT) core\$(OBJ_EXT) || \\
+         ( \$(ECHO) >dtrace.c && \$(CCCMD) \$(CCCDLFLAGS) dtrace.c && rm -f dtrace.c )
 POSTAMBLE
 
     return $post;