NAME
makepatch - create patch diffs between two versions of source
SYNOPSIS
makepatch [ options ] old new
makepatch -filelist [ options ] manifest
DESCRIPTION
Makepatch generates a set of differences between two files or two sets of files maintained in two different directories and prints the results to stdout. This resulting output is suitable for use by the patch(1) program to update copies of the target file(s) from the old to the new version.
Features of this utility include:
- - Recursive descend through sub-directories.
- - Generation of commands to remove obsolete files.
- - Automatic handling of the patchlevel.h file first.
- - Automatic inclusion of Index: and Prereq: lines.
- - Ability to utilize specified manifest file(s).
ARGUMENTS
- old
-
This is the name of either a single file or else a directory which contains copies of the older version of the target file(s); in other words, copies of the file(s) prior to any modifications.
- new
-
This is the name of either a single file or else a directory which contains copies of the newer version of the target file(s); in other words, copies of the file(s) after the modifications have been made. A rm(1) command will automatically be generated for every old file that no longer has a corresponding new version.
MAKEPATCH OPTIONS
- -diff cmd
-
If specified, cmd is the command to be used to generate the differences between the two versions of the files. If not specified, this command defaults to "diff -c".
- -patchlevel pfile
-
If specified, pfile indicates an alternate file that is to be used in lieu of "patchlevel.h".
- -man[ifest] mfile
-
If specified, mfile indicates the name of the manifest file which consists of a list of the files contained in both the old and the new directories.
- -oldman[ifest] omfile
-
If specified, omfile indicates the name of the manifest file which consists of a list of the files contained in the old directory. This option is designed to be used in conjunction with the -newmanifest option. Note that the old and new directories must still be indicated.
- -newman[ifest] nmfile
-
If specified, nmfile indicates the name of the manifest file which consists of a list of the files contained in the new directory. This option is designed to be used in conjunction with the -oldmanifest option. Note that the old and new directories must still be indicated.
- -follow
-
If specified, symbolic links to directories are traversed as if they were real directories.
- -fixpath
-
Correct diff pathnames for new files. Use this for buggy diff or patch programs.
- -fixallpath
-
Correct diff path names for all files. Use this for buggy diff or patch programs.
FILELIST OPTIONS
- -[file]list
-
This option instructs makepatch to read a manifest file, and output the list of files included in this manifest. This option is useful to turn the contents of a manifest file into a list of files suitable for other programs.
- -man[ifest] mfile
-
If specified, mfile indicates the name of the manifest file to be used. Alternatively, the name of the manifest file may follow the command line options.
- -prefix string
-
Every entry in the manifest file is prefixed with string before it is written to stdout.
- -nosort
-
Retain the order of filenames from the manifest file.
GENERAL OPTIONS
- -verbose
-
This is the default mode which displays information concerning makepatchs activity to stderr.
- -quiet
-
The opposite of -verbose. This instructs makepatch to suppress the display of activity information.
- -help
-
This causes a short help message to be displayed, after which the program immediately exits.
MANIFEST FILES
Although there is no formal standard for manifest files, the following rules apply:
- - If the second line from the manifest file looks like a separator line (e.g. it is empty, or contains only dashes), it is discarded and so is the first line.
- - Empty lines and lines that start with a
#
are ignored. - - If there are multiple space-separated ``words'' on a line, the first word is considered to be the filename.
EXAMPLES
Suppose you have a directory tree emacs-18.58 containing the sources for GNU Emacs 18.58, and a directory tree emacs-18.59 containing the sources for GNU Emacs 18.59. The following command will generate the patch file needed to transform the 18.58 sources into 18.59:
makepatch emacs-18.58 emacs-18.59 > emacs-18.58-18.59.diff
This is one way to generate and use manifest files:
(cd emacs-18.58; find . -type f -print > MANIFEST)
(cd emacs-18.59; find . -type f -print > MANIFEST)
makepatch \
-oldmanifest emacs-18.58/MANIFEST \
-newmanifest emacs-18.59/MANIFEST \
emacs-18.58 emacs-18.59 > emacs-18.58-18.59.diff
The following example transforms the manifest file into a list of files suitable for GNU tar. Note the trailing / in the prefix string:
makepatch -filelist -prefix emacs-18.59/ emacs-18.59/MANIFEST | \
gtar -Zcvf emacs-18.59.tar.Z -T -Op
SEE ALSO
diff(1), patch(1), perl(1), rm(1).
AUTHORS
Johan Vromans (jvromans@squirrel.nl) wrote the program.
Jeffery Small (jeff@cjsa.uucp) donated the base version of this manual page that inspired me to complete it.
Ulrich Pfeifer (pfeifer@ls6.informatik.uni-dortmund.de) convered it to POD format.
Nigel Metheringham <Nigel.Metheringham@ThePLAnet.net> donated some more fixes.
COPYRIGHT AND DISCLAIMER
This program is Copyright 1992,1998 by Johan Vromans. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
If you do not have a copy of the GNU General Public License write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 65:
'=item' outside of any '=over'
- Around line 75:
You forgot a '=back' before '=head1'