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.in97
1 files changed, 50 insertions, 47 deletions
diff --git a/makefile.in b/makefile.in
index c0fb9767..9707d005 100644
--- a/makefile.in
+++ b/makefile.in
@@ -23,7 +23,6 @@ LIBS		= @LIBS@
 INSTALL		= @INSTALL@
 INSTALL_PROGRAM	= @INSTALL_PROGRAM@
 INSTALL_DATA	= @INSTALL_DATA@
-LN_S		= @LN_S@
 
 ## This is the version which we are developing (or, upon release, make this
 ## the same).  Use no dots in the name, since it must work on VMS and MS-DOS.
@@ -34,25 +33,29 @@ VERSION		= 2-8-2
 lynxdir= lynx$(VERSION)
 lynxname= lynx$(VERSION)
 
+## The 'DESTDIR' variable allows you to install the program into a different
+## location, e.g., for packaging, without affecting the compiled-in pathnames.
+DESTDIR=
+
 ## Where you want lynx installed
 bindir= @bindir@
+BINDIR= $(DESTDIR)$(bindir)
 
 ## Where you want the lynx man file installed
 mandir= @mandir@/man1
+MANDIR= $(DESTDIR)$(mandir)
 
 ## Where you want the lynx.cfg file installed
 libdir= @libdir@
+LIBDIR= $(DESTDIR)$(libdir)
 
 ## Where you want the doc-files installed
 docdir= @libdir@/lynx_doc
+DOCDIR= $(DESTDIR)$(docdir)
 
 ## Where you want the help-files installed
 helpdir= @libdir@/lynx_help
-
-## Where your locale data is
-# datadir = @datadir@
-datadir = /usr/local/share
-localedir = $(datadir)/locale
+HELPDIR= $(DESTDIR)$(helpdir)
 
 ##set the relative location of the WWW library Implementation directory,
 ##from this directory
@@ -305,25 +308,25 @@ install: lynx$x install-bin install-man install-cfg @INSTALL_LSS@
 install-full: install install-help install-doc
 	@echo Full installation complete.
 
-install-bin: $(bindir)
+install-bin: $(BINDIR)
 @MSG_DIR_MAKE@	cd po && $(MAKE) CC="$(CC)" install
-	-mv -f $(bindir)/lynx$x $(bindir)/lynx.old
-	$(INSTALL_PROGRAM) lynx$x $(bindir)/
+	-mv -f $(BINDIR)/lynx$x $(BINDIR)/lynx.old
+	$(INSTALL_PROGRAM) lynx$x $(BINDIR)/lynx$x 
 
-install-man : $(mandir)
-	$(INSTALL_DATA) $(srcdir)/lynx.man $(mandir)/lynx.1
+install-man : $(MANDIR)
+	$(INSTALL_DATA) $(srcdir)/lynx.man $(MANDIR)/lynx.1
 
-install-doc : $(docdir)
+install-doc : $(DOCDIR)
 	@echo Copying sample files
 	(cd $(srcdir) && tar cf - C[HO]* PROBLEMS README samples test ) | \
-			       ( cd $(docdir) && tar xf - )
+			       ( cd $(DOCDIR) && tar xf - )
 
 # HPUX 'sed' does not seem to like '=' as pattern delimiter.
 FIX_SED = tr '=' '%'
 #FIX_SED = cat
 
-install-help : $(docdir) $(helpdir)
-	(cd $(helpdir) && rm -rf *)
+install-help : $(DOCDIR) $(HELPDIR)
+	(cd $(HELPDIR) && rm -rf *)
 	@echo Constructing sed-script
 	@ECHO_CC@sed	-e '/^#/d' -e '/^$$/d' \
 		-e 's%\(.*\)=\(.*\@.*\)$$%s=@\1@=\2=g%' \
@@ -331,33 +334,33 @@ install-help : $(docdir) $(helpdir)
 		-e 's%\(.*\)=\(ftp:.*\)$$%s=@\1@=\2=g%' \
 		-e 's%\(.*\)=\(.*\.html\)$$%s=@\1@=\2$(COMPRESS_EXT)=g%' \
 		$(srcdir)/lynx_help/help_files.txt | $(FIX_SED) > \
-		$(helpdir)/help_files.sed
+		$(HELPDIR)/help_files.sed
 	@echo Appending interim-fix for existing html files
 	@ECHO_CC@sed	-e '/^#/d' -e '/[:@]/d' -e '/^$$/d' \
 		-e 's%\(.*\)=\(.*\.html\)$$%s=\2=\2$(COMPRESS_EXT)=g%' \
 		-e 's%\.html=%\\.html=%' \
 		$(srcdir)/lynx_help/help_files.txt | $(FIX_SED) >> \
-		$(helpdir)/help_files.sed
+		$(HELPDIR)/help_files.sed
 	@ECHO_CC@if test -n "$(COMPRESS_EXT)"; then echo 's%\$(COMPRESS_EXT)\$(COMPRESS_EXT)%$(COMPRESS_EXT)%g' >> \
-		$(helpdir)/help_files.sed; fi
+		$(HELPDIR)/help_files.sed; fi
 	@echo Translating/copying html files
 	@ECHO_CC@$(SHELL) -c 'cd $(srcdir)/lynx_help && ( \
 		dirs=keystrokes; \
-		(cd $(helpdir) && mkdir $$dirs 2>/dev/null ) ; \
+		(cd $(HELPDIR) && mkdir $$dirs 2>/dev/null ) ; \
 		files="*.html */*.html" ; \
 		for f in $$files ; do \
-			sed -f $(helpdir)/help_files.sed $$f > $(helpdir)/$$f ; \
+			sed -f $(HELPDIR)/help_files.sed $$f > $(HELPDIR)/$$f ; \
 		done ; \
 		if test "$(COMPRESS_PROG)" != "" ; then \
-			(cd $(helpdir) && $(COMPRESS_PROG) $$files ) \
+			(cd $(HELPDIR) && $(COMPRESS_PROG) $$files ) \
 		fi ; \
 		)'
-	-rm -f $(helpdir)/help_files.sed
+	-rm -f $(HELPDIR)/help_files.sed
 	@echo Updating $(libdir)/lynx.cfg
-	$(SHELL) -c 'if test -f $(libdir)/lynx.cfg ; then \
-		mv $(libdir)/lynx.cfg $(libdir)/lynx.tmp ; \
+	$(SHELL) -c 'if test -f $(LIBDIR)/lynx.cfg ; then \
+		mv $(LIBDIR)/lynx.cfg $(LIBDIR)/lynx.tmp ; \
 	else \
-		cp $(srcdir)/lynx.cfg $(libdir)/lynx.tmp ; \
+		cp $(srcdir)/lynx.cfg $(LIBDIR)/lynx.tmp ; \
 	fi'
 	@echo Updating $(libdir)/lynx.cfg to point to installed help-files
 	@ECHO_CC@sed	-e '/^HELPFILE:http/s@^@#@' \
@@ -366,14 +369,14 @@ install-help : $(docdir) $(helpdir)
 		-e '/^[A-Z_]*:/s@/PATH_TO/lynx_doc@$(docdir)@' \
 		-e '/^HELPFILE:file/s@$$@$(COMPRESS_EXT)@' \
 		-e '/^HELPFILE:file/s@$(COMPRESS_EXT)$(COMPRESS_EXT)$$@$(COMPRESS_EXT)@' \
-		$(libdir)/lynx.tmp >$(libdir)/lynx.cfg
-	chmod 644 $(libdir)/lynx.cfg
-	-rm -f $(libdir)/lynx.tmp
-	$(INSTALL_DATA) COPYHEADER $(docdir)/COPYHEADER
-	$(INSTALL_DATA) COPYING    $(docdir)/COPYING
-	cd $(helpdir) && ( \
-		ln $(docdir)/COPYHEADER . || cp $(docdir)/COPYHEADER . ; \
-		ln $(docdir)/COPYING    . || cp $(docdir)/COPYING . )
+		$(LIBDIR)/lynx.tmp >$(LIBDIR)/lynx.cfg
+	chmod 644 $(LIBDIR)/lynx.cfg
+	-rm -f $(LIBDIR)/lynx.tmp
+	$(INSTALL_DATA) COPYHEADER $(DOCDIR)/COPYHEADER
+	$(INSTALL_DATA) COPYING    $(DOCDIR)/COPYING
+	cd $(HELPDIR) && ( \
+		ln $(DOCDIR)/COPYHEADER . || cp $(DOCDIR)/COPYHEADER . ; \
+		ln $(DOCDIR)/COPYING    . || cp $(DOCDIR)/COPYING . )
 
 LYHelp.h : LYHelp.hin
 	@echo Constructing sed-script
@@ -403,22 +406,22 @@ cfg_defs.h : $(srcdir)/cfg_defs.sh config.cache lynx_cfg.h
 	@rm -f $@
 	PATH=$(srcdir):$$PATH; export PATH; $(SHELL) -c '$(srcdir)/cfg_defs.sh'
 
-install-cfg : $(libdir)
-	-mv -f $(libdir)/lynx.cfg $(libdir)/lynx.oldcfg
-	$(INSTALL_DATA) $(srcdir)/lynx.cfg $(libdir)/lynx.cfg
+install-cfg : $(LIBDIR)
+	-mv -f $(LIBDIR)/lynx.cfg $(LIBDIR)/lynx.oldcfg
+	$(INSTALL_DATA) $(srcdir)/lynx.cfg $(LIBDIR)/lynx.cfg
 
-install-lss : $(libdir)
-	-mv -f $(libdir)/lynx.lss $(libdir)/lynx.oldlss
-	$(INSTALL_DATA) $(srcdir)/samples/lynx.lss $(libdir)/lynx.lss
+install-lss : $(LIBDIR)
+	-mv -f $(LIBDIR)/lynx.lss $(LIBDIR)/lynx.oldlss
+	$(INSTALL_DATA) $(srcdir)/samples/lynx.lss $(LIBDIR)/lynx.lss
 
 uninstall:
 @MSG_DIR_MAKE@	cd po && $(MAKE) CC="$(CC)" uninstall
-	-rm -f $(bindir)/lynx$x
-	-rm -f $(mandir)/lynx.1
-	-rm -f $(libdir)/lynx.cfg
-	-rm -f $(libdir)/lynx.lss
-	-rm -rf $(helpdir)
-	-rm -rf $(docdir)
-
-$(bindir) $(mandir) $(libdir) $(helpdir) $(docdir) :
+	-rm -f $(BINDIR)/lynx$x
+	-rm -f $(MANDIR)/lynx.1
+	-rm -f $(LIBDIR)/lynx.cfg
+	-rm -f $(LIBDIR)/lynx.lss
+	-rm -rf $(HELPDIR)
+	-rm -rf $(DOCDIR)
+
+$(BINDIR) $(MANDIR) $(LIBDIR) $(HELPDIR) $(DOCDIR) :
 	$(srcdir)/mkdirs.sh $@