makefile.in 17.1 KB
Newer Older
1
# $LynxId: makefile.in,v 1.125 2012/08/12 23:54:35 tom Exp $
2 3 4 5 6 7 8 9 10 11 12
##makefile for lynx

SHELL		= @CONFIG_SHELL@
CDPATH		= .

.SUFFIXES:
@SET_MAKE@
prefix		= @prefix@
exec_prefix	= @exec_prefix@
top_srcdir	= @top_srcdir@
srcdir		= @srcdir@
13
builddir	= .
14 15 16 17 18 19 20
VPATH		= $(srcdir)

CC		= @CC@
CFLAGS		= @CFLAGS@
DEFS		= @DEFS@
CPPFLAGS	= @CPPFLAGS@
LINT		= @LINT@
21
ETAGS		= @ETAGS@
22

23 24 25
x		= @EXEEXT@
o		= .@OBJEXT@

26
LDFLAGS		= @EXTRA_LDFLAGS@ @LDFLAGS@
27 28 29 30 31
LIBS		= @LIBS@

INSTALL		= @INSTALL@
INSTALL_PROGRAM	= @INSTALL_PROGRAM@
INSTALL_DATA	= @INSTALL_DATA@
32
transform	= @program_transform_name@
33

34 35
LN_S		= @LN_S@

36 37 38 39
TAR		= @TAR@
TAR_UP		= $(TAR) @TAR_UP_OPTIONS@ @TAR_PIPE_OPTIONS@
TAR_DOWN	= $(TAR) @TAR_DOWN_OPTIONS@ @TAR_PIPE_OPTIONS@

40
# $Format: "LYNX_VERSION	= $ProjectVersion$"$
41
LYNX_VERSION	= 2.8.8dev.14
42

43 44
## 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.
45
VERSION		= 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)
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
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= @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
65 66
sysconfdir= @sysconfdir@
SYSCONFDIR= $(DESTDIR)$(sysconfdir)
67 68

## Where you want the doc-files installed
69
datarootdir= @datarootdir@
70 71
docdir    = @datadir@/lynx_doc
DOCDIR    = $(DESTDIR)$(docdir)
72 73

## Where you want the help-files installed
74 75
helpdir   = @datadir@/lynx_help
HELPDIR   = $(DESTDIR)$(helpdir)
76 77 78 79

##set the relative location of the WWW library Implementation directory,
##from this directory
##do not set this to be an absolute path!!!
80 81 82 83 84 85 86 87 88 89 90 91 92 93
WWW_DIR   = $(builddir)/WWW/Library/Implementation

##set the relative location of the message-file directory
##do not set this to be an absolute path!!!
PO_DIR    = $(builddir)/po
PO_SRCDIR = $(srcdir)/po

##set the relative location of the main source-directory
##do not set this to be an absolute path!!!
SRC_DIR   = $(builddir)/src

##set the relative location of the character-translation data directory
##do not set this to be an absolute path!!!
CHR_DIR   = $(SRC_DIR)/chrtrans
94 95 96 97 98 99 100

## Path to gzip that will compress the help files.
## It will be used when --enable-gzip-help is set by configure.
## Leave *both* empty if you don't want to gzip help files.
COMPRESS_PROG=@COMPRESS_PROG@
COMPRESS_EXT=@COMPRESS_EXT@

101 102 103
# Path of scripts directory
scripts_dir=$(srcdir)/scripts

104
MAKE_RECUR = $(MAKE) @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" CC="$(CC)"
105

106 107
@LYNXCFG_MAKE@CFG2HTML = alphatoc.html body.html cattoc.html

108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
# !!!!!!!!!!! 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
# "Alert!:  Unable to connect to remote host" whenever you try to
# access a host other than localhost and have made Lynx without it.
# See the PROBLEMS file for more information.
#RESOLVLIB= -lresolv

# !!!!!!!!!!!!!  DIRECT WAIS ACCESS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# If you are adding direct wais access you must fill in the
# location of wais.a, client.a and the standard math library, libm.a.
# You can pick up the most current freeWAIS sources from
#	ftp://ftp.cnidr.org/pub/NIDR.tools/freewais
# If you are using freeWAIS-0.202 or older, include -DDECLARE_WAIS_LOGFILES
# in your SITE_DEFS.
# Please put an ABSOLUTE address here if you want it to work!
#WAISLIB= ../../freeWAIS-0.202/bin/client.a ../../freeWAIS-0.202/bin/wais.a /usr/lib/libm.a

# !!!!!!!!!!!!! SLANG Support (For color version of Lynx). !!!!!!!!!!!!!!!!
# The slang library is an alternative to curses, developed by John E. Davis
# (davis@space.mit.edu).  Version 0.99-27 or higher is available from
#	ftp://space.mit.edu/pub/davis
# It provides color support for Lynx.

# !!!!!!!!!!!!! NCURSES Support (For color version of Lynx). !!!!!!!!!!!!!!
# If you need ncurses, the latest version can always be found
# in ftp://invisible-island.net/ncurses/
# or ftp://ftp.gnu.org/pub/gnu/

# Also be sure to check out the compilation symbols in userdefs.h
# before building Lynx!

# If you apply patches which require linking to site-specific libraries, set
# SITE_LIBS to those libraries.
SITE_LIBS= # Your libraries here

# Set SITE_LYDEFS to one or more of the defines for the WWW Library:
SITE_LYDEFS = # Your defines here

# Set SITE_DEFS to one or more of the defines for lynx below:
SITE_DEFS = # Your defines here

# defines for which there are no configure options:
# -DHP_TERMINAL    For DIM workaround to REVERSE problems on HP terminals.
# -DIGNORE_CTRL_C  Define if Control-C shouldn't exit lynx.
# -DNO_RULES       Disables CERN-style access rules (see lynx.cfg).
154
# -DMISC_EXP       Enable some truly experimental stuff
155 156
# -DSHORTENED_RBIND  For a SOCKSified lynx with the short version of Rbind.
# -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only)
157
# -DUSE_VASPRINT   Use vasprintf() function
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
#
# if you are linking to freeWAIS-0.202 or older, you should define this
# in SITE_DEFS
#
# -DDECLARE_WAIS_LOGFILES
#
# if you have the reverse clear screen problem of some SUN4 systems you
# should define this in SITE_DEFS
#
# -DREVERSE_CLEAR_SCREEN_PROBLEM
#
# if you have an SVR4 system with the "type any key" problem, try defining
# this in LYFLAGS (SITE_LYDEFS) and SITE_DEFS
#
# -DSVR4_BSDSELECT
#
# Old Data General systems may need this in their SITE_LYDEFS
# for their inet_addr(host) calls.
#
# -DDGUX_OLD

179
# Many other defines have configure options  (see INSTALLATION, Section II-1c.):
180 181 182
#
# for installation of local execution links, please see the file userdefs.h

183 184 185 186 187 188 189 190
WWW_CFLAGS = \
	LY_CFLAGS="$(CFLAGS)" \
	CPPFLAGS="$(CPPFLAGS)" \
	LYFLAGS="$(SITE_LYDEFS)"

SRC_CFLAGS = \
	CFLAGS="$(CFLAGS)" \
	CPPFLAGS="$(CPPFLAGS)" \
191
	LDFLAGS="$(LDFLAGS)" \
192 193
	LIBS="$(LIBS) $(RESOLVLIB) $(WAISLIB) $(SITE_LIBS)" \
	SITE_DEFS="$(SITE_DEFS)" \
194 195
	WWWINC=$(WWW_DIR) \
	WWWLIB="../$(WWW_DIR)/libwww.a"
196

197 198 199
actual_PROG  = `echo lynx|    sed '$(transform)'`
binary_PROG  = $(actual_PROG)$x

200
all lynx$x: cfg_defs.h LYHelp.h
201
@MSG_DIR_MAKE@	$(SHELL) $(scripts_dir)/fixtext.sh $(srcdir)/LYMessages_en.h >LYMessages.c
202 203 204
@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR)
	cd $(WWW_DIR) && $(MAKE_RECUR) $(WWW_CFLAGS)
	cd $(SRC_DIR) && $(MAKE_RECUR) all $(SRC_CFLAGS)
205 206

lint:
207 208
	cd $(WWW_DIR) && $(MAKE_RECUR) LINT="$(LINT)" $(WWW_CFLAGS) $@
	cd $(SRC_DIR) && $(MAKE_RECUR) LINT="$(LINT)" $(SRC_CFLAGS) $@
209
	cd $(CHR_DIR) && $(MAKE_RECUR) LINT="$(LINT)" $@
210

211 212 213 214 215 216 217 218
tags:
	cd $(WWW_DIR) && $(MAKE_RECUR) $(WWW_CFLAGS) $@
	cd $(SRC_DIR) && $(MAKE_RECUR) $(SRC_CFLAGS) $@
	cd $(CHR_DIR) && $(MAKE_RECUR) $@

etags:
	$(ETAGS) *.[ch] */*.[ch] */*/*.[ch] */*/*/*.[ch]

219 220 221 222
help:
	@echo
	@echo "Please run make with one of the following arguments"
	@echo "all        -- to make the executable, put it in this directory"
223
	@echo "clean      -- removes all '$o' and 'core' files"
224 225 226 227 228 229 230 231 232 233
	@echo "depend     -- use makedepend to generate header-dependencies"
	@echo "tar        -- runs clean, removes executable, and tars the whole directory"
	@echo "compress   -- runs tar, then compresses the result"
	@echo "zip        -- runs clean, removes executable, and zips the whole directory"
	@echo

##Miscellaneous actions
clean:
	rm -f WWW/Library/*/*.[aoib]
	rm -f WWW/Library/*/.created
234 235
	cd $(WWW_DIR) && $(MAKE_RECUR) $@
	cd $(SRC_DIR) && $(MAKE_RECUR) $@
236
@MSG_DIR_MAKE@	rm -f LYMessages.c
237 238
@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) $@
	rm -f *.b $(SRC_DIR)/lynx$x *.leaks cfg_defs.h LYHelp.h lint.*
239
@LYNXCFG_MAKE@	-rm -f $(CFG2HTML)
240 241 242 243
	rm -f help_files.sed
	rm -f core *.core

depend: cfg_defs.h LYHelp.h
244 245
	cd $(WWW_DIR) && $(MAKE_RECUR) $@
	cd $(SRC_DIR) && $(MAKE_RECUR) $@
246 247 248 249

distclean: clean
	-rm -f WWW/Library/*/*~
	-rm -f WWW/Library/*/*.bak
250 251 252 253 254 255
	-rm -rf $(SRC_DIR)/obsolete
	-cd $(WWW_DIR) && $(MAKE_RECUR) $@
	-cd $(SRC_DIR) && $(MAKE_RECUR) $@
	-cd $(CHR_DIR) && $(MAKE_RECUR) $@
@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) $@
@MSG_DIR_MAKE@	-rmdir $(PO_DIR)
256
	-rm -f *~ *.bak *.sav tags TAGS
257 258 259
	-rm -f $(WWW_DIR)/makefile $(SRC_DIR)/makefile $(CHR_DIR)/makefile
@SRCDIR_CLEAN@	-rmdir $(WWW_DIR) && rmdir WWW/Library && rmdir WWW
@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 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279

maintainer-clean: distclean
	-find . -type f -name '*.rej' -exec rm -f {} \;
	-find . -type f -name '*.orig' -exec rm -f {} \;
	-rm -rf WWW/Library/*/obsolete
	-rm -f Lynx.prj .*_aux

tar:  clean
	rm -f lynx$x
	$(MAKE) save

turnover:	clean
	$(MAKE) save

zipcompress: compress zip
	echo "done!"

zip:  clean
280
	rm -f $(SRC_DIR)/lynx$x
281
	rm -f lynx$x
282
	rm -f $(SRC_DIR)/a.out
283 284 285 286
	rm -f ../$(lynxname).zip
	cd ..; rm -f $(lynxname).zip; zip -r $(lynxname).zip $(lynxdir)

save:
287
	cd ..; rm -f $(lynxname).tar; $(TAR_UP) $(lynxdir) > $(lynxname).tar
288 289 290 291 292 293 294 295 296 297 298 299 300 301

compress: tar
	cd ..; rm -f $(lynxname).tar.Z; compress -f -v $(lynxname).tar

# Directory containing reference source for patch generation,
#     either absolute or relative to $(top_srcdir)/..
REFDIR=orig/$(lynxdir)

lynx.patch: $(top_srcdir) $(top_srcdir)/CHANGES
	- cd $(top_srcdir)/.. && cd $(REFDIR) && { rm -f \
		config.log \
		config.status \
		lynx_cfg.h \
			; \
302
		for I in . $(SRC_DIR) $(WWW_DIR); do ( set +e; \
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
			( set -x; cd $$I && rm -f *.orig *.rej makefile ); : ); \
		done; }
	( cd $(top_srcdir)/..; echo "%%% Created `date` by target $@. %%%"; \
	   if diff -bru /dev/null /dev/null;		     \
		   then diff -bru $(REFDIR) $(lynxdir);	     \
		   else diff -brc $(REFDIR) $(lynxdir); fi ) \
		| grep -v '^Common' \
		| grep -v '^Binary files ' \
		| grep -v '^Only ' | tee $@ | egrep '^\-\-\- .*$(lynxdir)'

install: install-bin install-man install-cfg @INSTALL_LSS@
	@echo
	@echo "Use $(MAKE) install-help to install the help-files"
	@echo "Use $(MAKE) install-doc to install extra documentation files"
	@echo

install-full: install install-help install-doc
	@echo Full installation complete.

install-bin: $(BINDIR) lynx$x
323
@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) install
324
	@ECHO_CC@$(SHELL) -c \
325 326 327
	'if test -f $(BINDIR)/$(binary_PROG) ; then \
	      mv -f $(BINDIR)/$(binary_PROG) $(BINDIR)/lynx.old; fi'
	$(INSTALL_PROGRAM) lynx$x $(BINDIR)/$(binary_PROG)
328 329

install-man : $(MANDIR)
330
	$(INSTALL_DATA) $(srcdir)/lynx.man $(MANDIR)/$(actual_PROG).1
331 332 333

install-doc : $(DOCDIR) $(HELPDIR)
	@echo Copying sample files
334 335 336 337 338
	(cd $(srcdir) && $(TAR_UP) C[HO]* PROBLEMS README docs samples test ) | \
			       ( cd $(DOCDIR) && chmod -R u+w . && $(TAR_DOWN) )
	$(SHELL) -c 'if test "$(COMPRESS_PROG)" != "" ; then \
		(cd $(DOCDIR) && $(COMPRESS_PROG) -f docs/CHANGES*.[0-9] docs/*.announce ) \
	fi'
339 340
	$(SHELL) -c 'for name in COPYING COPYHEADER; do \
		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 346 347 348 349 350

# HPUX 'sed' does not seem to like '=' as pattern delimiter.
# We cannot use '%' because it may appear in a URL.
# Andrew filesystem uses '@'.
# So we limit sed delimiters to '!' and '%', depending on the expected text.
FIX_SED = tr '=' '"'

351
LYNX_URL='http://lynx.isc.org/release/lynx2-8-7'
352 353
LYNXDOCS_URL='$(LYNX_URL)/docs/'
LYNXHELP_URL='$(LYNX_URL)/lynx_help/'
354

355 356 357 358 359 360
@LYNXCFG_MAKE@$(CFG2HTML) :
@LYNXCFG_MAKE@	@echo 'Making htmlized lynx.cfg'
@LYNXCFG_MAKE@	cd $(SRC_DIR) && $(MAKE_RECUR) LYReadCFG.i
@LYNXCFG_MAKE@	@-rm -f $(CFG2HTML)
@LYNXCFG_MAKE@	sed -n -e '/Config_Type  *Config_Table/,/{0, *0, *0}/ p' $(SRC_DIR)/LYReadCFG.i | \
@LYNXCFG_MAKE@	sed  -e 's/ *{ *"\([^"]*\)".*/\1/' | \
361
@LYNXCFG_MAKE@	perl $(scripts_dir)/cfg2html.pl -ams $(srcdir)/lynx.cfg
362 363
@LYNXCFG_MAKE@	-rm -f $(SRC_DIR)/LYReadCFG.i

364 365 366 367
help_files.sed : makefile $(srcdir)/lynx_help/help_files.txt
	@echo Constructing sed-script $@
	@-rm -f $@ help_files.tmp
	@cat $(srcdir)/lynx_help/help_files.txt > help_files.tmp
368 369 370 371 372 373
@LYNXDOC_MAKE@	@ECHO_CC@echo 's!$(LYNXDOCS_URL)!file://$(docdir)!g' >> help_files.tmp
@LYNXCFG_MAKE@	@ECHO_CC@echo 's!$(LYNXHELP_URL)alphatoc.html!alphatoc.html!g' >> help_files.tmp
@LYNXCFG_MAKE@	@ECHO_CC@echo 's!$(LYNXHELP_URL)cattoc.html!cattoc.html!g' >> help_files.tmp
@LYNXCFG_MAKE@	@ECHO_CC@echo 's!alphatoc\.html!alphatoc.html$(COMPRESS_EXT)!g' >> help_files.tmp
@LYNXCFG_MAKE@	@ECHO_CC@echo 's!cattoc\.html!cattoc.html$(COMPRESS_EXT)!g' >> help_files.tmp
@LYNXCFG_MAKE@	@ECHO_CC@echo 's!body\.html!body.html$(COMPRESS_EXT)!g' >> help_files.tmp
374 375 376 377 378 379 380 381 382 383 384
	@ECHO_CC@sed	-e '/^#/d' -e '/^$$/d' \
		-e 's%\(.*\)=\(.*\@.*\)$$%s=@\1@=\2=g%' \
		-e 's%\(.*\)=\(http:.*\)$$%s=@\1@=\2=g%' \
		-e 's%\(.*\)=\(ftp:.*\)$$%s=@\1@=\2=g%' \
		-e 's%\(.*\)=\(.*\.html\)$$%s=@\1@=\2$(COMPRESS_EXT)=g%' \
		help_files.tmp | $(FIX_SED) > $@
	@echo Appending interim-fix for existing html files to $@
	@ECHO_CC@sed	-e '/^#/d' -e '/[:@]/d' -e '/^$$/d' \
		-e 's%\(.*\)=\(.*\.html\)$$%s=\2=\2$(COMPRESS_EXT)=g%' \
		-e 's%\.html=%\\.html=%' \
		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 387
	@-rm -f help_files.tmp

388
install-help : $(CFG2HTML) help_files.sed $(HELPDIR)
389 390 391 392 393 394
	-$(SHELL) -c 'if cd "$(HELPDIR)" ; then \
		WD=`pwd` ; \
		TAIL=`basename "$(helpdir)"` ; \
		HEAD=`echo "$$WD"|sed -e "s,/$${TAIL}$$,,"` ; \
		test "x$$WD" != "x$$HEAD" && rm -fr * ; \
		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 401 402 403
	@ECHO_CC@$(SHELL) -c 'sed_prog=`pwd`/help_files.sed && \
		cd $(srcdir)/lynx_help && \
		dirs=keystrokes && \
		files="*.html */*.html" && \
404
		for f in $$files ; do \
405 406
			sed -f $$sed_prog $$f > $(HELPDIR)/$$f ; \
		done && \
407 408
		if test "$(COMPRESS_PROG)" != "" ; then \
			(cd $(HELPDIR) && $(COMPRESS_PROG) $$files ) \
409
		fi'
410
	@echo Updating $(sysconfdir)/lynx.cfg
411 412
	@ECHO_CC@$(SHELL) -c \
	'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 419
	@ECHO_CC@sed	-e '/^HELPFILE:http/s!^!#!' \
		-e '/^#HELPFILE:file/s!#!!' \
420
		$(SYSCONFDIR)/lynx.tmp | \
421 422 423
	$(SHELL) $(scripts_dir)/cfg_path.sh lynx_help $(helpdir) | \
	$(SHELL) $(scripts_dir)/cfg_path.sh lynx_doc  $(helpdir) | \
	sed	-e '/^HELPFILE:file/s!$$!$(COMPRESS_EXT)!' \
424
		-e '/^HELPFILE:file/s!$(COMPRESS_EXT)$(COMPRESS_EXT)$$!$(COMPRESS_EXT)!' \
425 426 427
		>$(SYSCONFDIR)/lynx.cfg
	chmod 644 $(SYSCONFDIR)/lynx.cfg
	-rm -f $(SYSCONFDIR)/lynx.tmp
428

429
LYHelp.h : help_files.sed $(srcdir)/LYHelp.hin
430 431 432 433 434 435 436 437 438 439 440 441 442 443
	@echo Creating $@
	@sed -f help_files.sed $(srcdir)/LYHelp.hin > $@
	@echo '**********************************************'
	@echo
	@$(SHELL) -c 'if test "$(COMPRESS_PROG)" = "" ; then \
		echo "       Help files will NOT be gzipped."; \
	else \
		echo "       Help links point to compressed files"; \
		echo "       To access them properly you have to type"; \
		echo "                 make install-help"; \
	fi'
	@echo
	@echo '**********************************************'

444
cfg_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

448 449
install-cfg : $(SYSCONFDIR)
	@$(SHELL) $(scripts_dir)/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(SYSCONFDIR)/lynx.cfg
450

451
install-lss : $(SYSCONFDIR)
452
	@$(SHELL) $(scripts_dir)/install-lss.sh "$(INSTALL_DATA)" $(srcdir)/samples/lynx.lss $(SYSCONFDIR)/lynx.lss
453 454

uninstall ::
455
@MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) uninstall
456 457
	-rm -f $(BINDIR)/$(binary_PROG)
	-rm -f $(MANDIR)/$(actual_PROG).1
458 459
	-rm -f $(SYSCONFDIR)/lynx.cfg
	-rm -f $(SYSCONFDIR)/lynx.lss
460 461 462

uninstall \
uninstall-help ::
463 464 465 466 467 468
	-$(SHELL) -c 'if test -d "$(HELPDIR)" ; then \
		WD=`cd "$(HELPDIR)" && pwd` ; \
		TAIL=`basename "$(helpdir)"` ; \
		HEAD=`echo "$$WD"|sed -e "s,/$${TAIL}$$,,"` ; \
		test "x$$WD" != "x$$HEAD" && rm -rf "$(HELPDIR)"; \
		fi'
469 470 471

uninstall \
uninstall-doc ::
472 473 474 475 476 477 478 479 480 481 482 483 484
	-$(SHELL) -c 'if test -d "$(DOCDIR)" ; then \
		WD=`cd "$(DOCDIR)" && pwd` ; \
		TAIL=`basename "$(docdir)"` ; \
		HEAD=`echo "$$WD"|sed -e "s,/$${TAIL}$$,,"` ; \
		test "x$$WD" != "x$$HEAD" && rm -rf "$(DOCDIR)"; \
		fi'
	-$(SHELL) -c 'if test -d "$(HELPDIR)" ; then \
		WD=`cd "$(HELPDIR)" && pwd` ; \
		TAIL=`basename "$(helpdir)"` ; \
		HEAD=`echo "$$WD"|sed -e "s,/'$${TAIL}'$$,,"` ; \
		test "x$$WD" != "x$$HEAD" ; \
		cd "$(HELPDIR)" && rm -f COPYING COPYHEADER ; \
		fi'
485

486 487 488 489
update-po:
	rsync -Lrtvz  translationproject.org::tp/latest/lynx/  $(PO_SRCDIR)
	test -f $(PO_SRCDIR)/makefile && cd $(PO_SRCDIR) && $(MAKE_RECUR) $@

490 491 492 493 494 495 496 497 498 499 500 501
preinstall :
	@ echo ''
	@ echo '** Configuration summary for LYNX $(LYNX_VERSION):'
	@ echo ''
	@ echo '       program name: '$(actual_PROG)
	@ echo ''
	@ echo '      bin directory: '$(BINDIR)
	@ echo '   config directory: '$(SYSCONFDIR)
	@ echo '      man directory: '$(MANDIR)
	@ echo '     help directory: '$(HELPDIR)
	@ echo '      doc directory: '$(DOCDIR)

502 503
$(BINDIR) \
$(MANDIR) \
504
$(SYSCONFDIR) \
505 506
$(HELPDIR) \
$(DOCDIR) :
507
	mkdir -p $@