diff --git a/.gitignore b/.gitignore
index 423fac8694787015c3f66ac8f08e9327c839facc..4fadeb693a38c87875b8f3125e3ec74374cc48d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
 
 cabal-dev/
 Cabal/dist/
+Cabal/tests/Setup
 cabal-install/dist/
 .hpc/
 *.hi
@@ -23,3 +24,7 @@ Cabal/GNUmakefile
 Cabal/dist-boot/
 Cabal/dist-install/
 Cabal/ghc.mk
+
+
+# TAGS files
+TAGS
diff --git a/Cabal/Distribution/Simple/GHC.hs b/Cabal/Distribution/Simple/GHC.hs
index 5f2926a8ccb07818f922a3bb496caca0c03fabf4..0ce335779559a73a7d40dfe8a0499bdde1927053 100644
--- a/Cabal/Distribution/Simple/GHC.hs
+++ b/Cabal/Distribution/Simple/GHC.hs
@@ -814,7 +814,9 @@ buildExe verbosity _pkg_descr lbi
 
   -- exeNameReal, the name that GHC really uses (with .exe on Windows)
   let exeNameReal = exeName' <.>
-                    (if null $ takeExtension exeName' then exeExtension else "")
+                    (if takeExtension exeName' /= ('.':exeExtension)
+                       then exeExtension
+                       else "")
 
   let targetDir = pref </> exeName'
   let exeDir    = targetDir </> (exeName' ++ "-tmp")
diff --git a/cabal-install/src/Main.hs b/cabal-install/src/Main.hs
index 3b9e0c3b875cb480d09ba89b4b9d58caef0dbfc2..6738fc32345780804ecf7171943606b15fed7338 100644
--- a/cabal-install/src/Main.hs
+++ b/cabal-install/src/Main.hs
@@ -135,6 +135,10 @@ mainWorker args = topHandler $
       putStr (help pname)
       putStr $ "\nYou can edit the cabal configuration file to set defaults:\n"
             ++ "  " ++ configFile ++ "\n"
+      exists <- doesFileExist configFile
+      when (not exists) $
+          putStrLn $ "This file will be generated with sensible "
+                  ++ "defaults if you run 'cabal update'."
     printOptionsList = putStr . unlines
     printErrors errs = die $ intercalate "\n" errs
     printNumericVersion = putStrLn $ display Paths_cabal_install.version
@@ -242,7 +246,7 @@ build :: Verbosity -> FilePath -> BuildFlags -> [String] -> IO ()
 build verbosity distPref buildFlags extraArgs =
     setupWrapper verbosity setupOptions Nothing
                  buildCommand (const buildFlags') extraArgs
-  where 
+  where
     setupOptions = defaultSetupScriptOptions { useDistPref = distPref }
     buildFlags' = buildFlags
         { buildVerbosity = toFlag verbosity