Skip to content

Commit 64c59ff

Browse files
committed
Remove Command WriteAutogenFiles
1 parent f711572 commit 64c59ff

File tree

7 files changed

+1
-295
lines changed

7 files changed

+1
-295
lines changed

Cabal/Distribution/Simple.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ defaultMainHelper hooks args = topHandler $
179179
\fs as -> configureAction hooks fs as >> return ()
180180
,buildCommand progs `commandAddAction` buildAction hooks
181181
,showBuildInfoCommand progs `commandAddAction` showBuildInfoAction hooks
182-
,writeAutogenFilesCommand progs `commandAddAction` writeAutogenFilesAction hooks
183182
,replCommand progs `commandAddAction` replAction hooks
184183
,installCommand `commandAddAction` installAction hooks
185184
,copyCommand `commandAddAction` copyAction hooks
@@ -286,13 +285,6 @@ showBuildInfoAction hooks flags args = do
286285

287286
postBuild hooks args flags' pkg_descr lbi'
288287

289-
writeAutogenFilesAction :: UserHooks -> WriteAutogenFilesFlags -> Args -> IO ()
290-
writeAutogenFilesAction hooks flags _ = do
291-
distPref <- findDistPrefOrDefault (wafDistPref flags)
292-
let verbosity = fromFlag $ wafVerbosity flags
293-
lbi <- getBuildConfig hooks verbosity distPref
294-
initialBuildSteps distPref (localPkgDescr lbi) lbi verbosity
295-
296288
replAction :: UserHooks -> ReplFlags -> Args -> IO ()
297289
replAction hooks flags args = do
298290
distPref <- findDistPrefOrDefault (replDistPref flags)

Cabal/Distribution/Simple/Build.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ module Distribution.Simple.Build (
2525
initialBuildSteps,
2626
createInternalPackageDB,
2727
componentInitialBuildSteps,
28-
writeAutogenFiles,
2928
) where
3029

3130
import Prelude ()

Cabal/Distribution/Simple/Setup.hs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ module Distribution.Simple.Setup (
4747
BuildFlags(..), emptyBuildFlags, defaultBuildFlags, buildCommand,
4848

4949
showBuildInfoCommand,
50-
writeAutogenFilesCommand,
51-
WriteAutogenFilesFlags(..),
5250
buildVerbose,
5351
ReplFlags(..), defaultReplFlags, replCommand,
5452
CleanFlags(..), emptyCleanFlags, defaultCleanFlags, cleanCommand,
@@ -2260,37 +2258,6 @@ showBuildInfoCommand progDb = CommandUI
22602258
++ buildOptions progDb showOrParseArgs
22612259
}
22622260

2263-
writeAutogenFilesCommand :: ProgramDb -> CommandUI WriteAutogenFilesFlags
2264-
writeAutogenFilesCommand progDb = CommandUI
2265-
{ commandName = "write-autogen-files"
2266-
, commandSynopsis = "Generate and write out the Paths_<pkg>.hs and cabal_macros.h files"
2267-
, commandDescription = Just $ \_ -> wrapText $
2268-
"Components encompass executables, tests, and benchmarks.\n"
2269-
++ "\n"
2270-
++ "Affected by configuration options, see `configure`.\n"
2271-
, commandNotes = Just $ \pname ->
2272-
"Examples:\n"
2273-
++ " " ++ pname ++ " write-autogen-files "
2274-
++ " All the components in the package\n"
2275-
++ " " ++ pname ++ " write-autogen-files foo "
2276-
++ " A component (i.e. lib, exe, test suite)\n\n"
2277-
++ programFlagsDescription progDb
2278-
, commandUsage = usageAlternatives "write-autogen-files" $
2279-
[ "[FLAGS]" ]
2280-
, commandDefaultFlags = WriteAutogenFilesFlags NoFlag (toFlag normal)
2281-
, commandOptions = \showOrParseArgs ->
2282-
[ optionVerbosity
2283-
wafVerbosity (\v flags -> flags { wafVerbosity = v })
2284-
2285-
, optionDistPref
2286-
wafDistPref (\d flags -> flags { wafDistPref = d }) showOrParseArgs
2287-
]
2288-
}
2289-
2290-
data WriteAutogenFilesFlags = WriteAutogenFilesFlags {
2291-
wafDistPref :: Flag FilePath,
2292-
wafVerbosity :: Flag Verbosity
2293-
} deriving Show
22942261
-- ------------------------------------------------------------
22952262
-- * Other Utils
22962263
-- ------------------------------------------------------------

cabal-install/Distribution/Client/CmdWriteAutogenFiles.hs

Lines changed: 0 additions & 220 deletions
This file was deleted.

cabal-install/Distribution/Client/Setup.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ module Distribution.Client.Setup
5656
, copyCommand
5757
, registerCommand
5858
, showBuildInfoCommand
59-
, writeAutogenFilesCommand, WriteAutogenFilesFlags(..)
6059
, parsePackageArgs
6160
, liftOptions
6261
, yesNoOpt
@@ -105,7 +104,6 @@ import Distribution.Simple.Setup
105104
, SDistFlags(..), HaddockFlags(..)
106105
, CleanFlags(..), DoctestFlags(..)
107106
, CopyFlags(..), RegisterFlags(..)
108-
, WriteAutogenFilesFlags(..)
109107
, readPackageDbList, showPackageDbList
110108
, Flag(..), toFlag, flagToMaybe, flagToList, maybeToFlag
111109
, BooleanFlag(..), optionVerbosity
@@ -199,7 +197,6 @@ globalCommand commands = CommandUI {
199197
, "haddock"
200198
, "hscolour"
201199
, "show-build-info"
202-
, "write-autogen-files"
203200
, "exec"
204201
, "new-build"
205202
, "new-configure"
@@ -287,7 +284,6 @@ globalCommand commands = CommandUI {
287284
, addCmd "report"
288285
, par
289286
, addCmd "show-build-info"
290-
, addCmd "write-autogen-files"
291287
, addCmd "freeze"
292288
, addCmd "gen-bounds"
293289
, addCmd "outdated"
@@ -2975,6 +2971,3 @@ showBuildInfoCommand = parent {
29752971
setSnd b (a,_) = (a,b)
29762972

29772973
parent = Cabal.showBuildInfoCommand defaultProgramDb
2978-
2979-
writeAutogenFilesCommand :: CommandUI WriteAutogenFilesFlags
2980-
writeAutogenFilesCommand = Cabal.writeAutogenFilesCommand defaultProgramDb

cabal-install/cabal-install.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ executable cabal
162162
Distribution.Client.CmdBuild
163163
Distribution.Client.CmdClean
164164
Distribution.Client.CmdShowBuildInfo
165-
Distribution.Client.CmdWriteAutogenFiles
166165
Distribution.Client.CmdConfigure
167166
Distribution.Client.CmdUpdate
168167
Distribution.Client.CmdErrorMessages

0 commit comments

Comments
 (0)