summaryrefslogtreecommitdiff
path: root/Porting
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2001-02-11 17:46:28 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-11 16:53:52 +0000
commit39f9fc433ed605c97e9ab03ac9e6d33f58f82877 (patch)
tree3153431e616e83ee9ec1979ac927e7cda9ed8a06 /Porting
parent0256094b4c2296e320dfc83acdb944c28ae745d0 (diff)
downloadperl-39f9fc433ed605c97e9ab03ac9e6d33f58f82877.tar.gz
Document makepatch in Porting/patching
Message-ID: <m3bss9kysr.fsf@ak-71.mind.de> p4raw-id: //depot/perl@8767
Diffstat (limited to 'Porting')
-rw-r--r--Porting/patching.pod32
1 files changed, 26 insertions, 6 deletions
diff --git a/Porting/patching.pod b/Porting/patching.pod
index 5659f23c60..7fd376b1a4 100644
--- a/Porting/patching.pod
+++ b/Porting/patching.pod
@@ -94,12 +94,7 @@ diffs. Some examples using GNU diff:
# show function name in every hunk (safer, more informative)
% diff -u -F '^[_a-zA-Z0-9]+ *(' old/file new/file
-
-=item Directories
-
-IMPORTANT: Patches should be generated from the source root directory, not
-from the directory that the patched file resides in. This ensures that the
-maintainer patches the proper file.
+=item Derived Files
Many files in the distribution are derivative--avoid patching them.
Patch the originals instead. Most utilities (like perldoc) are in
@@ -120,6 +115,31 @@ If you are submitting patches that affect multiple files then you should
backup the entire directory tree (to $source_root.old/ for example). This
will allow C<diff -ruN old-dir new-dir> to create all the patches at once.
+=item Directories
+
+IMPORTANT: Patches should be generated from the source root directory, not
+from the directory that the patched file resides in. This ensures that the
+maintainer patches the proper file.
+
+For larger patches that are dealing with multiple files or
+directories, Johan Vromans has written a powerful utility: makepatch.
+See the JV directory on CPAN for the current version. If you have this
+program available, it is recommended to create a duplicate of the perl
+directory tree against which you are intending to provide a patch and
+let makepatch figure out all the changes you made to your copy of the
+sources. As perl comes with a MANIFEST file, you need not delete
+object files and other derivative files from the two directory trees,
+makepatch is smart about them.
+
+Say, you have created a directory perl-5.7.1@8685/ for the perl you
+are taking as the base and a directory perl-5.7.1@8685-withfoo/ where
+you have your changes, you would run makepatch as follows:
+
+ makepatch -oldman perl-5.7.1@8685/MANIFEST \
+ -newman perl-5.7.1@8685-withfoo/MANIFEST \
+ -diff "diff -u" \
+ perl-5.7.1@8685 perl-5.7.1@8685-withfoo
+
=item Try it yourself
Just to make sure your patch "works", be sure to apply it to the Perl