From 83fe8f3597ea0935d5988ad6aec15ad8dfd5adbb Mon Sep 17 00:00:00 2001 From: hniksic Date: Thu, 12 Apr 2001 05:25:22 -0700 Subject: [PATCH] [svn] "Support DESTDIR when installing. Patch courtesy Karl Eichwalder. Published in . --- doc/ChangeLog | 5 +++++ doc/Makefile.in | 26 ++++++++++++++------------ po/Makefile.in.in | 16 ++++++++++------ src/ChangeLog | 5 +++++ src/Makefile.in | 8 +++++--- 5 files changed, 39 insertions(+), 21 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 123d30ec..bcbcd16e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2001-01-20 Karl Eichwalder + + * Makefile.in: Provide and use DESTDIR according to the Coding + Standards. + 2001-04-01 Hrvoje Niksic * wget.texi (Recursive Retrieval Options): Document more diff --git a/doc/Makefile.in b/doc/Makefile.in index 0d881967..4cc7ec4a 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -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 "\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 diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 59d1ddef..5c2d929d 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog index cc4f276b..1e543cbb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-01-20 Karl Eichwalder + + * Makefile.in: Provide and use DESTDIR according to the Coding + Standards. + 2001-04-12 Hrvoje Niksic * ftp-ls.c (ftp_parse_vms_ls): Make seconds optional in time diff --git a/src/Makefile.in b/src/Makefile.in index 08b546b7..4a440aa9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -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 -- 2.39.2