Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
3fb85c95
Commit
3fb85c95
authored
Mar 19, 2016
by
Mikhail Glushenkov
Browse files
Merge pull request #3235 from erikd/master
Add current pkg info to generated `cabal_macros.h` file
parents
9198e618
cc63fbf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Cabal/Distribution/Simple/Build/Macros.hs
View file @
3fb85c95
...
...
@@ -29,7 +29,7 @@ import Distribution.Package
import
Distribution.Version
(
Version
(
versionBranch
)
)
import
Distribution.PackageDescription
(
PackageDescription
)
(
PackageDescription
(
package
)
)
import
Distribution.Simple.LocalBuildInfo
(
LocalBuildInfo
(
withPrograms
),
externalPackageDeps
,
localComponentId
,
localCompatPackageKey
)
...
...
@@ -47,9 +47,10 @@ import Distribution.Text
-- | The contents of the @cabal_macros.h@ for the given configured package.
--
generate
::
PackageDescription
->
LocalBuildInfo
->
String
generate
_
pkg_descr
lbi
=
generate
pkg_descr
lbi
=
"/* DO NOT EDIT: This file is automatically generated by Cabal */
\n\n
"
++
generatePackageVersionMacros
(
map
snd
(
externalPackageDeps
lbi
))
++
generatePackageVersionMacros
(
package
pkg_descr
:
map
snd
(
externalPackageDeps
lbi
))
++
generateToolVersionMacros
(
configuredPrograms
.
withPrograms
$
lbi
)
++
generateComponentIdMacro
lbi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment