--- texk/chktex/Makefile.in.orig	2020-07-04 20:05:09.000000000 -0700
+++ texk/chktex/Makefile.in	2020-07-04 20:06:25.000000000 -0700
@@ -624,12 +624,12 @@
 # scripts
 perl_scripts = deweb
 sh_scripts = chkweb
-scriptsdir = texmf-dist/scripts/chktex
+scriptsdir = scripts/chktex
 nodist_bin_SCRIPTS = $(am__append_2)
 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@@/
 nodist_texmf_SCRIPTS = $(perl_scripts:=.pl)
 texmf_SCRIPTS = $(CHKTEX_TREE)/chkweb.sh
 
@@ -1618,17 +1618,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:
