Arrange `make release' targets everywhere, and also `make html'
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 20 Nov 2004 12:05:13 +0000 (12:05 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 20 Nov 2004 12:05:13 +0000 (12:05 +0000)
which produces HTML versions of the man pages (yay Halibut).

git-svn-id: svn://svn.tartarus.org/sgt/utils@4845 cda61777-01e9-0310-a592-d414129be87e

Makefile
base64/Makefile
base64/base64.but
cvt-utf8/Makefile
cvt-utf8/cvt-utf8.but
multi/Makefile
multi/multi.but
xcopy/Makefile
xcopy/xcopy.but

index cbb0f20..d5cb05a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,15 @@
 SUBDIRS = base64 cvt-utf8 multi xcopy
 SUBDIRS = base64 cvt-utf8 multi xcopy
+DESTDIR = .
 
 all:
        for i in $(SUBDIRS); do make -C $$i; done
 
 clean:
 
 all:
        for i in $(SUBDIRS); do make -C $$i; done
 
 clean:
+       rm -f *.html *.tar.gz
        for i in $(SUBDIRS); do make -C $$i clean; done
        for i in $(SUBDIRS); do make -C $$i clean; done
+
+html:
+       for i in $(SUBDIRS); do make -C $$i html DESTDIR=../$(DESTDIR); done
+
+release:
+       for i in $(SUBDIRS); do make -C $$i release DESTDIR=../$(DESTDIR); done
index 44ec017..3c017a6 100644 (file)
@@ -1,3 +1,5 @@
+DESTDIR = .
+
 all: base64.1 base64
 
 base64: base64.c
 all: base64.1 base64
 
 base64: base64.c
@@ -7,4 +9,16 @@ base64: base64.c
        halibut --man=$@ $<
 
 clean:
        halibut --man=$@ $<
 
 clean:
-       rm -f *.1 base64
+       rm -f *.1 base64 *.html *.tar.gz
+
+html:
+       halibut --html=$(DESTDIR)/base64.html base64.but
+
+release: base64.1
+       mkdir -p reltmp/base64
+       ln -s ../../base64.c reltmp/base64
+       ln -s ../../base64.1 reltmp/base64
+       ln -s ../../base64.but reltmp/base64
+       ln -s ../../Makefile reltmp/base64
+       tar -C reltmp -chzvf $(DESTDIR)/base64.tar.gz base64
+       rm -rf reltmp
index 0e09007..ec790f7 100644 (file)
@@ -1,20 +1,19 @@
 \cfg{man-identity}{base64}{1}{2004-11-20}{Simon Tatham}{Simon Tatham}
 \cfg{man-identity}{base64}{1}{2004-11-20}{Simon Tatham}{Simon Tatham}
-\cfg{man-mindepth}{1}
 
 
-\C{base64-manpage} Man page for \cw{base64}
+\title Man page for \cw{base64}
 
 
-\H{base64-manpage-name} NAME
+\U NAME
 
 \cw{base64} - stand-alone encoder and decoder for base64
 
 
 \cw{base64} - stand-alone encoder and decoder for base64
 
-\H{base64-manpage-synopsis} SYNOPSIS
+\U SYNOPSIS
 
 \c base64 [ -d ] [ filename ]
 \e bbbbbb   bb     iiiiiiii
 
 \c base64 [ -d ] [ filename ]
 \e bbbbbb   bb     iiiiiiii
-\c base64 -e [ -cwidth ] [ filename ]
-\e bbbbbb bb   bbiiiii     iiiiiiii
+\c base64 -e [ -c width ] [ filename ]
+\e bbbbbb bb   bb iiiii     iiiiiiii
 
 
-\H{base64-manpage-description} DESCRIPTION
+\U DESCRIPTION
 
 \cw{base64} is a command-line utility for encoding and decoding the
 \q{base64} encoding.
 
 \cw{base64} is a command-line utility for encoding and decoding the
 \q{base64} encoding.
@@ -34,7 +33,7 @@ need to inspect a Content-MD5 header or an SSH private key.
 base64 format \e{alone}. It does not try to understand MIME headers
 or anything other than raw data.
 
 base64 format \e{alone}. It does not try to understand MIME headers
 or anything other than raw data.
 
-\H{base64-manpage-options} OPTIONS
+\U OPTIONS
 
 By default (if neither \cw{-d} or \cw{-e} is supplied), \cw{base64}
 operates in decode mode.
 
 By default (if neither \cw{-d} or \cw{-e} is supplied), \cw{base64}
 operates in decode mode.
@@ -52,7 +51,7 @@ and output the decoded data on standard output.
 binary data from standard input or the supplied file name, encode it
 as base64, and output the encoded data on standard output.
 
 binary data from standard input or the supplied file name, encode it
 as base64, and output the encoded data on standard output.
 
-\dt \cw{-c}\e{width}
+\dt \cw{-c} \e{width}
 
 \dd If \cw{base64} is operating in encode mode, this controls the
 number of base64 characters output per line of the encoded file.
 
 \dd If \cw{base64} is operating in encode mode, this controls the
 number of base64 characters output per line of the encoded file.
@@ -72,7 +71,7 @@ parameter passed to \cw{-c} must be a multiple of 4.
 
 }
 
 
 }
 
-\H{base64-manpage-licence} LICENCE
+\U LICENCE
 
 \cw{base64} is free software, distributed under the MIT licence.
 Type \cw{base64 --licence} to see the full licence text.
 
 \cw{base64} is free software, distributed under the MIT licence.
 Type \cw{base64 --licence} to see the full licence text.
index e766e09..f824e5a 100644 (file)
@@ -1,7 +1,21 @@
+DESTDIR = .
+
 all: cvt-utf8.1
 
 %.1: %.but
        halibut --man=$@ $<
 
 clean:
 all: cvt-utf8.1
 
 %.1: %.but
        halibut --man=$@ $<
 
 clean:
-       rm -f *.1
+       rm -f *.1 *.html *.tar.gz
+
+html:
+       halibut --html=$(DESTDIR)/cvt-utf8.html cvt-utf8.but
+
+release: cvt-utf8.1
+       mkdir -p reltmp/cvt-utf8
+       ln -s ../../cvt-utf8 reltmp/cvt-utf8
+       ln -s ../../cvt-utf8.1 reltmp/cvt-utf8
+       ln -s ../../cvt-utf8.but reltmp/cvt-utf8
+       ln -s ../../Makefile reltmp/cvt-utf8
+       tar -C reltmp -chzvf $(DESTDIR)/cvt-utf8.tar.gz cvt-utf8
+       rm -rf reltmp
index 1bab0ae..3ee4832 100644 (file)
@@ -1,18 +1,18 @@
 \cfg{man-identity}{cvt-utf8}{1}{2004-03-24}{Simon Tatham}{Simon Tatham}
 \cfg{man-identity}{cvt-utf8}{1}{2004-03-24}{Simon Tatham}{Simon Tatham}
-\cfg{man-mindepth}{1}
+\cfg{html-chapter-numeric}{yes}
 
 
-\C{cvt-utf8-manpage} Man page for \cw{cvt-utf8}
+\title Man page for \cw{cvt-utf8}
 
 
-\H{cvt-utf8-manpage-name} NAME
+\U NAME
 
 \cw{cvt-utf8} - convert between UTF-8 and Unicode, and analyse Unicode
 
 
 \cw{cvt-utf8} - convert between UTF-8 and Unicode, and analyse Unicode
 
-\H{cvt-utf8-manpage-synopsis} SYNOPSIS
+\U SYNOPSIS
 
 \c cvt-utf8 [flags] [hex UTF-8 bytes and/or U+codepoints]
 \e bbbbbbbb  iiiii   iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 
 
 \c cvt-utf8 [flags] [hex UTF-8 bytes and/or U+codepoints]
 \e bbbbbbbb  iiiii   iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 
-\H{cvt-utf8-manpage-description} DESCRIPTION
+\U DESCRIPTION
 
 \cw{cvt-utf8} is a tool for manipulating and analysing UTF-8 and
 Unicode data. Its functions include:
 
 \cw{cvt-utf8} is a tool for manipulating and analysing UTF-8 and
 Unicode data. Its functions include:
@@ -35,7 +35,7 @@ print out a verbose analysis of the input data. If you need it to
 read UTF-8 from standard input or to write pure UTF-8 to standard
 output, you can do so using command-line options.
 
 read UTF-8 from standard input or to write pure UTF-8 to standard
 output, you can do so using command-line options.
 
-\H{cvt-utf8-manpage-options} OPTIONS
+\U OPTIONS
 
 \dt \cw{-i}
 
 
 \dt \cw{-i}
 
@@ -52,7 +52,7 @@ long analysis of the input data.
 \dd Look up each code point in the Unihan database as well as the
 main Unicode character database.
 
 \dd Look up each code point in the Unihan database as well as the
 main Unicode character database.
 
-\H{cvt-utf8-manpage-examples} EXAMPLES
+\U EXAMPLES
 
 In \cw{cvt-utf8}'s native mode, it simply analyses input Unicode or
 UTF-8 data. For example, you can give a list of Unicode code
 
 In \cw{cvt-utf8}'s native mode, it simply analyses input Unicode or
 UTF-8 data. For example, you can give a list of Unicode code
@@ -127,7 +127,7 @@ Chinese text meaning \q{Traditional Chinese}:
 \c                               midst of; hit (target); attain
 \c U-00006587  E6 96 87          <han> literature, culture, writing
 
 \c                               midst of; hit (target); attain
 \c U-00006587  E6 96 87          <han> literature, culture, writing
 
-\H{cvt-utf8-manpage-admin} ADMINISTRATION
+\U ADMINISTRATION
 
 In order to print the \cw{unicode.org} official name of each
 character, \cw{cvt-utf8} requires file mapping code points to names.
 
 In order to print the \cw{unicode.org} official name of each
 character, \cw{cvt-utf8} requires file mapping code points to names.
@@ -185,7 +185,7 @@ following locations:
 If either of these files is not found, \cw{cvt-utf8} will still
 perform the rest of its functions.
 
 If either of these files is not found, \cw{cvt-utf8} will still
 perform the rest of its functions.
 
-\H{cvt-utf8-manpage-licence} LICENCE
+\U LICENCE
 
 \cw{cvt-utf8} is free software, distributed under the MIT licence.
 Type \cw{cvt-utf8 --licence} to see the full licence text.
 
 \cw{cvt-utf8} is free software, distributed under the MIT licence.
 Type \cw{cvt-utf8 --licence} to see the full licence text.
index 51b171d..dbd057a 100644 (file)
@@ -1,7 +1,21 @@
+DESTDIR = .
+
 all: multi.1
 
 %.1: %.but
        halibut --man=$@ $<
 
 clean:
 all: multi.1
 
 %.1: %.but
        halibut --man=$@ $<
 
 clean:
-       rm -f *.1
+       rm -f *.1 *.html *.tar.gz
+
+html:
+       halibut --html=$(DESTDIR)/multi.html multi.but
+
+release: multi.1
+       mkdir -p reltmp/multi
+       ln -s ../../multi reltmp/multi
+       ln -s ../../multi.1 reltmp/multi
+       ln -s ../../multi.but reltmp/multi
+       ln -s ../../Makefile reltmp/multi
+       tar -C reltmp -chzvf $(DESTDIR)/multi.tar.gz multi
+       rm -rf reltmp
index 9bff4c5..81fd1b6 100644 (file)
@@ -1,20 +1,20 @@
 \cfg{man-identity}{multi}{1}{2004-11-20}{Simon Tatham}{Simon Tatham}
 \cfg{man-mindepth}{1}
 
 \cfg{man-identity}{multi}{1}{2004-11-20}{Simon Tatham}{Simon Tatham}
 \cfg{man-mindepth}{1}
 
-\C{multi-manpage} Man page for \cw{multi}
+\title Man page for \cw{multi}
 
 
-\H{multi-manpage-name} NAME
+\U NAME
 
 \cw{multi} - bulk file rename/copy utility using Perl regexps
 
 
 \cw{multi} - bulk file rename/copy utility using Perl regexps
 
-\H{multi-manpage-synopsis} SYNOPSIS
+\U SYNOPSIS
 
 \c multi [ -n | -q ] [ -r ] cmd perlfragment file [file...]
 \e bbbbb   bb   bb     bb   iii iiiiiiiiiiii iiii  iiii
 \c multi [ -n | -q ] [ -r ] - cmd cmd - perlfragment file [file...]
 \e bbbbb   bb   bb     bb     iii iii   iiiiiiiiiiii iiii  iiii
 
 
 \c multi [ -n | -q ] [ -r ] cmd perlfragment file [file...]
 \e bbbbb   bb   bb     bb   iii iiiiiiiiiiii iiii  iiii
 \c multi [ -n | -q ] [ -r ] - cmd cmd - perlfragment file [file...]
 \e bbbbb   bb   bb     bb     iii iii   iiiiiiiiiiii iiii  iiii
 
-\H{multi-manpage-description} DESCRIPTION
+\U DESCRIPTION
 
 \cw{multi} is a utility which allows you to invoke a command
 (typically, but not always, \cw{mv} or \cw{cp}) on a lot of files in
 
 \cw{multi} is a utility which allows you to invoke a command
 (typically, but not always, \cw{mv} or \cw{cp}) on a lot of files in
@@ -30,7 +30,7 @@ the old and new filenames as arguments.
 passing \cw{mv} or \cw{cp} as the command. However, it can have more
 complex uses as well; see the examples below.
 
 passing \cw{mv} or \cw{cp} as the command. However, it can have more
 complex uses as well; see the examples below.
 
-\H{multi-manpage-args} ARGUMENTS
+\U ARGUMENTS
 
 \dt \e{cmd}
 
 
 \dt \e{cmd}
 
@@ -70,7 +70,7 @@ of \cw{multi}.
 to be transformed. Typically these will be generated by typing one
 or more wildcard expressions on the shell command line.
 
 to be transformed. Typically these will be generated by typing one
 or more wildcard expressions on the shell command line.
 
-\H{multi-manpage-options} OPTIONS
+\U OPTIONS
 
 By default, \cw{multi} will print every command it executes on
 standard output, so that you can see what it has just done (in case
 
 By default, \cw{multi} will print every command it executes on
 standard output, so that you can see what it has just done (in case
@@ -101,7 +101,7 @@ in that order.
 \dd Reverse the order of arguments to the subcommand, so that it
 receives the transformed file name \e{before} the original one.
 
 \dd Reverse the order of arguments to the subcommand, so that it
 receives the transformed file name \e{before} the original one.
 
-\H{multi-manpage-examples} EXAMPLES
+\U EXAMPLES
 
 The simplest use of \cw{multi} is to rename a large number of files.
 Suppose, for example, you have a lot of text files with \cw{.txt}
 
 The simplest use of \cw{multi} is to rename a large number of files.
 Suppose, for example, you have a lot of text files with \cw{.txt}
@@ -172,7 +172,7 @@ Here's an example using \cw{-r}. Suppose you have lots of small C
 programs and you want to quickly compile them all into binaries:
 
 \c $ multi -r - cc -o - 's/.c$//' *.c
 programs and you want to quickly compile them all into binaries:
 
 \c $ multi -r - cc -o - 's/.c$//' *.c
-\c   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+\e   bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 \c cc -o bar bar.c
 \c cc -o baz baz.c
 \c cc -o foo foo.c
 \c cc -o bar bar.c
 \c cc -o baz baz.c
 \c cc -o foo foo.c
@@ -197,7 +197,7 @@ commands like
 \c grep foo baz.txt > baz.grepped
 \c grep foo foo.txt > foo.grepped
 
 \c grep foo baz.txt > baz.grepped
 \c grep foo foo.txt > foo.grepped
 
-\H{multi-manpage-ack} ACKNOWLEDGEMENTS
+\U ACKNOWLEDGEMENTS
 
 The O'Reilly book \q{Programming Perl} includes a simple example
 script which contains the core idea of this program. It takes a
 
 The O'Reilly book \q{Programming Perl} includes a simple example
 script which contains the core idea of this program. It takes a
@@ -205,7 +205,7 @@ single Perl argument followed by filenames, and invokes Perl's
 internal \cw{rename} function. \cw{multi} is a complete rewrite of
 this basic idea, supplying more options and configurability.
 
 internal \cw{rename} function. \cw{multi} is a complete rewrite of
 this basic idea, supplying more options and configurability.
 
-\H{multi-manpage-licence} LICENCE
+\U LICENCE
 
 \cw{multi} is free software, distributed under the MIT licence. Type
 \cw{multi --licence} to see the full licence text.
 
 \cw{multi} is free software, distributed under the MIT licence. Type
 \cw{multi --licence} to see the full licence text.
index 6f193bc..3284f80 100644 (file)
@@ -1,3 +1,5 @@
+DESTDIR = .
+
 X11LIB=-L/usr/X11R6/lib -lX11
 
 all: xcopy.1 xcopy
 X11LIB=-L/usr/X11R6/lib -lX11
 
 all: xcopy.1 xcopy
@@ -9,4 +11,18 @@ xcopy: xcopy.c
        halibut --man=$@ $<
 
 clean:
        halibut --man=$@ $<
 
 clean:
-       rm -f *.1 xcopy
+       rm -f *.1 xcopy *.html *.tar.gz
+
+html:
+       halibut --html=$(DESTDIR)/xcopy.html xcopy.but
+
+release: xcopy.1
+       mkdir -p reltmp/xcopy
+       ln -s ../../xcopy.c reltmp/xcopy
+       ln -s ../../xcopy.1 reltmp/xcopy
+       ln -s ../../xcopy.but reltmp/xcopy
+       ln -s ../../Makefile reltmp/xcopy
+       tar -C reltmp -chzvf $(DESTDIR)/xcopy.tar.gz xcopy
+       rm -rf reltmp
+
+
index a318954..1be9e0c 100644 (file)
@@ -1,19 +1,19 @@
 \cfg{man-identity}{xcopy}{1}{2004-08-02}{Simon Tatham}{Simon Tatham}
 \cfg{man-mindepth}{1}
 
 \cfg{man-identity}{xcopy}{1}{2004-08-02}{Simon Tatham}{Simon Tatham}
 \cfg{man-mindepth}{1}
 
-\C{xcopy-manpage} Man page for \cw{xcopy}
+\title Man page for \cw{xcopy}
 
 
-\H{xcopy-manpage-name} NAME
+\U NAME
 
 \cw{xcopy} - read and write text to/from an X selection from the
 command line
 
 
 \cw{xcopy} - read and write text to/from an X selection from the
 command line
 
-\H{xcopy-manpage-synopsis} SYNOPSIS
+\U SYNOPSIS
 
 \c xcopy [ -r ] [ -u | -c ] [ -C ]
 \e bbbbb   bb     bb   bb     bb
 
 
 \c xcopy [ -r ] [ -u | -c ] [ -C ]
 \e bbbbb   bb     bb   bb     bb
 
-\H{xcopy-manpage-description} DESCRIPTION
+\U DESCRIPTION
 
 \cw{xcopy} is a command-line utility for manipulating the X selection.
 
 
 \cw{xcopy} is a command-line utility for manipulating the X selection.
 
@@ -42,7 +42,7 @@ of handling it in the form of plain text, UTF-8, or compound
 (multiple-character-set) text. Use the \cw{-u}, \cw{-c} and \cw{-C}
 options to control this aspect of its behaviour.
 
 (multiple-character-set) text. Use the \cw{-u}, \cw{-c} and \cw{-C}
 options to control this aspect of its behaviour.
 
-\H{xcopy-manpage-options} OPTIONS
+\U OPTIONS
 
 By default (if \cw{-r} is not supplied), \cw{xcopy} operates in
 write mode.
 
 By default (if \cw{-r} is not supplied), \cw{xcopy} operates in
 write mode.
@@ -91,7 +91,7 @@ window, you might well want to paste a string full of escape
 sequences and control characters, in which case you may need to use
 \cw{-C} to disable conversion to compound text.
 
 sequences and control characters, in which case you may need to use
 \cw{-C} to disable conversion to compound text.
 
-\H{xcopy-manpage-bugs} BUGS
+\U BUGS
 
 Occasionally \cw{xcopy -r} completely fails to notice selection data
 owned by another process. I have not yet reproduced this reliably;
 
 Occasionally \cw{xcopy -r} completely fails to notice selection data
 owned by another process. I have not yet reproduced this reliably;
@@ -103,7 +103,7 @@ currently supported. There are Xlib functions to do it, although
 they don't appear to work very well (missing out many characters
 which they could have converted).
 
 they don't appear to work very well (missing out many characters
 which they could have converted).
 
-\H{xcopy-manpage-licence} LICENCE
+\U LICENCE
 
 \cw{xcopy} is free software, distributed under the MIT licence. Type
 \cw{xcopy --licence} to see the full licence text.
 
 \cw{xcopy} is free software, distributed under the MIT licence. Type
 \cw{xcopy --licence} to see the full licence text.