summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDemi Obenour <demiobenour@gmail.com>2016-11-29 19:44:05 (GMT)
committerBen Gamari <ben@smart-cactus.org>2016-11-29 19:44:06 (GMT)
commit68450878b44ddb63beb3c589cd60d43461900986 (patch)
treeb92176cb2cd5a9c11d2342a65dd7db941a5a69bf
parentc2268ba0eeb36a48da77ba95c72525c398c8b306 (diff)
downloadghc-68450878b44ddb63beb3c589cd60d43461900986.zip
ghc-68450878b44ddb63beb3c589cd60d43461900986.tar.gz
ghc-68450878b44ddb63beb3c589cd60d43461900986.tar.bz2
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
-rw-r--r--compiler/nativeGen/PIC.hs2
-rw-r--r--driver/split/ghc-split.pl (renamed from driver/split/ghc-split.lprl)18
-rw-r--r--driver/split/ghc.mk2
-rw-r--r--rules/build-perl.mk10
-rw-r--r--utils/count_lines/count_lines.pl (renamed from utils/count_lines/count_lines.lprl)5
-rw-r--r--utils/count_lines/ghc.mk3
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
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
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))