--- utils/texdoctk/Makefile.in.orig	2020-11-28 00:40:35.000000000 -0800
+++ utils/texdoctk/Makefile.in	2020-11-28 00:44:38.000000000 -0800
@@ -272,14 +272,14 @@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = $(top_builddir)/../../build-aux/relpath
 perl_scripts = texdoctk
-scriptsdir = texmf-dist/scripts/texdoctk
+scriptsdir = scripts/texdoctk
 nodist_bin_SCRIPTS = $(am__append_1)
 all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts)
 @WIN32_TRUE@@WIN32_WRAP_TRUE@wrappers = $(all_scripts:=.exe)
 @WIN32_TRUE@@WIN32_WRAP_TRUE@runscript = $(top_srcdir)/../../texk/texlive/$(WIN_WRAPPER)/runscript.exe
 #
 #
-texmfdir = $(datarootdir)/$(scriptsdir)
+texmfdir = @@TEXMFDIST@@
 dist_texmf_SCRIPTS = texdoctk.pl
 dist_man1_MANS = texdoctk.1 
 CLEANFILES = $(nodist_bin_SCRIPTS)
@@ -758,17 +758,12 @@
 	  echo 'script_links.am:install-links: could not find relpath script'; \
 	  exit 1; \
 	}; \
-	REL=`$(SHELL) $$relpath '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \
-	if test -z "$$REL"; then \
-	  echo 'script_links.am:install_links: unable to compute relative path for linked $(TYPE) scripts' >&2; \
-	  exit 1; \
-	fi; \
 	cd $(DESTDIR)$(bindir) && \
 	  for f in $($(TYPE)_scripts); do \
 	    rm -f $$f; \
-	    if $(AM_V_P); then echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \
+	    if $(AM_V_P); then echo "creating link '$$f' -> '${texmfdir}/$(scriptsdir)/$$f.$(EXT)'"; \
 	      else echo "  LINK     $$f"; fi; \
-	    $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
+	    $(LN_S) ${texmfdir}/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
 	  done  
 
 uninstall-links:
