--- a/tools/pas2c.hs Sun Nov 04 02:35:17 2012 +0100
+++ b/tools/pas2c.hs Sun Nov 04 03:04:20 2012 +0100
@@ -94,8 +94,8 @@
docToLower :: Doc -> Doc
docToLower = text . map toLower . render
-pas2C :: String -> String -> String -> IO ()
-pas2C fn inputPath outputPath = do
+pas2C :: String -> String -> String -> String -> IO ()
+pas2C fn inputPath alternateInputPath outputPath = do
s <- flip execStateT initState $ f fn
renderCFiles s outputPath
where
@@ -109,7 +109,7 @@
print ("Preprocessing '" ++ fileName ++ ".pas'... ")
fc' <- liftIO
$ tryJust (guard . isDoesNotExistError)
- $ preprocess inputPath (fileName ++ ".pas")
+ $ preprocess inputPath alternateInputPath (fileName ++ ".pas")
case fc' of
(Left a) -> do
modify (Map.insert fileName (System []))
@@ -1087,4 +1087,5 @@
let programName = "hwengine"
let inputPath = "../hedgewars/"
let outputPath = "./"
- pas2C programName inputPath outputPath
+ let alternateInputPath = "./"
+ pas2C programName inputPath alternateInputPath outputPath