gnupic: I need help to make a patch


Previous by date: 6 Mar 2001 23:58:29 -0000 I need help to make a patch, Frederic Rodo
Next by date: 6 Mar 2001 23:58:29 -0000 gpasm-0.9.3, Craig Franklin
Previous in thread: 6 Mar 2001 23:58:29 -0000 I need help to make a patch, Frederic Rodo
Next in thread:

Subject: Re: I need help to make a patch
From: Scott Dattalo ####@####.####
Date: 6 Mar 2001 23:58:29 -0000
Message-Id: <Pine.LNX.4.21.0103061720490.28713-100000@tempest2.blackhat.net>


On Tue, 6 Mar 2001, Frederic Rodo wrote:

> Hi everybody I'm new in this mailing list.
> 
> This is the list of modification to get gpasm successfully compile on Macos X public beta:

This is fascinating. In a matter of one week gpasm has appeared on two new OS's.

> 
> in gpasm/Makefile.in, I've replaced
> CFLAGS = @CFLAGS@ -D DATADIR=\"$(DATADIR)\"	# -g --pedantic -Wall
> by
> CFLAGS = @CFLAGS@ -DDATADIR=\"$(DATADIR)\"	# -g --pedantic -Wall
> 
> in gpasm/parse.y, at the line 202, I've replaced
> default :
> by 
> default : ;
> 
> in gpasm/scan.l, at the first line I've added 
> %option noyywrap
> 
> I need help to write a patch file (I'm beginner in UNIX).

For a patch this small, the information you provide is sufficient. If you
intend to perform major surgery on gpasm (or whatever), then I'd recommend doing
something like this:

1) create the original source (and don't touch it!)
2) make a copy of the original source
3) edit your copy
4) compare the differences and send the patch

These first two steps could be done like this:

$ mkdir ~/gnupic
$ cp gpasm-0.9.2.tar.gz ~/gnupic/.
$ cd ~/gnupic
$ tar -xzf gpasm-0.9.2.tar.gz
$ cp -r gpasm-0.9.2 my_gpasm

This will unpackage gpasm into a directory ~/gnupic/gpasm-0.9.2 and create a
copy in the directory ~/gnupic/my_gpasm (the ~/ is an abbreviation for your home
directory, e.g. try this: ls ~ ).

Now you can edit the files in your copy of gpasm. When it's time to send a patch
do this

$ cd ~/gnupic/my_gpasm
$ make distclean
$ cd ~/gnupic
$ diff -ur gpasm-0.9.2 my_gpasm > mypatches_for_gpasm.0.9.2.patch

The 'make distclean' will get rid of object files and etc. that can make the
diff contain a bunch of garbage. The program `diff' will perform the difference.
The option `u' means to perform a unified diff. This just makes it easier to
read the diff files. The option `r' means to recursively compare the copies.

This will work. However, in some instances you may need to clean your working
copy more than `make distclean' will. If that's the case, you may wish to do
this:

$ cd ~/gnupic/my_gpasm
$ make dist
(this will create a gpasm-0.9.2.tar.gz file)
$ tar -xzf gpasm-0.9.2.tar.gz
(this will expand the newly created tar ball into a 'pristine' set of files with
your changes)
$ mv gpasm-0.9.2 ../gpasm-0.9.2.my_changes
$ cd ..
$ diff -ur gpasm-0.9.2 gpasm-0.9.2.my_changes > mypatches_for_gpasm.0.9.2.patch

I'm sure others will have some comments about this, but this should work for
you.

Scott

PS. Has anyone seen the new gpasm web page that Craig has created:
http://gpasm.sourceforge.net/


Previous by date: 6 Mar 2001 23:58:29 -0000 I need help to make a patch, Frederic Rodo
Next by date: 6 Mar 2001 23:58:29 -0000 gpasm-0.9.3, Craig Franklin
Previous in thread: 6 Mar 2001 23:58:29 -0000 I need help to make a patch, Frederic Rodo
Next in thread:


Powered by ezmlm-browse 0.20.