Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hdlmake
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Hdlmake
Commits
6e9d70f8
Commit
6e9d70f8
authored
11 years ago
by
Paweł Szostek
Browse files
Options
Downloads
Patches
Plain Diff
__main__.py: change option parser to argument parser
parent
b06fb51e
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/__main__.py
+27
-24
27 additions, 24 deletions
src/__main__.py
with
27 additions
and
24 deletions
src/__main__.py
+
27
−
24
View file @
6e9d70f8
...
...
@@ -9,7 +9,7 @@
import
os
from
connection
import
Connection
import
global_mod
import
opt
parse
import
arg
parse
import
logging
from
module_pool
import
ModulePool
from
env
import
Env
...
...
@@ -21,72 +21,75 @@ except:
def
main
():
usage
=
"
usage:
%
prog [options]
\n
"
usage
+=
"
type
%
prog --help to get help message
"
usage
=
"
usage: prog [options]
\n
"
usage
+=
"
type prog --help to get help message
"
parser
=
opt
parse
.
Option
Parser
(
usage
=
usage
)
parser
=
arg
parse
.
Argument
Parser
(
usage
=
usage
)
parser
.
add_
option
(
"
--manifest-help
"
,
action
=
"
store_true
"
,
parser
.
add_
argument
(
"
--manifest-help
"
,
action
=
"
store_true
"
,
dest
=
"
manifest_help
"
,
help
=
"
print manifest file variables description
"
)
parser
.
add_option
(
"
--make-sim
"
,
dest
=
"
make_sim
"
,
action
=
"
store_true
"
,
parser
.
add_argument
(
"
--check-env
"
,
action
=
"
store_true
"
,
dest
=
"
check_env
"
,
default
=
False
,
help
=
"
check environment for HDLMAKE-related settings
"
)
parser
.
add_argument
(
"
--make-sim
"
,
dest
=
"
make_sim
"
,
action
=
"
store_true
"
,
default
=
None
,
help
=
"
generate a simulation Makefile
"
)
parser
.
add_
option
(
"
--make-fetch
"
,
dest
=
"
make_fetch
"
,
action
=
"
store_true
"
,
parser
.
add_
argument
(
"
--make-fetch
"
,
dest
=
"
make_fetch
"
,
action
=
"
store_true
"
,
default
=
None
,
help
=
"
generate a makefile for modules
'
fetching
"
)
parser
.
add_
option
(
"
--make-ise
"
,
dest
=
"
make_ise
"
,
action
=
"
store_true
"
,
parser
.
add_
argument
(
"
--make-ise
"
,
dest
=
"
make_ise
"
,
action
=
"
store_true
"
,
default
=
None
,
help
=
"
generate a makefile for local ISE synthesis
"
)
parser
.
add_
option
(
"
--make-remote
"
,
dest
=
"
make_remote
"
,
action
=
"
store_true
"
,
parser
.
add_
argument
(
"
--make-remote
"
,
dest
=
"
make_remote
"
,
action
=
"
store_true
"
,
default
=
None
,
help
=
"
generate a makefile for remote synthesis
"
)
parser
.
add_
option
(
"
-f
"
,
"
--fetch
"
,
action
=
"
store_true
"
,
dest
=
"
fetch
"
,
parser
.
add_
argument
(
"
-f
"
,
"
--fetch
"
,
action
=
"
store_true
"
,
dest
=
"
fetch
"
,
default
=
None
,
help
=
"
fetch and/or update remote modules listed in Manifest
"
)
parser
.
add_
option
(
"
--clean
"
,
action
=
"
store_true
"
,
dest
=
"
clean
"
,
parser
.
add_
argument
(
"
--clean
"
,
action
=
"
store_true
"
,
dest
=
"
clean
"
,
default
=
None
,
help
=
"
remove all modules fetched for this one
"
)
parser
.
add_
option
(
"
--list
"
,
action
=
"
store_true
"
,
dest
=
"
list
"
,
parser
.
add_
argument
(
"
--list
"
,
action
=
"
store_true
"
,
dest
=
"
list
"
,
default
=
None
,
help
=
"
List all modules together with their files
"
)
parser
.
add_
option
(
"
--list-files
"
,
action
=
"
store_true
"
,
dest
=
"
list_files
"
,
parser
.
add_
argument
(
"
--list-files
"
,
action
=
"
store_true
"
,
dest
=
"
list_files
"
,
default
=
None
,
help
=
"
List all files in a from of a space-separated string
"
)
parser
.
add_
option
(
"
--merge-cores=name
"
,
default
=
None
,
dest
=
"
merge_cores
"
,
parser
.
add_
argument
(
"
--merge-cores=name
"
,
default
=
None
,
dest
=
"
merge_cores
"
,
help
=
"
Merges entire synthesizable content of an project into a pair of VHDL/Verilog files
"
)
parser
.
add_
option
(
"
--ise-proj
"
,
action
=
"
store_true
"
,
dest
=
"
ise_proj
"
,
parser
.
add_
argument
(
"
--ise-proj
"
,
action
=
"
store_true
"
,
dest
=
"
ise_proj
"
,
default
=
None
,
help
=
"
create/update an ise project including list of project
"
"
files
"
)
parser
.
add_
option
(
"
--quartus-proj
"
,
action
=
"
store_true
"
,
dest
=
"
quartus_proj
"
,
parser
.
add_
argument
(
"
--quartus-proj
"
,
action
=
"
store_true
"
,
dest
=
"
quartus_proj
"
,
default
=
None
,
help
=
"
create/update a quartus project including list of project
"
"
files
"
)
parser
.
add_
option
(
"
-l
"
,
"
--synthesize-locally
"
,
dest
=
"
local
"
,
parser
.
add_
argument
(
"
-l
"
,
"
--synthesize-locally
"
,
dest
=
"
local
"
,
default
=
None
,
action
=
"
store_true
"
,
help
=
"
perform a local synthesis
"
)
parser
.
add_
option
(
"
-r
"
,
"
--synthesize-remotelly
"
,
dest
=
"
remote
"
,
parser
.
add_
argument
(
"
-r
"
,
"
--synthesize-remotelly
"
,
dest
=
"
remote
"
,
default
=
None
,
action
=
"
store_true
"
,
help
=
"
perform a remote synthesis
"
)
parser
.
add_
option
(
"
--synth-server
"
,
dest
=
"
synth_server
"
,
parser
.
add_
argument
(
"
--synth-server
"
,
dest
=
"
synth_server
"
,
default
=
None
,
help
=
"
use given SERVER for remote synthesis
"
,
metavar
=
"
SERVER
"
)
parser
.
add_
option
(
"
--synth-user
"
,
dest
=
"
synth_user
"
,
parser
.
add_
argument
(
"
--synth-user
"
,
dest
=
"
synth_user
"
,
default
=
None
,
help
=
"
use given USER for remote synthesis
"
,
metavar
=
"
USER
"
)
parser
.
add_
option
(
"
--py
"
,
dest
=
"
arbitrary_code
"
,
parser
.
add_
argument
(
"
--py
"
,
dest
=
"
arbitrary_code
"
,
default
=
""
,
help
=
"
add arbitrary code to all manifests
'
evaluation
"
)
parser
.
add_
option
(
"
--log
"
,
dest
=
"
log
"
,
parser
.
add_
argument
(
"
--log
"
,
dest
=
"
log
"
,
default
=
"
info
"
,
help
=
"
set logging level (one of debug, info, warning, error, critical
"
)
parser
.
add_
option
(
"
--version
"
,
dest
=
"
print_version
"
,
action
=
"
store_true
"
,
parser
.
add_
argument
(
"
--version
"
,
dest
=
"
print_version
"
,
action
=
"
store_true
"
,
default
=
"
false
"
,
help
=
"
print version id of this Hdlmake build
"
)
(
options
,
_
)
=
parser
.
parse_args
()
options
=
parser
.
parse_args
()
# Setting global variable (global_mod.py)
global_mod
.
options
=
options
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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