about summary refs log tree commit diff stats
path: root/makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'makefile.in')
-rw-r--r--makefile.in22
1 files changed, 13 insertions, 9 deletions
diff --git a/makefile.in b/makefile.in
index a3f40ebc..cd615d60 100644
--- a/makefile.in
+++ b/makefile.in
@@ -78,6 +78,9 @@ WWWINC= WWW/Library/Implementation
 COMPRESS_PROG=@COMPRESS_PROG@
 COMPRESS_EXT=@COMPRESS_EXT@
 
+# Path of scripts directory
+scripts_dir=$(srcdir)/scripts
+
 # !!!!!!!!!!! SUN resolv LIBRARY !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 # To include resolv in the LIBS="" list for SUN 3, 4 or Solaris OS,
 # point RESOLVLIB to that library.  You need this if you get the message
@@ -155,7 +158,7 @@ SITE_DEFS = # Your defines here
 # for installation of local execution links, please see the file userdefs.h
 
 all lynx$x: cfg_defs.h LYHelp.h
-@MSG_DIR_MAKE@	$(SHELL) $(srcdir)/fixtext.sh $(srcdir)/LYMessages_en.h >LYMessages.c
+@MSG_DIR_MAKE@	$(SHELL) $(scripts_dir)/fixtext.sh $(srcdir)/LYMessages_en.h >LYMessages.c
 @MSG_DIR_MAKE@	cd po && $(MAKE) CC="$(CC)"
 	cd $(WWWINC) && $(MAKE) CC="$(CC)" \
 		LY_CFLAGS="$(CFLAGS)" \
@@ -341,7 +344,7 @@ install-help : help_files.sed $(HELPDIR)
 @LYNXCFG_MAKE@	@-rm -f alphatoc.html body.html cattoc.html
 @LYNXCFG_MAKE@	sed -n -e '/Config_Type  *Config_Table/,/{0, *0, *0}/ p' src/LYReadCFG.i | \
 @LYNXCFG_MAKE@	sed  -e 's/ *{ *"\([^"]*\)".*/\1/' | \
-@LYNXCFG_MAKE@	perl $(srcdir)/scripts/cfg2html.pl -ms $(srcdir)/lynx.cfg
+@LYNXCFG_MAKE@	perl $(scripts_dir)/cfg2html.pl -ms $(srcdir)/lynx.cfg
 	@echo Translating/copying html files
 @LYNXCFG_MAKE@	@$(SHELL) -c 'for f in alphatoc.html body.html cattoc.html ; do \
 @LYNXCFG_MAKE@		sed -f help_files.sed $$f > $(HELPDIR)/$$f ; \
@@ -366,11 +369,12 @@ install-help : help_files.sed $(HELPDIR)
 	@echo Updating $(libdir)/lynx.cfg to point to installed help-files
 	@ECHO_CC@sed	-e '/^HELPFILE:http/s!^!#!' \
 		-e '/^#HELPFILE:file/s!#!!' \
-		-e '/^HELPFILE:file/s!/PATH_TO/lynx_help!$(helpdir)!' \
-		-e '/^[A-Z_]*:/s!/PATH_TO/lynx_doc!$(docdir)!' \
-		-e '/^HELPFILE:file/s!$$!$(COMPRESS_EXT)!' \
+		$(LIBDIR)/lynx.tmp | \
+	$(SHELL) -c "$(scripts_dir)/cfg_path.sh lynx_help $(helpdir)" | \
+	$(SHELL) -c "$(scripts_dir)/cfg_path.sh lynx_doc  $(helpdir)" | \
+	sed	-e '/^HELPFILE:file/s!$$!$(COMPRESS_EXT)!' \
 		-e '/^HELPFILE:file/s!$(COMPRESS_EXT)$(COMPRESS_EXT)$$!$(COMPRESS_EXT)!' \
-		$(LIBDIR)/lynx.tmp >$(LIBDIR)/lynx.cfg
+		>$(LIBDIR)/lynx.cfg
 	chmod 644 $(LIBDIR)/lynx.cfg
 	-rm -f $(LIBDIR)/lynx.tmp
 
@@ -389,12 +393,12 @@ LYHelp.h : help_files.sed LYHelp.hin
 	@echo
 	@echo '**********************************************'
 
-cfg_defs.h : $(srcdir)/cfg_defs.sh $(srcdir)/cfg_edit.sh config.cache lynx_cfg.h
+cfg_defs.h : $(scripts_dir)/cfg_defs.sh $(scripts_dir)/cfg_edit.sh config.cache lynx_cfg.h
 	@rm -f $@
-	$(SHELL) -c 'SHELL=$(SHELL) $(SHELL) $(srcdir)/cfg_defs.sh $(srcdir)'
+	$(SHELL) -c 'SHELL=$(SHELL) $(SHELL) $(scripts_dir)/cfg_defs.sh $(srcdir)'
 
 install-cfg : $(LIBDIR)
-	@$(SHELL) -c '$(srcdir)/scripts/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(LIBDIR)/lynx.cfg'
+	@$(SHELL) -c '$(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(LIBDIR)/lynx.cfg'
 
 install-lss : $(LIBDIR)
 	-mv -f $(LIBDIR)/lynx.lss $(LIBDIR)/lynx.oldlss