]> sjero.net Git - wget/blobdiff - doc/Makefile.in
[svn] * {.,doc,src,util,windows}/Makefile.in: Moved top_builddir out of "User
[wget] / doc / Makefile.in
index a392f915b9616f3b813465cd374648f90a909fbd..0d8819673d55d765d301cb49b4334505352f621e 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@
@@ -44,26 +46,42 @@ INSTALL      = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 RM = rm -f
 
-MAN        = wget.$(manext)
-WGETRC     = $(sysconfdir)/wgetrc
+TEXI2POD     = ./texi2pod.pl
+POD2MAN      = @POD2MAN@
+MAN          = wget.$(manext)
+WGETRC       = $(sysconfdir)/wgetrc
+SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
 
 #
 # Dependencies for building
 #
 
-all: wget.info # wget.cat
+all: wget.info @COMMENT_IF_NO_POD2MAN@$(MAN)
 
 everything: all wget_us.ps wget_a4.ps wget_toc.html
 
-wget.info: wget.texi
+$(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
+       sed s/@/@@/g $< > $@
+
+wget.info: $(SAMPLERCTEXI) $(srcdir)/wget.texi
        -$(MAKEINFO)
 
+$(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@" $< > $@
+
 #wget.cat: $(MAN)
-#      nroff -man $(srcdir)/$(MAN) > wget.cat
+#      nroff -man $< > $@
 
 dvi: wget.dvi
 
-wget.dvi: wget.texi
+wget.dvi: $(srcdir)/wget.texi
        $(TEXI2DVI) $(srcdir)/wget.texi
 
 wget_us.ps: wget.dvi
@@ -72,7 +90,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
 
 #
@@ -80,25 +98,25 @@ 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
        $(top_srcdir)/mkinstalldirs $(infodir)
-       -for file in $(srcdir)/wget.info $(srcdir)/wget.info-*[0-9]; do \
-          test -f "$$file" && $(INSTALL_DATA) $$file $(infodir) ; \
+       -for file in wget.info wget.info-*[0-9]; do \
+          test -f $$file && $(INSTALL_DATA) $$file $(infodir)/$$file ; \
        done
 
 # install man page, creating install directory if necessary
-#install.man:
-#      $(top_srcdir)/mkinstalldirs $(mandir)/man$(manext)
-#      $(INSTALL_DATA) $(srcdir)/$(MAN) $(mandir)/man$(manext)/$(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 ""; \
@@ -106,12 +124,14 @@ install.wgetrc:
             echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new'; \
             $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC).new; \
             echo; \
-            echo "WARNING: Differing \`$(WGETRC)' already exists and"; \
-            echo "         has been spared.  You might want to consider"; \
-            echo "         merging in the new lines from \`$(WGETRC).new'."; \
+            echo "WARNING: Differing \`$(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; \
          fi; \
        else \
          $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(WGETRC); \
@@ -122,22 +142,24 @@ uninstall.info:
        $(RM) $(infodir)/wget.info*
 
 # uninstall man page
-#uninstall.man:
-#      $(RM) $(mandir)/man$(manext)/$(MAN)
+uninstall.man:
+       $(RM) $(mandir)/man$(manext)/$(MAN)
 
 #
 # Dependencies for cleanup
 #
 
 clean:
-       $(RM) *~ *.bak *.cat *.html
+       $(RM) *~ *.bak *.cat *.pod *.html
        $(RM) *.dvi *.aux *.cp *.cps *.fn *.toc *.tp *.vr *.ps *.ky *.pg *.log
 
 distclean: clean
        $(RM) Makefile
+       $(RM) $(MAN) $(TEXI2POD)
 
 realclean: distclean
        $(RM) wget.info*
+       $(RM) $(SAMPLERCTEXI)
 
 #
 # Dependencies for maintenance