1# $LynxId: makefile.in,v 1.125 2012/08/12 23:54:35 tom Exp $
2##makefile for lynx
3
4SHELL		= @CONFIG_SHELL@
5CDPATH		= .
6
7.SUFFIXES:
8@SET_MAKE@
9prefix		= @prefix@
10exec_prefix	= @exec_prefix@
11top_srcdir	= @top_srcdir@
12srcdir		= @srcdir@
13builddir	= .
14VPATH		= $(srcdir)
15
16CC		= @CC@
17CFLAGS		= @CFLAGS@
18DEFS		= @DEFS@
19CPPFLAGS	= @CPPFLAGS@
20LINT		= @LINT@
21ETAGS		= @ETAGS@
22
23x		= @EXEEXT@
24o		= .@OBJEXT@
25
26LDFLAGS		= @EXTRA_LDFLAGS@ @LDFLAGS@
27LIBS		= @LIBS@
28
29INSTALL		= @INSTALL@
30INSTALL_PROGRAM	= @INSTALL_PROGRAM@
31INSTALL_DATA	= @INSTALL_DATA@
32transform	= @program_transform_name@
33
34LN_S		= @LN_S@
35
36TAR		= @TAR@
37TAR_UP		= $(TAR) @TAR_UP_OPTIONS@ @TAR_PIPE_OPTIONS@
38TAR_DOWN	= $(TAR) @TAR_DOWN_OPTIONS@ @TAR_PIPE_OPTIONS@
39
40# $Format: "LYNX_VERSION	= $ProjectVersion$"$
41LYNX_VERSION	= 2.8.8dev.16
42
43## This is the version which we are developing (or, upon release, make this
44## the same).  Use no dots in the name, since it must work on VMS and MS-DOS.
45VERSION		= 2-8-8
46
47##this is the name of the directory the lynx source code is in.
48##(e.g., lynx2-8-7, not the full path)
49lynxdir= lynx$(VERSION)
50lynxname= lynx$(VERSION)
51
52## The 'DESTDIR' variable allows you to install the program into a different
53## location, e.g., for packaging, without affecting the compiled-in pathnames.
54DESTDIR= @DESTDIR@
55
56## Where you want lynx installed
57bindir= @bindir@
58BINDIR= $(DESTDIR)$(bindir)
59
60## Where you want the lynx man file installed
61mandir= @mandir@/man1
62MANDIR= $(DESTDIR)$(mandir)
63
64## Where you want the lynx.cfg file installed
65sysconfdir= @sysconfdir@
66SYSCONFDIR= $(DESTDIR)$(sysconfdir)
67
68## Where you want the doc-files installed
69datarootdir= @datarootdir@
70docdir    = @datadir@/lynx_doc
71DOCDIR    = $(DESTDIR)$(docdir)
72
73## Where you want the help-files installed
74helpdir   = @datadir@/lynx_help
75HELPDIR   = $(DESTDIR)$(helpdir)
76
77##set the relative location of the WWW library Implementation directory,
78##from this directory
79##do not set this to be an absolute path!!!
80WWW_DIR   = $(builddir)/WWW/Library/Implementation
81
82##set the relative location of the message-file directory
83##do not set this to be an absolute path!!!
84PO_DIR    = $(builddir)/po
85PO_SRCDIR = $(srcdir)/po
86
87##set the relative location of the main source-directory
88##do not set this to be an absolute path!!!
89SRC_DIR   = $(builddir)/src
90
91##set the relative location of the character-translation data directory
92##do not set this to be an absolute path!!!
93CHR_DIR   = $(SRC_DIR)/chrtrans
94
95## Path to gzip that will compress the help files.
96## It will be used when --enable-gzip-help is set by configure.
97## Leave *both* empty if you don't want to gzip help files.
98COMPRESS_PROG=@COMPRESS_PROG@
99COMPRESS_EXT=@COMPRESS_EXT@
100
101# Path of scripts directory
102scripts_dir=$(srcdir)/scripts
103
104MAKE_RECUR = $(MAKE) @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" CC="$(CC)"
105
106@LYNXCFG_MAKE@CFG2HTML = alphatoc.html body.html cattoc.html
107
108# !!!!!!!!!!! SUN resolv LIBRARY !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
109# To include resolv in the LIBS="" list for SUN 3, 4 or Solaris OS,
110# point RESOLVLIB to that library.  You need this if you get the message
111# "Alert!:  Unable to connect to remote host" whenever you try to
112# access a host other than localhost and have made Lynx without it.
113# See the PROBLEMS file for more information.
114#RESOLVLIB= -lresolv
115
116# !!!!!!!!!!!!!  DIRECT WAIS ACCESS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
117# If you are adding direct wais access you must fill in the
118# location of wais.a, client.a and the standard math library, libm.a.
119# You can pick up the most current freeWAIS sources from
120#	ftp://ftp.cnidr.org/pub/NIDR.tools/freewais
121# If you are using freeWAIS-0.202 or older, include -DDECLARE_WAIS_LOGFILES
122# in your SITE_DEFS.
123# Please put an ABSOLUTE address here if you want it to work!
124#WAISLIB= ../../freeWAIS-0.202/bin/client.a ../../freeWAIS-0.202/bin/wais.a /usr/lib/libm.a
125
126# !!!!!!!!!!!!! SLANG Support (For color version of Lynx). !!!!!!!!!!!!!!!!
127# The slang library is an alternative to curses, developed by John E. Davis
128# (davis@space.mit.edu).  Version 0.99-27 or higher is available from
129#	ftp://space.mit.edu/pub/davis
130# It provides color support for Lynx.
131
132# !!!!!!!!!!!!! NCURSES Support (For color version of Lynx). !!!!!!!!!!!!!!
133# If you need ncurses, the latest version can always be found
134# in ftp://invisible-island.net/ncurses/
135# or ftp://ftp.gnu.org/pub/gnu/
136
137# Also be sure to check out the compilation symbols in userdefs.h
138# before building Lynx!
139
140# If you apply patches which require linking to site-specific libraries, set
141# SITE_LIBS to those libraries.
142SITE_LIBS= # Your libraries here
143
144# Set SITE_LYDEFS to one or more of the defines for the WWW Library:
145SITE_LYDEFS = # Your defines here
146
147# Set SITE_DEFS to one or more of the defines for lynx below:
148SITE_DEFS = # Your defines here
149
150# defines for which there are no configure options:
151# -DHP_TERMINAL    For DIM workaround to REVERSE problems on HP terminals.
152# -DIGNORE_CTRL_C  Define if Control-C shouldn't exit lynx.
153# -DNO_RULES       Disables CERN-style access rules (see lynx.cfg).
154# -DMISC_EXP       Enable some truly experimental stuff
155# -DSHORTENED_RBIND  For a SOCKSified lynx with the short version of Rbind.
156# -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only)
157# -DUSE_VASPRINT   Use vasprintf() function
158#
159# if you are linking to freeWAIS-0.202 or older, you should define this
160# in SITE_DEFS
161#
162# -DDECLARE_WAIS_LOGFILES
163#
164# if you have the reverse clear screen problem of some SUN4 systems you
165# should define this in SITE_DEFS
166#
167# -DREVERSE_CLEAR_SCREEN_PROBLEM
168#
169# if you have an SVR4 system with the "type any key" problem, try defining
170# this in LYFLAGS (SITE_LYDEFS) and SITE_DEFS
171#
172# -DSVR4_BSDSELECT
173#
174# Old Data General systems may need this in their SITE_LYDEFS
175# for their inet_addr(host) calls.
176#
177# -DDGUX_OLD
178
179# Many other defines have configure options  (see INSTALLATION, Section II-1c.):
180#
181# for installation of local execution links, please see the file userdefs.h
182
183WWW_CFLAGS = \
184	LY_CFLAGS=${CFLAGS:Q} \
185	CPPFLAGS=${CPPFLAGS:Q} \
186	LYFLAGS="$(SITE_LYDEFS)"
187
188SRC_CFLAGS = \
189	CFLAGS=${CFLAGS:Q} \
190	CPPFLAGS=${CPPFLAGS:Q} \
191	LDFLAGS=${LDFLAGS:Q} \
192	LIBS="$(LIBS) $(RESOLVLIB) $(WAISLIB) $(SITE_LIBS)" \
193	SITE_DEFS="$(SITE_DEFS)" \
194	WWWINC=$(WWW_DIR) \
195	WWWLIB="../$(WWW_DIR)/libwww.a"
196
197actual_PROG  = `echo lynx|    sed '$(transform)'`
198binary_PROG  = $(actual_PROG)$x
199
200all lynx$x: cfg_defs.h LYHelp.h
201@MSG_DIR_MAKE@	$(SHELL) $(scripts_dir)/fixtext.sh $(srcdir)/LYMessages_en.h >LYMessages.c
202@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR)
203	cd $(WWW_DIR) && $(MAKE_RECUR) $(WWW_CFLAGS)
204	cd $(SRC_DIR) && $(MAKE_RECUR) all $(SRC_CFLAGS)
205
206lint:
207	cd $(WWW_DIR) && $(MAKE_RECUR) LINT="$(LINT)" $(WWW_CFLAGS) $@
208	cd $(SRC_DIR) && $(MAKE_RECUR) LINT="$(LINT)" $(SRC_CFLAGS) $@
209	cd $(CHR_DIR) && $(MAKE_RECUR) LINT="$(LINT)" $@
210
211tags:
212	cd $(WWW_DIR) && $(MAKE_RECUR) $(WWW_CFLAGS) $@
213	cd $(SRC_DIR) && $(MAKE_RECUR) $(SRC_CFLAGS) $@
214	cd $(CHR_DIR) && $(MAKE_RECUR) $@
215
216etags:
217	$(ETAGS) *.[ch] */*.[ch] */*/*.[ch] */*/*/*.[ch]
218
219help:
220	@echo
221	@echo "Please run make with one of the following arguments"
222	@echo "all        -- to make the executable, put it in this directory"
223	@echo "clean      -- removes all '$o' and 'core' files"
224	@echo "depend     -- use makedepend to generate header-dependencies"
225	@echo "tar        -- runs clean, removes executable, and tars the whole directory"
226	@echo "compress   -- runs tar, then compresses the result"
227	@echo "zip        -- runs clean, removes executable, and zips the whole directory"
228	@echo
229
230##Miscellaneous actions
231clean:
232	rm -f WWW/Library/*/*.[aoib]
233	rm -f WWW/Library/*/.created
234	cd $(WWW_DIR) && $(MAKE_RECUR) $@
235	cd $(SRC_DIR) && $(MAKE_RECUR) $@
236@MSG_DIR_MAKE@	rm -f LYMessages.c
237@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) $@
238	rm -f *.b $(SRC_DIR)/lynx$x *.leaks cfg_defs.h LYHelp.h lint.*
239@LYNXCFG_MAKE@	-rm -f $(CFG2HTML)
240	rm -f help_files.sed
241	rm -f core *.core
242
243depend: cfg_defs.h LYHelp.h
244	cd $(WWW_DIR) && $(MAKE_RECUR) $@
245	cd $(SRC_DIR) && $(MAKE_RECUR) $@
246
247distclean: clean
248	-rm -f WWW/Library/*/*~
249	-rm -f WWW/Library/*/*.bak
250	-rm -rf $(SRC_DIR)/obsolete
251	-cd $(WWW_DIR) && $(MAKE_RECUR) $@
252	-cd $(SRC_DIR) && $(MAKE_RECUR) $@
253	-cd $(CHR_DIR) && $(MAKE_RECUR) $@
254@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) $@
255@MSG_DIR_MAKE@	-rmdir $(PO_DIR)
256	-rm -f *~ *.bak *.sav tags TAGS
257	-rm -f $(WWW_DIR)/makefile $(SRC_DIR)/makefile $(CHR_DIR)/makefile
258@SRCDIR_CLEAN@	-rmdir $(WWW_DIR) && rmdir WWW/Library && rmdir WWW
259@SRCDIR_CLEAN@	-rmdir $(CHR_DIR) && rmdir $(SRC_DIR)
260	-rm -f makefile lynx_cfg.h config.status config.log config.cache
261	-rm -f lynx$x
262
263maintainer-clean: distclean
264	-find . -type f -name '*.rej' -exec rm -f {} \;
265	-find . -type f -name '*.orig' -exec rm -f {} \;
266	-rm -rf WWW/Library/*/obsolete
267	-rm -f Lynx.prj .*_aux
268
269tar:  clean
270	rm -f lynx$x
271	$(MAKE) save
272
273turnover:	clean
274	$(MAKE) save
275
276zipcompress: compress zip
277	echo "done!"
278
279zip:  clean
280	rm -f $(SRC_DIR)/lynx$x
281	rm -f lynx$x
282	rm -f $(SRC_DIR)/a.out
283	rm -f ../$(lynxname).zip
284	cd ..; rm -f $(lynxname).zip; zip -r $(lynxname).zip $(lynxdir)
285
286save:
287	cd ..; rm -f $(lynxname).tar; $(TAR_UP) $(lynxdir) > $(lynxname).tar
288
289compress: tar
290	cd ..; rm -f $(lynxname).tar.Z; compress -f -v $(lynxname).tar
291
292# Directory containing reference source for patch generation,
293#     either absolute or relative to $(top_srcdir)/..
294REFDIR=orig/$(lynxdir)
295
296lynx.patch: $(top_srcdir) $(top_srcdir)/CHANGES
297	- cd $(top_srcdir)/.. && cd $(REFDIR) && { rm -f \
298		config.log \
299		config.status \
300		lynx_cfg.h \
301			; \
302		for I in . $(SRC_DIR) $(WWW_DIR); do ( set +e; \
303			( set -x; cd $$I && rm -f *.orig *.rej makefile ); : ); \
304		done; }
305	( cd $(top_srcdir)/..; echo "%%% Created `date` by target $@. %%%"; \
306	   if diff -bru /dev/null /dev/null;		     \
307		   then diff -bru $(REFDIR) $(lynxdir);	     \
308		   else diff -brc $(REFDIR) $(lynxdir); fi ) \
309		| grep -v '^Common' \
310		| grep -v '^Binary files ' \
311		| grep -v '^Only ' | tee $@ | egrep '^\-\-\- .*$(lynxdir)'
312
313install: install-bin install-man install-cfg @INSTALL_LSS@
314	@echo
315	@echo "Use $(MAKE) install-help to install the help-files"
316	@echo "Use $(MAKE) install-doc to install extra documentation files"
317	@echo
318
319install-full: install install-help install-doc
320	@echo Full installation complete.
321
322install-bin: $(BINDIR) lynx$x
323@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) install
324	@ECHO_CC@$(SHELL) -c \
325	'if test -f $(BINDIR)/$(binary_PROG) ; then \
326	      mv -f $(BINDIR)/$(binary_PROG) $(BINDIR)/lynx.old; fi'
327	$(INSTALL_PROGRAM) lynx$x $(BINDIR)/$(binary_PROG)
328
329install-man : $(MANDIR)
330	$(INSTALL_DATA) $(srcdir)/lynx.man $(MANDIR)/$(actual_PROG).1
331
332install-doc : $(DOCDIR) $(HELPDIR)
333	@echo Copying sample files
334	(cd $(srcdir) && $(TAR_UP) C[HO]* PROBLEMS README docs samples test ) | \
335			       ( cd $(DOCDIR) && chmod -R u+w . && $(TAR_DOWN) )
336	$(SHELL) -c 'if test "$(COMPRESS_PROG)" != "" ; then \
337		(cd $(DOCDIR) && $(COMPRESS_PROG) -f docs/CHANGES*.[0-9] docs/*.announce ) \
338	fi'
339	$(SHELL) -c 'for name in COPYING COPYHEADER; do \
340		cd $(HELPDIR) && rm -f $$name ;\
341		cd $(HELPDIR) && ( $(LN_S) $(docdir)/$$name . || cp $(DOCDIR)/$$name . );\
342		done'
343	-$(SHELL) -c 'case `id|sed -e "s/(.*//"` in uid=0) chown -R root $(DOCDIR);; esac'
344
345# HPUX 'sed' does not seem to like '=' as pattern delimiter.
346# We cannot use '%' because it may appear in a URL.
347# Andrew filesystem uses '@'.
348# So we limit sed delimiters to '!' and '%', depending on the expected text.
349FIX_SED = tr '=' '"'
350
351LYNX_URL='http://lynx.isc.org/release/lynx2-8-7'
352LYNXDOCS_URL='$(LYNX_URL)/docs/'
353LYNXHELP_URL='$(LYNX_URL)/lynx_help/'
354
355@LYNXCFG_MAKE@$(CFG2HTML) :
356@LYNXCFG_MAKE@	@echo 'Making htmlized lynx.cfg'
357@LYNXCFG_MAKE@	cd $(SRC_DIR) && $(MAKE_RECUR) LYReadCFG.i
358@LYNXCFG_MAKE@	@-rm -f $(CFG2HTML)
359@LYNXCFG_MAKE@	sed -n -e '/Config_Type  *Config_Table/,/{0, *0, *0}/ p' $(SRC_DIR)/LYReadCFG.i | \
360@LYNXCFG_MAKE@	sed  -e 's/ *{ *"\([^"]*\)".*/\1/' | \
361@LYNXCFG_MAKE@	perl $(scripts_dir)/cfg2html.pl -ams $(srcdir)/lynx.cfg
362@LYNXCFG_MAKE@	-rm -f $(SRC_DIR)/LYReadCFG.i
363
364help_files.sed : makefile $(srcdir)/lynx_help/help_files.txt
365	@echo Constructing sed-script $@
366	@-rm -f $@ help_files.tmp
367	@cat $(srcdir)/lynx_help/help_files.txt > help_files.tmp
368@LYNXDOC_MAKE@	@ECHO_CC@echo 's!$(LYNXDOCS_URL)!file://$(docdir)!g' >> help_files.tmp
369@LYNXCFG_MAKE@	@ECHO_CC@echo 's!$(LYNXHELP_URL)alphatoc.html!alphatoc.html!g' >> help_files.tmp
370@LYNXCFG_MAKE@	@ECHO_CC@echo 's!$(LYNXHELP_URL)cattoc.html!cattoc.html!g' >> help_files.tmp
371@LYNXCFG_MAKE@	@ECHO_CC@echo 's!alphatoc\.html!alphatoc.html$(COMPRESS_EXT)!g' >> help_files.tmp
372@LYNXCFG_MAKE@	@ECHO_CC@echo 's!cattoc\.html!cattoc.html$(COMPRESS_EXT)!g' >> help_files.tmp
373@LYNXCFG_MAKE@	@ECHO_CC@echo 's!body\.html!body.html$(COMPRESS_EXT)!g' >> help_files.tmp
374	@ECHO_CC@sed	-e '/^#/d' -e '/^$$/d' \
375		-e 's%\(.*\)=\(.*\@.*\)$$%s=@\1@=\2=g%' \
376		-e 's%\(.*\)=\(http:.*\)$$%s=@\1@=\2=g%' \
377		-e 's%\(.*\)=\(ftp:.*\)$$%s=@\1@=\2=g%' \
378		-e 's%\(.*\)=\(.*\.html\)$$%s=@\1@=\2$(COMPRESS_EXT)=g%' \
379		help_files.tmp | $(FIX_SED) > $@
380	@echo Appending interim-fix for existing html files to $@
381	@ECHO_CC@sed	-e '/^#/d' -e '/[:@]/d' -e '/^$$/d' \
382		-e 's%\(.*\)=\(.*\.html\)$$%s=\2=\2$(COMPRESS_EXT)=g%' \
383		-e 's%\.html=%\\.html=%' \
384		help_files.tmp | $(FIX_SED) >> $@
385	@ECHO_CC@if test -n "$(COMPRESS_EXT)"; then echo 's%\$(COMPRESS_EXT)\$(COMPRESS_EXT)%$(COMPRESS_EXT)%g' >> $@; fi
386	@-rm -f help_files.tmp
387
388install-help : $(CFG2HTML) help_files.sed $(HELPDIR)
389	-$(SHELL) -c 'if cd "$(HELPDIR)" ; then \
390		WD=`pwd` ; \
391		TAIL=`basename "$(helpdir)"` ; \
392		HEAD=`echo "$$WD"|sed -e "s,/$${TAIL}$$,,"` ; \
393		test "x$$WD" != "x$$HEAD" && rm -fr * ; \
394		fi'
395	test -d $(HELPDIR)/keystrokes || mkdir $(HELPDIR)/keystrokes
396	@echo Translating/copying html files
397@LYNXCFG_MAKE@	@$(SHELL) -c 'for f in $(CFG2HTML) ; do \
398@LYNXCFG_MAKE@		sed -f help_files.sed $$f > $(HELPDIR)/$$f ; \
399@LYNXCFG_MAKE@		done'
400	@ECHO_CC@$(SHELL) -c 'sed_prog=`pwd`/help_files.sed && \
401		cd $(srcdir)/lynx_help && \
402		dirs=keystrokes && \
403		files="*.html */*.html" && \
404		for f in $$files ; do \
405			sed -f $$sed_prog $$f > $(HELPDIR)/$$f ; \
406		done && \
407		if test "$(COMPRESS_PROG)" != "" ; then \
408			(cd $(HELPDIR) && $(COMPRESS_PROG) $$files ) \
409		fi'
410	@echo Updating $(sysconfdir)/lynx.cfg
411	@ECHO_CC@$(SHELL) -c \
412	'if test -f $(SYSCONFDIR)/lynx.cfg ; then \
413		mv $(SYSCONFDIR)/lynx.cfg $(SYSCONFDIR)/lynx.tmp ; \
414	else \
415		cp $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.tmp ; \
416	fi'
417	@echo Updating $(sysconfdir)/lynx.cfg to point to installed help-files
418	@ECHO_CC@sed	-e '/^HELPFILE:http/s!^!#!' \
419		-e '/^#HELPFILE:file/s!#!!' \
420		$(SYSCONFDIR)/lynx.tmp | \
421	$(SHELL) $(scripts_dir)/cfg_path.sh lynx_help $(helpdir) | \
422	$(SHELL) $(scripts_dir)/cfg_path.sh lynx_doc  $(helpdir) | \
423	sed	-e '/^HELPFILE:file/s!$$!$(COMPRESS_EXT)!' \
424		-e '/^HELPFILE:file/s!$(COMPRESS_EXT)$(COMPRESS_EXT)$$!$(COMPRESS_EXT)!' \
425		>$(SYSCONFDIR)/lynx.cfg
426	chmod 644 $(SYSCONFDIR)/lynx.cfg
427	-rm -f $(SYSCONFDIR)/lynx.tmp
428
429LYHelp.h : help_files.sed $(srcdir)/LYHelp.hin
430	@echo Creating $@
431	@sed -f help_files.sed $(srcdir)/LYHelp.hin > $@
432	@echo '**********************************************'
433	@echo
434	@$(SHELL) -c 'if test "$(COMPRESS_PROG)" = "" ; then \
435		echo "       Help files will NOT be gzipped."; \
436	else \
437		echo "       Help links point to compressed files"; \
438		echo "       To access them properly you have to type"; \
439		echo "                 make install-help"; \
440	fi'
441	@echo
442	@echo '**********************************************'
443
444cfg_defs.h : $(scripts_dir)/cfg_defs.sh $(scripts_dir)/cfg_edit.sh config.cache lynx_cfg.h
445	@rm -f $@
446	$(SHELL) -c 'SHELL=$(SHELL) $(SHELL) $(scripts_dir)/cfg_defs.sh $(srcdir)'
447
448install-cfg : $(SYSCONFDIR)
449	@$(SHELL) $(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.cfg
450
451install-lss : $(SYSCONFDIR)
452	@$(SHELL) $(scripts_dir)/install-lss.sh "$(INSTALL_DATA)" $(srcdir)/samples/lynx.lss $(SYSCONFDIR)/lynx.lss
453
454uninstall ::
455@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) uninstall
456	-rm -f $(BINDIR)/$(binary_PROG)
457	-rm -f $(MANDIR)/$(actual_PROG).1
458	-rm -f $(SYSCONFDIR)/lynx.cfg
459	-rm -f $(SYSCONFDIR)/lynx.lss
460
461uninstall \
462uninstall-help ::
463	-$(SHELL) -c 'if test -d "$(HELPDIR)" ; then \
464		WD=`cd "$(HELPDIR)" && pwd` ; \
465		TAIL=`basename "$(helpdir)"` ; \
466		HEAD=`echo "$$WD"|sed -e "s,/$${TAIL}$$,,"` ; \
467		test "x$$WD" != "x$$HEAD" && rm -rf "$(HELPDIR)"; \
468		fi'
469
470uninstall \
471uninstall-doc ::
472	-$(SHELL) -c 'if test -d "$(DOCDIR)" ; then \
473		WD=`cd "$(DOCDIR)" && pwd` ; \
474		TAIL=`basename "$(docdir)"` ; \
475		HEAD=`echo "$$WD"|sed -e "s,/$${TAIL}$$,,"` ; \
476		test "x$$WD" != "x$$HEAD" && rm -rf "$(DOCDIR)"; \
477		fi'
478	-$(SHELL) -c 'if test -d "$(HELPDIR)" ; then \
479		WD=`cd "$(HELPDIR)" && pwd` ; \
480		TAIL=`basename "$(helpdir)"` ; \
481		HEAD=`echo "$$WD"|sed -e "s,/'$${TAIL}'$$,,"` ; \
482		test "x$$WD" != "x$$HEAD" ; \
483		cd "$(HELPDIR)" && rm -f COPYING COPYHEADER ; \
484		fi'
485
486update-po:
487	rsync -Lrtvz  translationproject.org::tp/latest/lynx/  $(PO_SRCDIR)
488	test -f $(PO_SRCDIR)/makefile && cd $(PO_SRCDIR) && $(MAKE_RECUR) $@
489
490preinstall :
491	@ echo ''
492	@ echo '** Configuration summary for LYNX $(LYNX_VERSION):'
493	@ echo ''
494	@ echo '       program name: '$(actual_PROG)
495	@ echo ''
496	@ echo '      bin directory: '$(BINDIR)
497	@ echo '   config directory: '$(SYSCONFDIR)
498	@ echo '      man directory: '$(MANDIR)
499	@ echo '     help directory: '$(HELPDIR)
500	@ echo '      doc directory: '$(DOCDIR)
501
502$(BINDIR) \
503$(MANDIR) \
504$(SYSCONFDIR) \
505$(HELPDIR) \
506$(DOCDIR) :
507	mkdir -p $@
508