From 64163565f8d6853b02e53308a6e6ba23d9d96299 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 31 Aug 2016 16:44:46 +0300
Subject: [PATCH] Do not hardocode paths to perl/python in scripts.

Doing so when the interpreters are somewhere deep in a sysroot directory
can reach the shebang line limit, and resulting scripts wouldn't work
on targets either.

Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 gtkdoc-check.in    | 2 +-
 gtkdoc-depscan.in  | 2 +-
 gtkdoc-fixxref.in  | 2 +-
 gtkdoc-mkdb.in     | 2 +-
 gtkdoc-mkhtml.in   | 2 +-
 gtkdoc-mkman.in    | 2 +-
 gtkdoc-mkpdf.in    | 2 +-
 gtkdoc-rebase.in   | 2 +-
 gtkdoc-scan.in     | 2 +-
 gtkdoc-scangobj.in | 2 +-
 tests/tools.sh.in  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gtkdoc-check.in b/gtkdoc-check.in
index d9e2ad5..9ec526d 100755
--- a/gtkdoc-check.in
+++ b/gtkdoc-check.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python; coding: utf-8 -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-depscan.in b/gtkdoc-depscan.in
index c43317c..200837c 100755
--- a/gtkdoc-depscan.in
+++ b/gtkdoc-depscan.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 
 from __future__ import print_function
 
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index f9c4905..ed2ead1 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 641f3c4..35e95fb 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python; coding: utf-8 -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-mkhtml.in b/gtkdoc-mkhtml.in
index b09f7a9..8d45966 100755
--- a/gtkdoc-mkhtml.in
+++ b/gtkdoc-mkhtml.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python; coding: utf-8 -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-mkman.in b/gtkdoc-mkman.in
index 8f7b018..9bac0b6 100755
--- a/gtkdoc-mkman.in
+++ b/gtkdoc-mkman.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python; coding: utf-8 -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-mkpdf.in b/gtkdoc-mkpdf.in
index 7dca4b0..808f92d 100755
--- a/gtkdoc-mkpdf.in
+++ b/gtkdoc-mkpdf.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python; coding: utf-8 -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-rebase.in b/gtkdoc-rebase.in
index e8b0bf5..a960d8f 100755
--- a/gtkdoc-rebase.in
+++ b/gtkdoc-rebase.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 7893ebc..b7eb83d 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
index 7660c70..c6ff072 100755
--- a/gtkdoc-scangobj.in
+++ b/gtkdoc-scangobj.in
@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!/usr/bin/env python3
 # -*- python -*-
 #
 # gtk-doc - GTK DocBook documentation generator.
diff --git a/tests/tools.sh.in b/tests/tools.sh.in
index 343844a..9dc6692 100644
--- a/tests/tools.sh.in
+++ b/tests/tools.sh.in
@@ -30,7 +30,7 @@ done
 # TODO: also test the module files
 for file in gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml gtkdoc-mkhtml2 gtkdoc-mkman gtkdoc-mkpdf gtkdoc-rebase gtkdoc-scangobj; do
     fullfile=`which $file`
-    @PYTHON@ -m py_compile $fullfile
+    python3 -m py_compile $fullfile
     if test $? != 0 ; then failed=`expr $failed + 1`; fi
     tested=`expr $tested + 1`
 done
