From 776d65e829e72ba5af69bcba44251fc0f81a18d4 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 22 Feb 2001 18:09:36 -0800 Subject: [PATCH] [svn] * configure.in: Look for perl and pod2man and make substitutions. * Makefile.in (install): Do install.man if we have pod2man. * Makefile.in: Make wget man page and install it if we have pod2man. Added some missing '$(srcdir)/'s. Added missing dependencies on install targets (allowing you to just do `make install' rather than forcing you to do `make && make install'). Also, Makefile rules should always use output file parameters if available rather than redirecting stdout with '>', or you falsely satisfy dependencies if the tool you're running is missing or fails -- fixed call of texi2pod.pl that did this wrong. * texi2pod.pl: Removed from CVS. Now automatically generated. * texi2pod.pl.in: This new file is processed into texi2pod.pl, getting the appropriate path to the Perl 5+ executable on this system and becoming executable (CVS files, by contrast, don't arrive executable). --- ChangeLog | 4 ++++ Makefile.in | 3 ++- TODO | 6 ------ configure.in | 14 ++++++++++++++ doc/ChangeLog | 18 +++++++++++++++++ doc/Makefile.in | 30 +++++++++++++++-------------- doc/{texi2pod.pl => texi2pod.pl.in} | 2 +- 7 files changed, 55 insertions(+), 22 deletions(-) rename doc/{texi2pod.pl => texi2pod.pl.in} (99%) diff --git a/ChangeLog b/ChangeLog index 21c6f259..d8be523f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * TODO: Remove empty directories created due to --accept/--reject. + * configure.in: Look for perl and pod2man and make substitutions. + + * Makefile.in (install): Do install.man if we have pod2man. + 2001-02-13 Jan Prikryl * windows/Makefile.src: Removed references to ftpparse sources. diff --git a/Makefile.in b/Makefile.in index 17c95212..248a72ab 100644 --- a/Makefile.in +++ b/Makefile.in @@ -80,7 +80,8 @@ $(SUBDIRS): FORCE cd $@ && $(MAKE) $(MAKEDEFS) # install everything -install: install.bin install.info install.wgetrc install.mo # install.man +install: install.bin install.info install.wgetrc \ + install.mo @COMMENT_IF_NO_POD2MAN@install.man # install/uninstall the binary install.bin uninstall.bin: diff --git a/TODO b/TODO index 2f313916..73d460da 100644 --- a/TODO +++ b/TODO @@ -7,12 +7,6 @@ items are not listed in any particular order (except that recently-added items may tend towards the top). Not all of these represent user-visible changes. -* It would be nice to have a simple man page for wget that refers you to the - .info files for more information. It could be as simple as the output of wget - --help plus some boilerplate. This should stop wget re-packagers like RedHat - who include the out-of-date 1.4.5 man page in order to have one. Perhaps we - can automatically generate a man page from the .texi file like gcc does? - * Try to devise a scheme so that, when password is unknown, Wget asks the user for one. diff --git a/configure.in b/configure.in index a715746e..71c0029f 100644 --- a/configure.in +++ b/configure.in @@ -224,6 +224,20 @@ case "${MAKEINFO}" in *) MAKEINFO="makeinfo \$(srcdir)/wget.texi" ;; esac +dnl +dnl Find perl and pod2man +dnl + +AC_PATH_PROGS(PERL, perl5 perl, no) +AC_PATH_PROG(POD2MAN, pod2man, no) + +if test "x${POD2MAN}" = xno; then + COMMENT_IF_NO_POD2MAN="# " +else + COMMENT_IF_NO_POD2MAN= +fi +AC_SUBST(COMMENT_IF_NO_POD2MAN) + dnl dnl Create output dnl diff --git a/doc/ChangeLog b/doc/ChangeLog index 156fac8e..869dbab1 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,21 @@ +2001-02-22 Dan Harkless + + * Makefile.in: Make wget man page and install it if we have + pod2man. Added some missing '$(srcdir)/'s. Added missing + dependencies on install targets (allowing you to just do `make + install' rather than forcing you to do `make && make install'). + Also, Makefile rules should always use output file parameters if + available rather than redirecting stdout with '>', or you falsely + satisfy dependencies if the tool you're running is missing or + fails -- fixed call of texi2pod.pl that did this wrong. + + * texi2pod.pl: Removed from CVS. Now automatically generated. + + * texi2pod.pl.in: This new file is processed into texi2pod.pl, + getting the appropriate path to the Perl 5+ executable on this + system and becoming executable (CVS files, by contrast, don't + arrive executable). + 2001-02-19 Dan Harkless * wget.texi (Download Options): Further improvement to --continue diff --git a/doc/Makefile.in b/doc/Makefile.in index e170e936..a410d97e 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -45,7 +45,7 @@ INSTALL_DATA = @INSTALL_DATA@ RM = rm -f TEXI2POD = ./texi2pod.pl -POD2MAN = pod2man +POD2MAN = @POD2MAN@ MAN = wget.$(manext) WGETRC = $(sysconfdir)/wgetrc SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion @@ -54,30 +54,32 @@ SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion # Dependencies for building # -all: wget.info +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 $< > $@ -wget.info: $(SAMPLERCTEXI) wget.texi +wget.info: $(SAMPLERCTEXI) $(srcdir)/wget.texi -$(MAKEINFO) -wget.pod: wget.texi - $(TEXI2POD) $< > $@ +$(TEXI2POD): $(srcdir)/$(TEXI2POD).in + sed s^/usr/bin/perl^@PERL@^ $< > $@ + chmod u+x $@ + +wget.pod: $(srcdir)/wget.texi texi2pod.pl + $(TEXI2POD) $< $@ $(MAN): wget.pod $(POD2MAN) --center="GNU Wget" --release="GNU Wget @VERSION@" $< > $@ -man: $(MAN) - #wget.cat: $(MAN) # nroff -man $< > $@ dvi: wget.dvi -wget.dvi: wget.texi +wget.dvi: $(srcdir)/wget.texi $(TEXI2DVI) $(srcdir)/wget.texi wget_us.ps: wget.dvi @@ -86,7 +88,7 @@ wget_us.ps: wget.dvi wget_a4.ps: wget.dvi $(DVIPS) -t a4 -o $@ wget.dvi -wget_toc.html: wget.texi +wget_toc.html: $(srcdir)/wget.texi $(TEXI2HTML) $(srcdir)/wget.texi # @@ -94,10 +96,10 @@ wget_toc.html: wget.texi # # install all the documentation -install: install.info install.wgetrc # install.man +install: install.info install.wgetrc @COMMENT_IF_NO_POD2MAN@install.man # uninstall all the documentation -uninstall: uninstall.info # uninstall.man +uninstall: uninstall.info @COMMENT_IF_NO_POD2MAN@uninstall.man # install info pages, creating install directory if necessary install.info: wget.info @@ -107,12 +109,12 @@ install.info: wget.info done # install man page, creating install directory if necessary -install.man: +install.man: $(MAN) $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext) $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(MAN) # install sample.wgetrc -install.wgetrc: +install.wgetrc: $(srcdir)/sample.wgetrc $(top_srcdir)/mkinstalldirs $(sysconfdir) @if test -f $(WGETRC); then \ if cmp -s $(srcdir)/sample.wgetrc $(WGETRC); then echo ""; \ @@ -151,7 +153,7 @@ clean: distclean: clean $(RM) Makefile - $(RM) $(MAN) + $(RM) $(MAN) $(TEXI2POD) realclean: distclean $(RM) wget.info* diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl.in similarity index 99% rename from doc/texi2pod.pl rename to doc/texi2pod.pl.in index fcf910d2..4f42ad8a 100644 --- a/doc/texi2pod.pl +++ b/doc/texi2pod.pl.in @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#!/usr/bin/perl -w # This does trivial (and I mean _trivial_) conversion of Texinfo # markup to Perl POD format. It's intended to be used to extract -- 2.39.2