Remove deprecated old-args feature.
This commit is contained in:
parent
99873775ba
commit
63f9dcb640
6 changed files with 2 additions and 24 deletions
|
|
@ -104,14 +104,6 @@ dependencies.
|
||||||
output message. This makes it easier to figure out
|
output message. This makes it easier to figure out
|
||||||
which sub-instance of redo is doing what.
|
which sub-instance of redo is doing what.
|
||||||
|
|
||||||
--old-args
|
|
||||||
: old versions of redo provided different definitions of
|
|
||||||
the $1 and $2 parameters to .do scripts. The new
|
|
||||||
version is compatible with djb's original
|
|
||||||
specification. This option goes back to the old
|
|
||||||
definitions so you can use .do scripts you haven't yet
|
|
||||||
converted to the new style.
|
|
||||||
|
|
||||||
|
|
||||||
# DISCUSSION
|
# DISCUSSION
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,10 +141,6 @@ class BuildJob:
|
||||||
close_on_exec(ffd, True)
|
close_on_exec(ffd, True)
|
||||||
self.f = os.fdopen(ffd, 'w+')
|
self.f = os.fdopen(ffd, 'w+')
|
||||||
# this will run in the dofile's directory, so use only basenames here
|
# this will run in the dofile's directory, so use only basenames here
|
||||||
if vars.OLD_ARGS:
|
|
||||||
arg1 = basename # target name (no extension)
|
|
||||||
arg2 = ext # extension (if any), including leading dot
|
|
||||||
else:
|
|
||||||
arg1 = basename + ext # target name (including extension)
|
arg1 = basename + ext # target name (including extension)
|
||||||
arg2 = basename # target name (without extension)
|
arg2 = basename # target name (without extension)
|
||||||
argv = ['sh', '-e',
|
argv = ['sh', '-e',
|
||||||
|
|
|
||||||
3
redo.py
3
redo.py
|
|
@ -15,7 +15,6 @@ shuffle randomize the build order to find dependency bugs
|
||||||
debug-locks print messages about file locking (useful for debugging)
|
debug-locks print messages about file locking (useful for debugging)
|
||||||
debug-pids print process ids as part of log messages (useful for debugging)
|
debug-pids print process ids as part of log messages (useful for debugging)
|
||||||
version print the current version and exit
|
version print the current version and exit
|
||||||
old-args use old-style definitions of $1,$2,$3 (deprecated)
|
|
||||||
"""
|
"""
|
||||||
o = options.Options(optspec)
|
o = options.Options(optspec)
|
||||||
(opt, flags, extra) = o.parse(sys.argv[1:])
|
(opt, flags, extra) = o.parse(sys.argv[1:])
|
||||||
|
|
@ -40,8 +39,6 @@ if opt.debug_locks:
|
||||||
os.environ['REDO_DEBUG_LOCKS'] = '1'
|
os.environ['REDO_DEBUG_LOCKS'] = '1'
|
||||||
if opt.debug_pids:
|
if opt.debug_pids:
|
||||||
os.environ['REDO_DEBUG_PIDS'] = '1'
|
os.environ['REDO_DEBUG_PIDS'] = '1'
|
||||||
if opt.old_args:
|
|
||||||
os.environ['REDO_OLD_ARGS'] = '1'
|
|
||||||
|
|
||||||
import vars_init
|
import vars_init
|
||||||
vars_init.init(targets)
|
vars_init.init(targets)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
redo test.args test2.args passfailtest
|
redo test.args test2.args passfailtest
|
||||||
. ../skip-if-minimal-do.sh
|
. ../skip-if-minimal-do.sh
|
||||||
redo --old-args test.oldargs
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
# Note: this test expects to be run with 'redo --old-args' or it will fail.
|
|
||||||
. ../skip-if-minimal-do.sh
|
|
||||||
[ "$1" = "test" ]
|
|
||||||
[ "$2" = ".oldargs" ]
|
|
||||||
[ "$3" != "test.oldargs" ]
|
|
||||||
1
vars.py
1
vars.py
|
|
@ -13,7 +13,6 @@ DEPTH = os.environ.get('REDO_DEPTH', '')
|
||||||
DEBUG = atoi(os.environ.get('REDO_DEBUG', ''))
|
DEBUG = atoi(os.environ.get('REDO_DEBUG', ''))
|
||||||
DEBUG_LOCKS = os.environ.get('REDO_DEBUG_LOCKS', '') and 1 or 0
|
DEBUG_LOCKS = os.environ.get('REDO_DEBUG_LOCKS', '') and 1 or 0
|
||||||
DEBUG_PIDS = os.environ.get('REDO_DEBUG_PIDS', '') and 1 or 0
|
DEBUG_PIDS = os.environ.get('REDO_DEBUG_PIDS', '') and 1 or 0
|
||||||
OLD_ARGS = os.environ.get('REDO_OLD_ARGS', '') and 1 or 0
|
|
||||||
VERBOSE = os.environ.get('REDO_VERBOSE', '') and 1 or 0
|
VERBOSE = os.environ.get('REDO_VERBOSE', '') and 1 or 0
|
||||||
XTRACE = os.environ.get('REDO_XTRACE', '') and 1 or 0
|
XTRACE = os.environ.get('REDO_XTRACE', '') and 1 or 0
|
||||||
KEEP_GOING = os.environ.get('REDO_KEEP_GOING', '') and 1 or 0
|
KEEP_GOING = os.environ.get('REDO_KEEP_GOING', '') and 1 or 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue