--- texk/tex4htk/Makefile.in.orig	2017-05-04 14:51:18.000000000 -0700
+++ texk/tex4htk/Makefile.in	2017-05-04 14:52:39.000000000 -0700
@@ -410,12 +410,12 @@
 shell_scripts = ht htcontext htlatex htmex httex httexi \
   htxelatex htxetex xhlatex
 
-scriptsdir = texmf-dist/scripts/tex4ht
+scriptsdir = scripts/tex4ht
 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@@/$(scriptsdir)
 dist_texmf_SCRIPTS = $(perl_scripts:=.pl) $(shell_scripts:=.sh)
 @WIN32_TRUE@dist_bin_SCRIPTS = $(shell_scripts:=.bat)
 CLEANFILES = $(nodist_bin_SCRIPTS)
@@ -1074,17 +1074,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)/$$f.$(EXT)'"; \
 	      else echo "  LINK     $$f"; fi; \
-	    $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
+	    $(LN_S) $(texmfdir)/$$f.$(EXT) $$f || exit 1; \
 	  done  
 
 uninstall-links:
