]> sjero.net Git - wget/blobdiff - doc/Makefile.in
[svn] Applied Keith Moore's patch to fix a harmless (but annoying) documentation...
[wget] / doc / Makefile.in
index 803933168f1d2927f0f3612d575c73bb1b4b51d7..d6db64a699e64822bb71df1af06e89c4a57cf6c9 100644 (file)
@@ -30,6 +30,8 @@ DVIPS = dvips -D 300
 # Program to convert texinfo files to html
 TEXI2HTML = texi2html -expandinfo -split_chapter
 
+top_builddir = ..
+
 top_srcdir = @top_srcdir@
 srcdir     = @srcdir@
 VPATH      = @srcdir@
@@ -40,13 +42,13 @@ mandir     = @mandir@
 manext     = 1
 sysconfdir = @sysconfdir@
 
-top_builddir = ..
+DESTDIR    =
 
 INSTALL      = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 RM = rm -f
 
-TEXI2POD     = ./texi2pod.pl
+TEXI2POD     = texi2pod.pl
 POD2MAN      = @POD2MAN@
 MAN          = wget.$(manext)
 WGETRC       = $(sysconfdir)/wgetrc
@@ -61,23 +63,23 @@ all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
 everything: all wget_us.ps wget_a4.ps wget_toc.html
 
 $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
-       sed s/@/@@/g $< > $@
+       sed s/@/@@/g $? > $@
 
-wget.info: $(SAMPLERCTEXI) $(srcdir)/wget.texi
-       -$(MAKEINFO)
+wget.info: $(srcdir)/wget.texi $(SAMPLERCTEXI) $(srcdir)/version.texi
+       $(MAKEINFO) -I$(srcdir) $(srcdir)/wget.texi
 
 $(TEXI2POD): $(srcdir)/$(TEXI2POD).in
-       sed s,/usr/bin/perl,@PERL@, $< > $@
+       sed 's,^#! /usr/bin/perl,#! @PERL@,' $? > $@
        chmod u+x $@
 
-wget.pod: $(srcdir)/wget.texi texi2pod.pl
-       $(TEXI2POD) $< $@
+wget.pod: $(srcdir)/wget.texi $(TEXI2POD) $(srcdir)/version.texi
+       ./$(TEXI2POD) $(srcdir)/wget.texi $@
 
 $(MAN): wget.pod
-       $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $< > $@
+       $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $? > $@
 
 #wget.cat: $(MAN)
-#      nroff -man $< > $@
+#      nroff -man $? > $@
 
 dvi: wget.dvi
 
@@ -104,46 +106,55 @@ install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man
 uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man
 
 # install info pages, creating install directory if necessary
+# if the info pages are built in the build directory, they are used.
+# otherwise, the ones from the distribution are installed.
 install.info: wget.info
-       $(top_srcdir)/mkinstalldirs $(infodir)
-       -for file in wget.info wget.info-*[0-9]; do \
-          test -f $$file && $(INSTALL_DATA) $$file $(infodir)/$$file ; \
-       done
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
+       -if test -f wget.info; then \
+         for file in wget.info wget.info-*[0-9]; do \
+            if test -f "$$file"; then \
+             $(INSTALL_DATA) "$$file" "$(DESTDIR)$(infodir)/$$file" ; \
+           fi; \
+         done; \
+       else \
+         for file in $(srcdir)/wget.info $(srcdir)/wget.info-*[0-9]; do \
+            if test -f "$$file"; then \
+             $(INSTALL_DATA) "$$file" "$(DESTDIR)$(infodir)/`basename $$file`" ; \
+           fi; \
+         done; \
+       fi
 
 # 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) $(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 ""; \
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
+       @if test -f $(DESTDIR)$(WGETRC); then \
+         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; \
-            echo "<Hit RETURN to acknowledge>\c"; \
-            read user_input; \
+            echo "         \`$(DESTDIR)$(WGETRC).new'."; \
             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