mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1108294 - Use positional arguments; r=froydnj
There is only 1 caller to AccEventGen.py in the tree. We don't need optional arguments. Convert them to positional. Since the arguments are no longer optional, branches related to their presence have been removed. --HG-- extra : rebase_source : 35d51852dee031011ad9f079f3aba56b67948d7e
This commit is contained in:
parent
376ae3a5d5
commit
0fb6606df2
@ -198,15 +198,14 @@ def main():
|
||||
o = ArgumentParser()
|
||||
o.add_argument('-I', action='append', dest='incdirs', default=['.'],
|
||||
help="Directory to search for imported files")
|
||||
o.add_argument('-o', "--stub-output",
|
||||
dest='stub_output', default=None,
|
||||
help="C++ source output file", metavar="FILE")
|
||||
o.add_argument('--header-output', default=None,
|
||||
help="Quick stub header output file", metavar="FILE")
|
||||
o.add_argument('--makedepend-output', default=None,
|
||||
help="gnumake dependencies output file", metavar="FILE")
|
||||
o.add_argument('config',
|
||||
help='Config file to load')
|
||||
o.add_argument('header_output', metavar='FILE',
|
||||
help="Quick stub header output file")
|
||||
o.add_argument('stub_output', metavar='FILE',
|
||||
help="C++ source output file")
|
||||
o.add_argument('makedepend_output', metavar='FILE',
|
||||
help="gnumake dependencies output file")
|
||||
global options
|
||||
options = o.parse_args()
|
||||
|
||||
@ -216,15 +215,12 @@ def main():
|
||||
|
||||
conf = readConfigFile(options.config)
|
||||
|
||||
if options.stub_output:
|
||||
makeutils.targets.append(options.stub_output)
|
||||
with open(options.stub_output, 'w') as fh:
|
||||
print_cpp_file(fh, conf)
|
||||
if options.makedepend_output:
|
||||
makeutils.writeMakeDependOutput(options.makedepend_output)
|
||||
if options.header_output:
|
||||
with open(options.header_output, 'w') as fh:
|
||||
print_header_file(fh, conf)
|
||||
makeutils.targets.append(options.stub_output)
|
||||
with open(options.stub_output, 'w') as fh:
|
||||
print_cpp_file(fh, conf)
|
||||
makeutils.writeMakeDependOutput(options.makedepend_output)
|
||||
with open(options.header_output, 'w') as fh:
|
||||
print_header_file(fh, conf)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -19,10 +19,10 @@ xpcAccEvents.cpp: $(srcdir)/AccEvents.conf \
|
||||
-I$(LIBXUL_DIST)/sdk/bin \
|
||||
$(srcdir)/AccEventGen.py \
|
||||
-I $(DEPTH)/dist/idl \
|
||||
--header-output xpcAccEvents.h \
|
||||
--stub-output xpcAccEvents.cpp \
|
||||
--makedepend-output $(MDDEPDIR)/xpcAccEvents.pp \
|
||||
$(srcdir)/AccEvents.conf
|
||||
$(srcdir)/AccEvents.conf \
|
||||
xpcAccEvents.h \
|
||||
xpcAccEvents.cpp \
|
||||
$(MDDEPDIR)/xpcAccEvents.pp
|
||||
|
||||
xpcAccEvents.h: xpcAccEvents.cpp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user