summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2014-12-25 15:44:14 +0100
committerYves Orton <demerphq@gmail.com>2014-12-25 16:39:03 +0100
commit19bf1007743b4337230ad3a4538df4bd94311fc4 (patch)
treedf082ff37ef5b4712b5de719fea3206c145d01b8
parent1d43193d5d388c2cc55fe51bcb525be40cd80688 (diff)
downloadperl-19bf1007743b4337230ad3a4538df4bd94311fc4.tar.gz
automatically sort the MANIFEST if necessary
Instead of harrasing people to sort the manifest in our tests, we can just automatically sort the manifest when it changes. That way the tests are actually testing that the auto-sort worked, and not that our devs put the new file in the right place.
-rw-r--r--.gitignore3
-rwxr-xr-xMakefile.SH10
2 files changed, 12 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index acd0fc1f95..96cd2fad57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -163,6 +163,9 @@ veryclean.sh
U
MANIFEST.new
+# this is used to auto-sort the MANIFEST
+MANIFEST.srt
+
# ignore editor droppings
*.swp
*~
diff --git a/Makefile.SH b/Makefile.SH
index 076bfc3a60..674efb157d 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -311,6 +311,9 @@ PATH_SEP = $p_
MINIPERL_EXE = miniperl\$(EXE_EXT)
MINIPERL = \$(LDLIBPTH) ./miniperl\$(EXE_EXT) -Ilib
+# Macros to invoke sort the MANIFEST during build
+MANIFEST_SRT = MANIFEST.srt
+
!GROK!THIS!
case "$usecrosscompile$perl" in
@@ -563,10 +566,15 @@ splintfiles = $(c1)
@echo `$(CCCMDSRC)` -S $*.c
@`$(CCCMDSRC)` -S $*.c
-all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
+all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
@echo " ";
@echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
+$(MANIFEST_SRT): MANIFEST
+ @perl Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
+ perl Porting/manisort -q -o MANIFEST; sh -c true)
+ @touch $(MANIFEST_SRT)
+
.PHONY: all utilities
# Both git_version.h and lib/Config_git.pl are built