[commit: ghc] master: Purge GHC of literate Perl (6845087)

git at git.haskell.org git at git.haskell.org
Tue Nov 29 21:37:57 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/68450878b44ddb63beb3c589cd60d43461900986/ghc

>---------------------------------------------------------------

commit 68450878b44ddb63beb3c589cd60d43461900986
Author: Demi Obenour <demiobenour at gmail.com>
Date:   Tue Nov 29 14:44:05 2016 -0500

    Purge GHC of literate Perl
    
    Test Plan: GHC CI
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: snowleopard, thomie
    
    Maniphest Tasks: T74
    
    Differential Revision: https://phabricator.haskell.org/D2732


>---------------------------------------------------------------

68450878b44ddb63beb3c589cd60d43461900986
 compiler/nativeGen/PIC.hs                              |  2 +-
 driver/split/{ghc-split.lprl => ghc-split.pl}          | 18 ++++++++----------
 driver/split/ghc.mk                                    |  2 +-
 rules/build-perl.mk                                    | 10 ++++------
 utils/count_lines/{count_lines.lprl => count_lines.pl} |  5 -----
 utils/count_lines/ghc.mk                               |  3 +--
 6 files changed, 15 insertions(+), 25 deletions(-)

diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
index 1a76728..2529f91 100644
--- a/compiler/nativeGen/PIC.hs
+++ b/compiler/nativeGen/PIC.hs
@@ -560,7 +560,7 @@ pprGotDeclaration _ _ _
 -- and one for non-PIC.
 --
 -- Whenever you change something in this assembler output, make sure
--- the splitter in driver/split/ghc-split.lprl recognizes the new output
+-- the splitter in driver/split/ghc-split.pl recognizes the new output
 
 pprImportedSymbol :: DynFlags -> Platform -> CLabel -> SDoc
 pprImportedSymbol dflags platform@(Platform { platformArch = ArchPPC, platformOS = OSDarwin }) importedLbl
diff --git a/driver/split/ghc-split.lprl b/driver/split/ghc-split.pl
similarity index 97%
rename from driver/split/ghc-split.lprl
rename to driver/split/ghc-split.pl
index dd12a8a..1ddc079 100644
--- a/driver/split/ghc-split.lprl
+++ b/driver/split/ghc-split.pl
@@ -1,10 +1,9 @@
-%************************************************************************
-%*                                                                      *
-\section[Driver-obj-splitting]{Splitting into many \tr{.o} files (for libraries)}
-%*                                                                      *
-%************************************************************************
+#************************************************************************
+#*                                                                      *
+#* \section[Driver-obj-splitting]{Splitting into many \tr{.o} files (for libraries)}
+#*                                                                      *
+#************************************************************************
 
-\begin{code}
 $TargetPlatform = $TARGETPLATFORM;
 
 ($Pgm = $0) =~ s|.*/||;
@@ -209,13 +208,14 @@ sub ReadTMPIUpToAMarker {
     $str =~ tr/\r//d if $TargetPlatform =~ /-mingw32$/m; # in case Perl doesn't convert line endings
     $str;
 }
-\end{code}
+=pod
 
 We must (a)~strip the marker off the block, (b)~record any literal C
 constants that are defined here, and (c)~inject copies of any C constants
 that are used-but-not-defined here.
 
-\begin{code}
+=cut
+
 sub process_asm_block {
     local($str) = @_;
 
@@ -430,5 +430,3 @@ sub tidy_up_and_die {
     print STDERR $msg;
     exit (($return_val == 0) ? 0 : 1);
 }
-\end{code}
-
diff --git a/driver/split/ghc.mk b/driver/split/ghc.mk
index 20b244d..9d34a59 100644
--- a/driver/split/ghc.mk
+++ b/driver/split/ghc.mk
@@ -10,7 +10,7 @@
 #
 # -----------------------------------------------------------------------------
 
-driver/split_PERL_SRC  = ghc-split.lprl
+driver/split_PERL_SRC  = ghc-split.pl
 driver/split_dist_PROGNAME = ghc-split
 driver/split_dist_TOPDIR = YES
 driver/split_dist_INSTALL = YES
diff --git a/rules/build-perl.mk b/rules/build-perl.mk
index 58660fc..6bec7d9 100644
--- a/rules/build-perl.mk
+++ b/rules/build-perl.mk
@@ -13,7 +13,7 @@
 
 # Build a perl script.  Invoke like this:
 #
-# driver/mangler_PERL_SRC = ghc-asm.lprl
+# driver/mangler_PERL_SRC = ghc-asm.pl
 # driver/mangler_dist_PROGNAME = ghc-asm
 #
 # $(eval $(call build-perl,driver/mangler,dist))
@@ -50,14 +50,12 @@ $(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE))
 clean_$1 : clean_$1_$2
 
 ifneq "$$(BINDIST)" "YES"
-$1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$$$(unlit_INPLACE) | $$$$(dir $$$$@)/.
-	"$$(unlit_INPLACE)" $$(UNLIT_OPTS) $$< $$@
 
-$1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl
+$1/$2/$$($1_$2_PROG): $1/$$/$$($1_PERL_SRC) $$$$(unlit_INPLACE) | $$$$(dir $$$$@)/.
 	$$(call removeFiles,$$@)
 	echo '#!$$(PERL)'                                  >> $$@
-	echo '$$$$TARGETPLATFORM  = "$$(TARGETPLATFORM)";' >> $$@
-	echo '$$$$TABLES_NEXT_TO_CODE  = "$(GhcEnableTablesNextToCode)";' >> $$@
+	echo 'my $$$$TARGETPLATFORM  = "$$(TARGETPLATFORM)";' >> $$@
+	echo 'my $$$$TABLES_NEXT_TO_CODE  = "$(GhcEnableTablesNextToCode)";' >> $$@
 	cat $$<                                            >> $$@
 
 $$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) | $$$$(dir $$$$@)/.
diff --git a/utils/count_lines/count_lines.lprl b/utils/count_lines/count_lines.pl
similarity index 98%
rename from utils/count_lines/count_lines.lprl
rename to utils/count_lines/count_lines.pl
index 49b11ee..a54f163 100644
--- a/utils/count_lines/count_lines.lprl
+++ b/utils/count_lines/count_lines.pl
@@ -1,7 +1,5 @@
 #!/usr/bin/env perl
 
-\begin{code}
-
 use FindBin;
 
 %DirCount = ();
@@ -69,6 +67,3 @@ foreach $m (sort (keys %ModCount)) {
     $totcmts += $ModComments{$m};
 }
 printf "\n%-20s %6d %6d\n", 'TOTAL:', $tot, $totcmts;
-
-\end{code}
-
diff --git a/utils/count_lines/ghc.mk b/utils/count_lines/ghc.mk
index 4f3f43e..5fec518 100644
--- a/utils/count_lines/ghc.mk
+++ b/utils/count_lines/ghc.mk
@@ -1,5 +1,4 @@
-
-utils/count_lines_PERL_SRC  = count_lines.lprl
+utils/count_lines_PERL_SRC  = count_lines.pl
 utils/count_lines_dist_PROGNAME = count_lines
 
 $(eval $(call build-perl,utils/count_lines,dist))



More information about the ghc-commits mailing list