Skip to content

Commit ee9be06

Browse files
gitsterEric Wong
authored andcommitted
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/[email protected] Signed-off-by: Eric Wong <[email protected]>
1 parent 98d5439 commit ee9be06

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,6 +2090,13 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
20902090
ifndef NO_PERL
20912091
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
20922092

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+
20932100
perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
20942101
$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
20952102

perl/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ MYMETA.yml
55
blib
66
blibdirs
77
pm_to_blib
8+
PM.stamp

perl/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ clean:
2020
$(RM) ppport.h
2121
$(RM) $(makfile)
2222
$(RM) $(makfile).old
23+
$(RM) PM.stamp
24+
25+
$(makfile): PM.stamp
2326

2427
ifdef NO_PERL_MAKEMAKER
2528
instdir_SQ = $(subst ','\'',$(prefix)/lib)

0 commit comments

Comments
 (0)