Purge GHC of literate Perl
authorDemi Obenour <demiobenour@gmail.com>
Tue, 29 Nov 2016 19:44:05 +0000 (14:44 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 29 Nov 2016 19:44:06 +0000 (14:44 -0500)
Test Plan: GHC CI

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: snowleopard, thomie

Maniphest Tasks: T74

Differential Revision: https://phabricator.haskell.org/D2732

compiler/nativeGen/PIC.hs
driver/split/ghc-split.pl [moved from driver/split/ghc-split.lprl with 97% similarity]
driver/split/ghc.mk
rules/build-perl.mk
utils/count_lines/count_lines.pl [moved from utils/count_lines/count_lines.lprl with 98% similarity]
utils/count_lines/ghc.mk

index 1a76728..2529f91 100644 (file)
@@ -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
similarity index 97%
rename from driver/split/ghc-split.lprl
rename to driver/split/ghc-split.pl
index dd12a8a..1ddc079 100644 (file)
@@ -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}
-
index 20b244d..9d34a59 100644 (file)
@@ -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
index 58660fc..6bec7d9 100644 (file)
@@ -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 $$$$@)/.
similarity index 98%
rename from utils/count_lines/count_lines.lprl
rename to utils/count_lines/count_lines.pl
index 49b11ee..a54f163 100644 (file)
@@ -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}
-
index 4f3f43e..5fec518 100644 (file)
@@ -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))