perl: detect new files in MakeMaker builds

While Makefile.PL now finds .pm files on its own, it does not detect new files after it generates perl/perl.mak. [ew: commit message, minor tweaks] ref: http://mid.gmane.org/7vlii51xz4.fsf@alter.siamese.dyndns.org Signed-off-by: Eric Wong <normalperson@yhbt.net>

Junio C Hamano committed Jul 27, 2012 at 20:04 UTC ee9be06770223238c6a22430eb874754dd22dfb0
3 files changed +11
Makefile
+7
@@ -2090,6 +2090,13 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
2090 ifndef NO_PERL
2091 $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
2092
2093 +perl/perl.mak: perl/PM.stamp
2094 +
2095 +perl/PM.stamp: FORCE
2096 + $(QUIET_GEN)find perl -type f -name '*.pm' | sort >$@+ && \
2097 + { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
2098 + $(RM) $@+
2099 +
2100 perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
2101 $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
2102
perl/.gitignore
+1
@@ -5,3 +5,4 @@ MYMETA.yml
5 blib
6 blibdirs
7 pm_to_blib
8 +PM.stamp
perl/Makefile
+3
@@ -20,6 +20,9 @@ clean:
20 $(RM) ppport.h
21 $(RM) $(makfile)
22 $(RM) $(makfile).old
23 + $(RM) PM.stamp
24 +
25 +$(makfile): PM.stamp
26
27 ifdef NO_PERL_MAKEMAKER
28 instdir_SQ = $(subst ','\'',$(prefix)/lib)