Skip to content

boards generator: new option --allgen #4614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions tools/boards.txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,8 +1215,11 @@ def package ():
if packagegen:
pkgfname_read = pkgfname + '.orig'
# check if backup already exists
if not os.path.isfile(pkgfname_read):
os.rename(pkgfname, pkgfname_read)
if os.path.isfile(pkgfname_read):
print "package file is in the way, please move it"
print " %s" % pkgfname_read
sys.exit(1)
os.rename(pkgfname, pkgfname_read)

# read package file
with open (pkgfname_read, "r") as package_file:
Expand Down Expand Up @@ -1302,6 +1305,8 @@ def usage (name,ret):
print " --packagegen - replace board:[] in package"
print " --doc - shows doc/boards.rst"
print " --docgen - replace doc/boards.rst"
print " --allgen - generate and replace everything"
print " (useful for pushing on github)"
print ""

out = ""
Expand Down Expand Up @@ -1347,7 +1352,8 @@ def usage (name,ret):
try:
opts, args = getopt.getopt(sys.argv[1:], "h",
[ "help", "lwip=", "led=", "speed=", "board=", "customspeed=", "nofloat",
"ld", "ldgen", "boards", "boardsgen", "package", "packagegen", "doc", "docgen" ])
"ld", "ldgen", "boards", "boardsgen", "package", "packagegen", "doc", "docgen",
"allgen"] )
except getopt.GetoptError as err:
print str(err) # will print something like "option -a not recognized"
usage(sys.argv[0], 1)
Expand Down Expand Up @@ -1417,6 +1423,16 @@ def usage (name,ret):
docshow = True
docgen = True

elif o in ("--allgen"):
ldshow = True
ldgen = True
boardsshow = True
boardsgen = True
packageshow = True
packagegen = True
docshow = True
docgen = True

else:
assert False, "unhandled option"

Expand Down