Skip to content
Browse files

g-ir-doc-tool: Change the -o option to receive a directory

  • Loading branch information...
1 parent ad5c6ab commit 19c1bbbdd1fbb865fc48224a4b3e1f1e6297d2f4 @tomeuv tomeuv committed Feb 20, 2012
Showing with 5 additions and 3 deletions.
  1. +3 −1 giscanner/docmain.py
  2. +2 −2 tests/doctool/Makefile.am
View
4 giscanner/docmain.py
@@ -29,7 +29,7 @@ def doc_main(args):
parser.add_option("-o", "--output",
action="store", dest="output",
- help="Filename to write output")
+ help="Directory to write output to")
parser.add_option("-l", "--language",
action="store", dest="language",
default="Python",
@@ -38,6 +38,8 @@ def doc_main(args):
options, args = parser.parse_args(args)
if not options.output:
raise SystemExit("missing output parameter")
+ if not os.path.isdir(options.output):
+ raise SystemExit("wrong output parameter: %s", options.output)
if len(args) < 2:
raise SystemExit("Need an input GIR filename")
View
4 tests/doctool/Makefile.am
@@ -12,10 +12,10 @@ EXTRA_DIST = $(EXPECTED_MALLARD_DIRS)
cp ../../$*.gir .
%-C: %.gir
- mkdir $*-C ; rm $*-C/*.page ; $(INTROSPECTION_DOCTOOL) --language C $*.gir -o $*-C/index.page && echo " GEN $*-C/index.page"
+ mkdir $*-C ; rm $*-C/*.page ; $(INTROSPECTION_DOCTOOL) --language C $*.gir -o $*-C/ && echo " GEN $*-C/index.page"
%-Python: %.gir
- mkdir $*-Python ; rm $*-Python/*.page ; $(INTROSPECTION_DOCTOOL) --language Python $*.gir -o $*-Python/index.page && echo " GEN $*-Python/index.page"
+ mkdir $*-Python ; rm $*-Python/*.page ; $(INTROSPECTION_DOCTOOL) --language Python $*.gir -o $*-Python/ && echo " GEN $*-Python/index.page"
%-C.page.check: %-C
@diff -u -U 10 $(srcdir)/$*-C-expected $*-C && echo " TEST $*-C" && rm -rf $*-C

0 comments on commit 19c1bbb

Please sign in to comment.
Something went wrong with that request. Please try again.