Add a Makefile for MakeTable, and remove GHC.Num generated import
[ghc-base.git] / codepages / Makefile
diff --git a/codepages/Makefile b/codepages/Makefile
new file mode 100644 (file)
index 0000000..dab5cf5
--- /dev/null
@@ -0,0 +1,19 @@
+
+.PHONY: default
+default:
+       $(MAKE) getCodepages
+       $(MAKE) genTable
+
+.PHONY: getCodepages
+getCodepages:
+       rm -rf www.unicode.org
+       rm -rf CPs
+       mkdir CPs
+       wget -r -np http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/
+       find www.unicode.org -name 'CP*' -exec cp {} CPs \;
+
+.PHONY: genTable
+genTable:
+       ghc --make MakeTable
+       ./MakeTable GHC.IO.Encoding.CodePage.Table ../GHC/IO/Encoding/CodePage/Table.hs CPs/*
+