Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
d94ece75
Commit
d94ece75
authored
8 years ago
by
Stuart Popejoy
Committed by
Edward Z. Yang
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implement CURRENT_PACKAGE_VERSION macro
parent
ca00c82e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Cabal/Distribution/Simple/Build/Macros.hs
+8
-1
8 additions, 1 deletion
Cabal/Distribution/Simple/Build/Macros.hs
Cabal/changelog
+1
-0
1 addition, 0 deletions
Cabal/changelog
with
9 additions
and
1 deletion
Cabal/Distribution/Simple/Build/Macros.hs
+
8
−
1
View file @
d94ece75
...
...
@@ -75,7 +75,8 @@ generate pkg_descr lbi clbi =
generatePackageVersionMacros
(
package
pkg_descr
:
map
snd
(
componentPackageDeps
clbi
))
++
generateToolVersionMacros
(
configuredPrograms
.
withPrograms
$
lbi
)
++
generateComponentIdMacro
lbi
clbi
generateComponentIdMacro
lbi
clbi
++
generateCurrentPackageVersion
pkg_descr
-- | Helper function that generates just the @VERSION_pkg@ and @MIN_VERSION_pkg@
-- macros for a list of package ids (usually used with the specific deps of
...
...
@@ -134,6 +135,12 @@ generateComponentIdMacro _lbi clbi =
,
ifndefDefineStr
"CURRENT_COMPONENT_ID"
(
display
(
componentComponentId
clbi
))
]
-- | Generate the @CURRENT_PACKAGE_VERSION@ definition for the declared version
-- of the current package.
generateCurrentPackageVersion
::
PackageDescription
->
String
generateCurrentPackageVersion
pd
=
ifndefDefineStr
"CURRENT_PACKAGE_VERSION"
(
display
(
pkgVersion
(
package
pd
)))
fixchar
::
Char
->
Char
fixchar
'-'
=
'_'
fixchar
c
=
c
This diff is collapsed.
Click to expand it.
Cabal/changelog
+
1
−
0
View file @
d94ece75
-*-change-log-*-
1.25.x.x (current development version)
* Add CURRENT_PACKAGE_VERSION to cabal_macros.h (#4319)
* Dropped support for versions of GHC earlier than 6.12 (#3111).
* GHC compatibility window for the Cabal library has been extended
to five years (#3838).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment