summaryrefslogtreecommitdiff
path: root/gtkdoc-mkhtml.in
diff options
context:
space:
mode:
authorStefan Kost <stefkost@src.gnome.org>2009-01-23 08:02:04 +0000
committerStefan Kost <stefkost@src.gnome.org>2009-01-23 08:02:04 +0000
commit2b6a529c923ff2aebd3ec7a90bc9ec028bf505c6 (patch)
tree28ba021d00ce2d6200d16db158d510a0a5e83383 /gtkdoc-mkhtml.in
parent4db55a3212f6b66bf8c27e8783125cfda48553ff (diff)
downloadgtk-doc-2b6a529c923ff2aebd3ec7a90bc9ec028bf505c6.tar.gz
patch by: David Nečas <yeti@physics.muni.cz>
* gtkdoc-mkhtml.in: * gtkdoc-mkman.in: * tests/gtk-doc.make: * tests/gtk-doc.notmpl.make: Less quirky way of knowing that we run uninstalled, which is only needed for the tests anyway. In addition to the patch, make same changes in mkman, add a shift to arg parsing to not loop and change the makefiles for the tests. Fixes #568702. svn path=/trunk/; revision=655
Diffstat (limited to 'gtkdoc-mkhtml.in')
-rw-r--r--gtkdoc-mkhtml.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtkdoc-mkhtml.in b/gtkdoc-mkhtml.in
index 6dbe76f..4612aaf 100644
--- a/gtkdoc-mkhtml.in
+++ b/gtkdoc-mkhtml.in
@@ -9,10 +9,12 @@ Usage: gtkdoc-mkhtml [--path=SEARCH_PATH] MODULE DRIVER_FILE [BACKEND_OPTIONS...
# parse options, ignore unknown options for future extensions
searchpath=
+uninstalled=no
while true; do
case "X$1" in
X--version) echo "@VERSION@"; exit 0;;
X--help) echo "$usage"; exit 0;;
+ X--uninstalled) uninstalled=yes; shift;;
X--path=*) searchpath=`echo $1 | sed s/.*=//`; shift;;
X--*) shift;;
X*) break;;
@@ -29,17 +31,15 @@ shift
document=$1
shift
-# FIXME: this is a hack to detect uninstalled
-if test "x$0" = "x@prefix@/bin/gtkdoc-mkhtml" ; then
- #echo "installed"
+if test $uninstalled = yes; then
+ # this does not work from buiddir!=srcdir
+ gtkdocdir=`dirname $0`
+ #echo "uninstalled, gtkdocdir=$gtkdocdir"
+else
# the first two are needed to resolve datadir
prefix=@prefix@
datarootdir=@datarootdir@
gtkdocdir=@datadir@/gtk-doc/data
-else
- #echo "uninstalled"
- # this does not work from buiddir!=srcdir
- gtkdocdir=`dirname $0`
fi
if head -n 1 $document | grep "<?xml" > /dev/null; then