[svn] "Support DESTDIR when installing.

Patch courtesy Karl Eichwalder.
Published in <sxs4rvu2tmu.fsf@florida.arsdigita.de>.
This commit is contained in:
hniksic 2001-04-12 05:25:22 -07:00
parent a98337f827
commit 83fe8f3597
5 changed files with 39 additions and 21 deletions

View File

@ -1,3 +1,8 @@
2001-01-20 Karl Eichwalder <ke@suse.de>
* Makefile.in: Provide and use DESTDIR according to the Coding
Standards.
2001-04-01 Hrvoje Niksic <hniksic@arsdigita.com>
* wget.texi (Recursive Retrieval Options): Document more

View File

@ -42,6 +42,8 @@ mandir = @mandir@
manext = 1
sysconfdir = @sysconfdir@
DESTDIR =
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
RM = rm -f
@ -105,45 +107,45 @@ uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
# install info pages, creating install directory if necessary
install.info: wget.info
$(top_srcdir)/mkinstalldirs $(infodir)
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
-for file in wget.info wget.info-*[0-9]; do \
test -f $$file && $(INSTALL_DATA) $$file $(infodir)/$$file ; \
test -f $$file && $(INSTALL_DATA) $$file $(DESTDIR)$(infodir)/$$file ; \
done
# install man page, creating install directory if necessary
install.man: $(MAN)
$(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
$(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN)
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man$(manext)
$(INSTALL_DATA) $(srcdir)/$(MAN) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
# install sample.wgetrc
install.wgetrc: $(srcdir)/sample.wgetrc
$(top_srcdir)/mkinstalldirs $(sysconfdir)
@if test -f $(WGETRC); then \
if cmp -s $(srcdir)/sample.wgetrc $(WGETRC); then echo ""; \
if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
else \
echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
$(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
$(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new; \
echo; \
echo "WARNING: Differing \`$(WGETRC)'"; \
echo "WARNING: Differing \`$(DESTDIR)$(WGETRC)'"; \
echo " exists and has been spared. You might want to"; \
echo " consider merging in the new lines from"; \
echo " \`$(WGETRC).new'."; \
echo " \`$(DESTDIR)$(WGETRC).new'."; \
echo; \
echo "<Hit RETURN to acknowledge>\c"; \
read user_input; \
echo; \
fi; \
else \
$(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
$(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
fi
# uninstall info pages
uninstall.info:
$(RM) $(infodir)/wget.info*
$(RM) $(DESTDIR)$(infodir)/wget.info*
# uninstall man page
uninstall.man:
$(RM) $(mandir)/man$(manext)/$(MAN)
$(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)
#
# Dependencies for cleanup

View File

@ -26,6 +26,8 @@ gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
DESTDIR =
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@ -94,8 +96,8 @@ install-data-yes: all
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
*.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
*) destdir=$(DESTDIR)$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
@ -137,10 +139,12 @@ uninstall:
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
rm -f $$dir/$(PACKAGE)$(INSTOBJEXT); \
rm -f $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
dir=$(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES; \
rm -f $$dir/$(PACKAGE)$(INSTOBJEXT); \
rm -f $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
done
rm -f $(gettextsrcdir)/po-Makefile.in.in

View File

@ -1,3 +1,8 @@
2001-01-20 Karl Eichwalder <ke@suse.de>
* Makefile.in: Provide and use DESTDIR according to the Coding
Standards.
2001-04-12 Hrvoje Niksic <hniksic@arsdigita.com>
* ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time

View File

@ -35,6 +35,8 @@ bindir = @bindir@
sysconfdir = @sysconfdir@
localedir = $(prefix)/share/locale
DESTDIR =
CC = @CC@
CPPFLAGS = @CPPFLAGS@
# The following line is losing on some versions of make!
@ -104,11 +106,11 @@ install: install.bin
uninstall: uninstall.bin
install.bin: wget$(exeext)
$(top_srcdir)/mkinstalldirs $(bindir)
$(INSTALL_PROGRAM) wget$(exeext) $(bindir)/wget$(exeext)
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) wget$(exeext) $(DESTDIR)$(bindir)/wget$(exeext)
uninstall.bin:
$(RM) $(bindir)/wget$(exeext)
$(RM) $(DESTDIR)$(bindir)/wget$(exeext)
#
# Dependencies for cleanup