This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix 'make' header dependency generation
authorDavid Mitchell <davem@iabyn.com>
Wed, 10 Sep 2014 13:10:06 +0000 (14:10 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 10 Sep 2014 13:10:06 +0000 (14:10 +0100)
'make depend' was being run before build-time generated headers
were created (with generate_uudmap). This meant that the 'cc -E' which the
dependency analysis ran would fail for some source files, since it
couldn't find some of the headers. It would thus fail to find any further
dependencies for that file after that point.

In particular, globals.o wasn't being marked as dependent on opcode.h,
even though opcode.h contains the definitions of some global vars.

The fix is simple. Make the 'depend' target depend on $(generated_headers).

Makefile.SH

index 4488f4a..6a2c6ce 100755 (executable)
@@ -1368,7 +1368,7 @@ done
 $spitshell >>$Makefile <<'!NO!SUBS!'
 
 .PHONY: depend
-depend: makedepend $(DTRACE_H)
+depend: makedepend $(DTRACE_H) $(generated_headers)
        sh ./makedepend MAKE="$(MAKE)" cflags
 
 .PHONY: test check test_prep test_prep_nodll test_prep_pre \