Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
dc19b5f9
Commit
dc19b5f9
authored
Apr 15, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use cabal package version as fallback when repo is missing
parent
ecee8b33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
src/Job.hs
+10
-2
sv2v.cabal
+1
-0
No files found.
src/Job.hs
View file @
dc19b5f9
...
...
@@ -8,7 +8,9 @@
module
Job
where
import
GitHash
(
giDescribe
,
tGitInfoCwd
)
import
Data.Version
(
showVersion
)
import
GitHash
(
giDescribe
,
tGitInfoCwdTry
)
import
qualified
Paths_sv2v
(
version
)
import
System.IO
(
stderr
,
hPutStr
)
import
System.Console.CmdArgs
import
System.Environment
(
getArgs
,
withArgs
)
...
...
@@ -40,6 +42,12 @@ data Job = Job
,
write
::
Write
}
deriving
(
Show
,
Typeable
,
Data
)
version
::
String
version
=
case
$$
tGitInfoCwdTry
of
Left
_
->
showVersion
Paths_sv2v
.
version
Right
info
->
giDescribe
info
defaultJob
::
Job
defaultJob
=
Job
{
files
=
def
&=
args
&=
typ
"FILES"
...
...
@@ -61,7 +69,7 @@ defaultJob = Job
++
" create a .v file next to each input"
)
}
&=
program
"sv2v"
&=
summary
(
"sv2v "
++
giDescribe
$$
tGitInfoCwd
)
&=
summary
(
"sv2v "
++
version
)
&=
details
[
"sv2v converts SystemVerilog to Verilog."
,
"More info: https://github.com/zachjs/sv2v"
,
"(C) 2019-2021 Zachary Snow, 2011-2015 Tom Hawkins"
]
...
...
sv2v.cabal
View file @
dc19b5f9
...
...
@@ -104,6 +104,7 @@ executable sv2v
Convert.Wildcard
-- sv2v CLI modules
Job
Paths_sv2v
ghc-options:
-O3
-threaded
...
...
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