From 19c1bbbdd1fbb865fc48224a4b3e1f1e6297d2f4 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 20 Feb 2012 18:37:08 +0100 Subject: g-ir-doc-tool: Change the -o option to receive a directory --- giscanner/docmain.py | 4 +++- tests/doctool/Makefile.am | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/giscanner/docmain.py b/giscanner/docmain.py index e3ef4ae4..1ca92a14 100644 --- a/giscanner/docmain.py +++ b/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") diff --git a/tests/doctool/Makefile.am b/tests/doctool/Makefile.am index 5bb84a65..0bac1f7f 100644 --- a/tests/doctool/Makefile.am +++ b/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 -- cgit v1.2.1