[commit: ghc] wip/nfs-locking: No need to modify configure.ac any more. See https://phabricator.haskell.org/D1638 (5e7de75)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:24:23 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/5e7de75760b6b44eb7d9caaae3dc805c44bb6604/ghc

>---------------------------------------------------------------

commit 5e7de75760b6b44eb7d9caaae3dc805c44bb6604
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Dec 16 22:49:27 2015 +0000

    No need to modify configure.ac any more. See https://phabricator.haskell.org/D1638


>---------------------------------------------------------------

5e7de75760b6b44eb7d9caaae3dc805c44bb6604
 src/Rules/Config.hs | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/Rules/Config.hs b/src/Rules/Config.hs
index 4987fcc..bb4866d 100644
--- a/src/Rules/Config.hs
+++ b/src/Rules/Config.hs
@@ -2,11 +2,6 @@ module Rules.Config (configRules) where
 
 import Base
 
--- We add the following line to 'configure.ac' in order to produce configuration
--- file "system.config" from "system.config.in" by running 'configure' script.
-configCommand :: String
-configCommand = "AC_CONFIG_FILES([" ++ configPath ++ "system.config])"
-
 configRules :: Rules ()
 configRules = do
     configPath -/- "system.config" %> \_ -> do
@@ -14,16 +9,6 @@ configRules = do
         putBuild "Running configure..."
         cmd "bash configure" -- TODO: get rid of 'bash'
 
-    -- TODO: this rule won't rebuild if configure.ac is changed. Worth fixing?
     "configure" %> \_ -> do
-        -- Make sure 'configure.ac' script contains a line with configCommand
-        script <- fmap lines . liftIO $ readFile "configure.ac"
-        when (configCommand `notElem` script) $ do
-            putBuild $ "Adding '" ++ configCommand ++ "' to configure.ac..."
-            let (before, rest) = break ("AC_CONFIG_FILES" `isPrefixOf`) script
-            when (null rest) $ do
-                putError "No AC_CONFIG_FILES command in configure.ac!"
-            let newScript = unlines $ before ++ [configCommand] ++ rest
-            length newScript `seq` liftIO (writeFile "configure.ac" newScript)
         putBuild "Running autoconf..."
         cmd "bash autoconf" -- TODO: get rid of 'bash'



More information about the ghc-commits mailing list