tools/pas2c.hs
branchwebgl
changeset 7957 497ec84e0c21
parent 7953 97f41bdf0770
child 7961 620331af6b9a
--- a/tools/pas2c.hs	Sun Nov 04 02:13:25 2012 +0100
+++ b/tools/pas2c.hs	Sun Nov 04 02:35:17 2012 +0100
@@ -96,7 +96,6 @@
 
 pas2C :: String -> String -> String -> IO ()
 pas2C fn inputPath outputPath = do
-    setCurrentDirectory inputPath
     s <- flip execStateT initState $ f fn
     renderCFiles s outputPath
     where
@@ -110,7 +109,7 @@
             print ("Preprocessing '" ++ fileName ++ ".pas'... ")
             fc' <- liftIO
                 $ tryJust (guard . isDoesNotExistError)
-                $ preprocess (fileName ++ ".pas")
+                $ preprocess inputPath (fileName ++ ".pas")
             case fc' of
                 (Left a) -> do
                     modify (Map.insert fileName (System []))