--- libidn-1.26/doc/Makefile.gdoc.orig	2013-04-18 01:26:57 +0400
+++ libidn-1.26/doc/Makefile.gdoc	2013-04-18 12:08:52 +0400
@@ -9,117 +9,117 @@
 gdoc_TEXINFOS += texi/idna.c.texi
 texi/idna.c.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # idna.c: idna_to_ascii_4i
 gdoc_TEXINFOS += texi/idna_to_ascii_4i.texi
 texi/idna_to_ascii_4i.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_ascii_4i $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_ascii_4i $< > $@
 
 gdoc_MANS += man/idna_to_ascii_4i.3
 man/idna_to_ascii_4i.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_ascii_4i $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_ascii_4i $< > $@
 
 # idna.c: idna_to_unicode_44i
 gdoc_TEXINFOS += texi/idna_to_unicode_44i.texi
 texi/idna_to_unicode_44i.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_44i $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_44i $< > $@
 
 gdoc_MANS += man/idna_to_unicode_44i.3
 man/idna_to_unicode_44i.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_44i $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_44i $< > $@
 
 # idna.c: idna_to_ascii_4z
 gdoc_TEXINFOS += texi/idna_to_ascii_4z.texi
 texi/idna_to_ascii_4z.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_ascii_4z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_ascii_4z $< > $@
 
 gdoc_MANS += man/idna_to_ascii_4z.3
 man/idna_to_ascii_4z.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_ascii_4z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_ascii_4z $< > $@
 
 # idna.c: idna_to_ascii_8z
 gdoc_TEXINFOS += texi/idna_to_ascii_8z.texi
 texi/idna_to_ascii_8z.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_ascii_8z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_ascii_8z $< > $@
 
 gdoc_MANS += man/idna_to_ascii_8z.3
 man/idna_to_ascii_8z.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_ascii_8z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_ascii_8z $< > $@
 
 # idna.c: idna_to_ascii_lz
 gdoc_TEXINFOS += texi/idna_to_ascii_lz.texi
 texi/idna_to_ascii_lz.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_ascii_lz $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_ascii_lz $< > $@
 
 gdoc_MANS += man/idna_to_ascii_lz.3
 man/idna_to_ascii_lz.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_ascii_lz $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_ascii_lz $< > $@
 
 # idna.c: idna_to_unicode_4z4z
 gdoc_TEXINFOS += texi/idna_to_unicode_4z4z.texi
 texi/idna_to_unicode_4z4z.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_4z4z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_4z4z $< > $@
 
 gdoc_MANS += man/idna_to_unicode_4z4z.3
 man/idna_to_unicode_4z4z.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_4z4z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_4z4z $< > $@
 
 # idna.c: idna_to_unicode_8z4z
 gdoc_TEXINFOS += texi/idna_to_unicode_8z4z.texi
 texi/idna_to_unicode_8z4z.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_8z4z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_8z4z $< > $@
 
 gdoc_MANS += man/idna_to_unicode_8z4z.3
 man/idna_to_unicode_8z4z.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_8z4z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_8z4z $< > $@
 
 # idna.c: idna_to_unicode_8z8z
 gdoc_TEXINFOS += texi/idna_to_unicode_8z8z.texi
 texi/idna_to_unicode_8z8z.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_8z8z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_8z8z $< > $@
 
 gdoc_MANS += man/idna_to_unicode_8z8z.3
 man/idna_to_unicode_8z8z.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_8z8z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_8z8z $< > $@
 
 # idna.c: idna_to_unicode_8zlz
 gdoc_TEXINFOS += texi/idna_to_unicode_8zlz.texi
 texi/idna_to_unicode_8zlz.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_8zlz $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_8zlz $< > $@
 
 gdoc_MANS += man/idna_to_unicode_8zlz.3
 man/idna_to_unicode_8zlz.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_8zlz $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_8zlz $< > $@
 
 # idna.c: idna_to_unicode_lzlz
 gdoc_TEXINFOS += texi/idna_to_unicode_lzlz.texi
 texi/idna_to_unicode_lzlz.texi: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_lzlz $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_to_unicode_lzlz $< > $@
 
 gdoc_MANS += man/idna_to_unicode_lzlz.3
 man/idna_to_unicode_lzlz.3: ../lib/idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_lzlz $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_to_unicode_lzlz $< > $@
 
 
 #
@@ -128,73 +128,73 @@
 gdoc_TEXINFOS += texi/nfkc.c.texi
 texi/nfkc.c.texi: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # nfkc.c: stringprep_utf8_to_unichar
 gdoc_TEXINFOS += texi/stringprep_utf8_to_unichar.texi
 texi/stringprep_utf8_to_unichar.texi: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_utf8_to_unichar $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_utf8_to_unichar $< > $@
 
 gdoc_MANS += man/stringprep_utf8_to_unichar.3
 man/stringprep_utf8_to_unichar.3: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_utf8_to_unichar $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_utf8_to_unichar $< > $@
 
 # nfkc.c: stringprep_unichar_to_utf8
 gdoc_TEXINFOS += texi/stringprep_unichar_to_utf8.texi
 texi/stringprep_unichar_to_utf8.texi: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_unichar_to_utf8 $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_unichar_to_utf8 $< > $@
 
 gdoc_MANS += man/stringprep_unichar_to_utf8.3
 man/stringprep_unichar_to_utf8.3: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_unichar_to_utf8 $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_unichar_to_utf8 $< > $@
 
 # nfkc.c: stringprep_utf8_to_ucs4
 gdoc_TEXINFOS += texi/stringprep_utf8_to_ucs4.texi
 texi/stringprep_utf8_to_ucs4.texi: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_utf8_to_ucs4 $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_utf8_to_ucs4 $< > $@
 
 gdoc_MANS += man/stringprep_utf8_to_ucs4.3
 man/stringprep_utf8_to_ucs4.3: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_utf8_to_ucs4 $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_utf8_to_ucs4 $< > $@
 
 # nfkc.c: stringprep_ucs4_to_utf8
 gdoc_TEXINFOS += texi/stringprep_ucs4_to_utf8.texi
 texi/stringprep_ucs4_to_utf8.texi: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_ucs4_to_utf8 $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_ucs4_to_utf8 $< > $@
 
 gdoc_MANS += man/stringprep_ucs4_to_utf8.3
 man/stringprep_ucs4_to_utf8.3: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_ucs4_to_utf8 $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_ucs4_to_utf8 $< > $@
 
 # nfkc.c: stringprep_utf8_nfkc_normalize
 gdoc_TEXINFOS += texi/stringprep_utf8_nfkc_normalize.texi
 texi/stringprep_utf8_nfkc_normalize.texi: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_utf8_nfkc_normalize $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_utf8_nfkc_normalize $< > $@
 
 gdoc_MANS += man/stringprep_utf8_nfkc_normalize.3
 man/stringprep_utf8_nfkc_normalize.3: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_utf8_nfkc_normalize $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_utf8_nfkc_normalize $< > $@
 
 # nfkc.c: stringprep_ucs4_nfkc_normalize
 gdoc_TEXINFOS += texi/stringprep_ucs4_nfkc_normalize.texi
 texi/stringprep_ucs4_nfkc_normalize.texi: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_ucs4_nfkc_normalize $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_ucs4_nfkc_normalize $< > $@
 
 gdoc_MANS += man/stringprep_ucs4_nfkc_normalize.3
 man/stringprep_ucs4_nfkc_normalize.3: ../lib/nfkc.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_ucs4_nfkc_normalize $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_ucs4_nfkc_normalize $< > $@
 
 
 #
@@ -203,40 +203,40 @@
 gdoc_TEXINFOS += texi/pr29.c.texi
 texi/pr29.c.texi: ../lib/pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # pr29.c: pr29_4
 gdoc_TEXINFOS += texi/pr29_4.texi
 texi/pr29_4.texi: ../lib/pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function pr29_4 $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function pr29_4 $< > $@
 
 gdoc_MANS += man/pr29_4.3
 man/pr29_4.3: ../lib/pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function pr29_4 $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function pr29_4 $< > $@
 
 # pr29.c: pr29_4z
 gdoc_TEXINFOS += texi/pr29_4z.texi
 texi/pr29_4z.texi: ../lib/pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function pr29_4z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function pr29_4z $< > $@
 
 gdoc_MANS += man/pr29_4z.3
 man/pr29_4z.3: ../lib/pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function pr29_4z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function pr29_4z $< > $@
 
 # pr29.c: pr29_8z
 gdoc_TEXINFOS += texi/pr29_8z.texi
 texi/pr29_8z.texi: ../lib/pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function pr29_8z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function pr29_8z $< > $@
 
 gdoc_MANS += man/pr29_8z.3
 man/pr29_8z.3: ../lib/pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function pr29_8z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function pr29_8z $< > $@
 
 
 #
@@ -245,29 +245,29 @@
 gdoc_TEXINFOS += texi/punycode.c.texi
 texi/punycode.c.texi: ../lib/punycode.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # punycode.c: punycode_encode
 gdoc_TEXINFOS += texi/punycode_encode.texi
 texi/punycode_encode.texi: ../lib/punycode.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function punycode_encode $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function punycode_encode $< > $@
 
 gdoc_MANS += man/punycode_encode.3
 man/punycode_encode.3: ../lib/punycode.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function punycode_encode $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function punycode_encode $< > $@
 
 # punycode.c: punycode_decode
 gdoc_TEXINFOS += texi/punycode_decode.texi
 texi/punycode_decode.texi: ../lib/punycode.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function punycode_decode $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function punycode_decode $< > $@
 
 gdoc_MANS += man/punycode_decode.3
 man/punycode_decode.3: ../lib/punycode.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function punycode_decode $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function punycode_decode $< > $@
 
 
 #
@@ -276,51 +276,51 @@
 gdoc_TEXINFOS += texi/stringprep.c.texi
 texi/stringprep.c.texi: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # stringprep.c: stringprep_4i
 gdoc_TEXINFOS += texi/stringprep_4i.texi
 texi/stringprep_4i.texi: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_4i $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_4i $< > $@
 
 gdoc_MANS += man/stringprep_4i.3
 man/stringprep_4i.3: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_4i $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_4i $< > $@
 
 # stringprep.c: stringprep_4zi
 gdoc_TEXINFOS += texi/stringprep_4zi.texi
 texi/stringprep_4zi.texi: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_4zi $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_4zi $< > $@
 
 gdoc_MANS += man/stringprep_4zi.3
 man/stringprep_4zi.3: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_4zi $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_4zi $< > $@
 
 # stringprep.c: stringprep
 gdoc_TEXINFOS += texi/stringprep.texi
 texi/stringprep.texi: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep $< > $@
 
 gdoc_MANS += man/stringprep.3
 man/stringprep.3: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep $< > $@
 
 # stringprep.c: stringprep_profile
 gdoc_TEXINFOS += texi/stringprep_profile.texi
 texi/stringprep_profile.texi: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_profile $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_profile $< > $@
 
 gdoc_MANS += man/stringprep_profile.3
 man/stringprep_profile.3: ../lib/stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_profile $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_profile $< > $@
 
 
 #
@@ -329,128 +329,128 @@
 gdoc_TEXINFOS += texi/tld.c.texi
 texi/tld.c.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # tld.c: tld_get_table
 gdoc_TEXINFOS += texi/tld_get_table.texi
 texi/tld_get_table.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_get_table $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_get_table $< > $@
 
 gdoc_MANS += man/tld_get_table.3
 man/tld_get_table.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_get_table $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_get_table $< > $@
 
 # tld.c: tld_default_table
 gdoc_TEXINFOS += texi/tld_default_table.texi
 texi/tld_default_table.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_default_table $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_default_table $< > $@
 
 gdoc_MANS += man/tld_default_table.3
 man/tld_default_table.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_default_table $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_default_table $< > $@
 
 # tld.c: tld_get_4
 gdoc_TEXINFOS += texi/tld_get_4.texi
 texi/tld_get_4.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_get_4 $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_get_4 $< > $@
 
 gdoc_MANS += man/tld_get_4.3
 man/tld_get_4.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_get_4 $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_get_4 $< > $@
 
 # tld.c: tld_get_4z
 gdoc_TEXINFOS += texi/tld_get_4z.texi
 texi/tld_get_4z.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_get_4z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_get_4z $< > $@
 
 gdoc_MANS += man/tld_get_4z.3
 man/tld_get_4z.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_get_4z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_get_4z $< > $@
 
 # tld.c: tld_get_z
 gdoc_TEXINFOS += texi/tld_get_z.texi
 texi/tld_get_z.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_get_z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_get_z $< > $@
 
 gdoc_MANS += man/tld_get_z.3
 man/tld_get_z.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_get_z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_get_z $< > $@
 
 # tld.c: tld_check_4t
 gdoc_TEXINFOS += texi/tld_check_4t.texi
 texi/tld_check_4t.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_4t $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_4t $< > $@
 
 gdoc_MANS += man/tld_check_4t.3
 man/tld_check_4t.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_4t $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_4t $< > $@
 
 # tld.c: tld_check_4tz
 gdoc_TEXINFOS += texi/tld_check_4tz.texi
 texi/tld_check_4tz.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_4tz $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_4tz $< > $@
 
 gdoc_MANS += man/tld_check_4tz.3
 man/tld_check_4tz.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_4tz $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_4tz $< > $@
 
 # tld.c: tld_check_4
 gdoc_TEXINFOS += texi/tld_check_4.texi
 texi/tld_check_4.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_4 $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_4 $< > $@
 
 gdoc_MANS += man/tld_check_4.3
 man/tld_check_4.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_4 $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_4 $< > $@
 
 # tld.c: tld_check_4z
 gdoc_TEXINFOS += texi/tld_check_4z.texi
 texi/tld_check_4z.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_4z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_4z $< > $@
 
 gdoc_MANS += man/tld_check_4z.3
 man/tld_check_4z.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_4z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_4z $< > $@
 
 # tld.c: tld_check_8z
 gdoc_TEXINFOS += texi/tld_check_8z.texi
 texi/tld_check_8z.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_8z $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_8z $< > $@
 
 gdoc_MANS += man/tld_check_8z.3
 man/tld_check_8z.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_8z $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_8z $< > $@
 
 # tld.c: tld_check_lz
 gdoc_TEXINFOS += texi/tld_check_lz.texi
 texi/tld_check_lz.texi: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_lz $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_check_lz $< > $@
 
 gdoc_MANS += man/tld_check_lz.3
 man/tld_check_lz.3: ../lib/tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_lz $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_check_lz $< > $@
 
 
 #
@@ -459,51 +459,51 @@
 gdoc_TEXINFOS += texi/toutf8.c.texi
 texi/toutf8.c.texi: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # toutf8.c: stringprep_locale_charset
 gdoc_TEXINFOS += texi/stringprep_locale_charset.texi
 texi/stringprep_locale_charset.texi: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_locale_charset $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_locale_charset $< > $@
 
 gdoc_MANS += man/stringprep_locale_charset.3
 man/stringprep_locale_charset.3: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_locale_charset $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_locale_charset $< > $@
 
 # toutf8.c: stringprep_convert
 gdoc_TEXINFOS += texi/stringprep_convert.texi
 texi/stringprep_convert.texi: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_convert $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_convert $< > $@
 
 gdoc_MANS += man/stringprep_convert.3
 man/stringprep_convert.3: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_convert $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_convert $< > $@
 
 # toutf8.c: stringprep_locale_to_utf8
 gdoc_TEXINFOS += texi/stringprep_locale_to_utf8.texi
 texi/stringprep_locale_to_utf8.texi: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_locale_to_utf8 $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_locale_to_utf8 $< > $@
 
 gdoc_MANS += man/stringprep_locale_to_utf8.3
 man/stringprep_locale_to_utf8.3: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_locale_to_utf8 $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_locale_to_utf8 $< > $@
 
 # toutf8.c: stringprep_utf8_to_locale
 gdoc_TEXINFOS += texi/stringprep_utf8_to_locale.texi
 texi/stringprep_utf8_to_locale.texi: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_utf8_to_locale $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_utf8_to_locale $< > $@
 
 gdoc_MANS += man/stringprep_utf8_to_locale.3
 man/stringprep_utf8_to_locale.3: ../lib/toutf8.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_utf8_to_locale $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_utf8_to_locale $< > $@
 
 
 #
@@ -512,18 +512,18 @@
 gdoc_TEXINFOS += texi/version.c.texi
 texi/version.c.texi: ../lib/version.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # version.c: stringprep_check_version
 gdoc_TEXINFOS += texi/stringprep_check_version.texi
 texi/stringprep_check_version.texi: ../lib/version.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_check_version $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_check_version $< > $@
 
 gdoc_MANS += man/stringprep_check_version.3
 man/stringprep_check_version.3: ../lib/version.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_check_version $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_check_version $< > $@
 
 
 #
@@ -532,18 +532,18 @@
 gdoc_TEXINFOS += texi/idn-free.c.texi
 texi/idn-free.c.texi: ../lib/idn-free.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # idn-free.c: idn_free
 gdoc_TEXINFOS += texi/idn_free.texi
 texi/idn_free.texi: ../lib/idn-free.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idn_free $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idn_free $< > $@
 
 gdoc_MANS += man/idn_free.3
 man/idn_free.3: ../lib/idn-free.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idn_free $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idn_free $< > $@
 
 
 #
@@ -552,18 +552,18 @@
 gdoc_TEXINFOS += texi/strerror-idna.c.texi
 texi/strerror-idna.c.texi: ../lib/strerror-idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # strerror-idna.c: idna_strerror
 gdoc_TEXINFOS += texi/idna_strerror.texi
 texi/idna_strerror.texi: ../lib/strerror-idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function idna_strerror $< > $@
 
 gdoc_MANS += man/idna_strerror.3
 man/idna_strerror.3: ../lib/strerror-idna.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function idna_strerror $< > $@
 
 
 #
@@ -572,18 +572,18 @@
 gdoc_TEXINFOS += texi/strerror-pr29.c.texi
 texi/strerror-pr29.c.texi: ../lib/strerror-pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # strerror-pr29.c: pr29_strerror
 gdoc_TEXINFOS += texi/pr29_strerror.texi
 texi/pr29_strerror.texi: ../lib/strerror-pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function pr29_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function pr29_strerror $< > $@
 
 gdoc_MANS += man/pr29_strerror.3
 man/pr29_strerror.3: ../lib/strerror-pr29.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function pr29_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function pr29_strerror $< > $@
 
 
 #
@@ -592,18 +592,18 @@
 gdoc_TEXINFOS += texi/strerror-punycode.c.texi
 texi/strerror-punycode.c.texi: ../lib/strerror-punycode.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # strerror-punycode.c: punycode_strerror
 gdoc_TEXINFOS += texi/punycode_strerror.texi
 texi/punycode_strerror.texi: ../lib/strerror-punycode.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function punycode_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function punycode_strerror $< > $@
 
 gdoc_MANS += man/punycode_strerror.3
 man/punycode_strerror.3: ../lib/strerror-punycode.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function punycode_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function punycode_strerror $< > $@
 
 
 #
@@ -612,18 +612,18 @@
 gdoc_TEXINFOS += texi/strerror-stringprep.c.texi
 texi/strerror-stringprep.c.texi: ../lib/strerror-stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # strerror-stringprep.c: stringprep_strerror
 gdoc_TEXINFOS += texi/stringprep_strerror.texi
 texi/stringprep_strerror.texi: ../lib/strerror-stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function stringprep_strerror $< > $@
 
 gdoc_MANS += man/stringprep_strerror.3
 man/stringprep_strerror.3: ../lib/strerror-stringprep.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function stringprep_strerror $< > $@
 
 
 #
@@ -632,17 +632,17 @@
 gdoc_TEXINFOS += texi/strerror-tld.c.texi
 texi/strerror-tld.c.texi: ../lib/strerror-tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) $< > $@
 
 # strerror-tld.c: tld_strerror
 gdoc_TEXINFOS += texi/tld_strerror.texi
 texi/tld_strerror.texi: ../lib/strerror-tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -texinfo $(GDOC_TEXI_EXTRA_ARGS) -function tld_strerror $< > $@
 
 gdoc_MANS += man/tld_strerror.3
 man/tld_strerror.3: ../lib/strerror-tld.c
 	mkdir -p `dirname $@`
-	$(PERL) ./gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_strerror $< > $@
+	$(PERL) $(srcdir)/gdoc -man $(GDOC_MAN_EXTRA_ARGS) -function tld_strerror $< > $@
 
 
