mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-06 07:33:17 +00:00
* FAQ/basic.texi, FAQ/bsp.texi, FAQ/build45.texi, FAQ/concepts.texi, FAQ/debug.texi, FAQ/endoftime.texi, FAQ/freesw.texi, FAQ/hwdebugaids.texi, FAQ/projects.texi, FAQ/tools.texi, FAQ/version.texi: New.
92 lines
2.3 KiB
Plaintext
92 lines
2.3 KiB
Plaintext
@c
|
|
@c COPYRIGHT (c) 1988-2002.
|
|
@c On-Line Applications Research Corporation (OAR).
|
|
@c All rights reserved.
|
|
@c
|
|
@c $Id$
|
|
@c
|
|
|
|
|
|
@node General Development Tool Hints, What is GNU?, Top, Top
|
|
|
|
@chapter General Development Tool Hints
|
|
@ifinfo
|
|
@menu
|
|
* What is GNU?::
|
|
* How do I generate a patch?::
|
|
* How do I apply a patch?::
|
|
@end menu
|
|
@end ifinfo
|
|
|
|
The questions in this category are related to the GNU development tools
|
|
in a non-language specific way.
|
|
|
|
|
|
@node What is GNU?, How do I generate a patch?, General Development Tool Hints, General Development Tool Hints
|
|
|
|
@section What is GNU?
|
|
|
|
Take a look at @uref{http://www.gnu.org,http://www.gnu.org} for information on the GNU Project.
|
|
|
|
|
|
@node How do I generate a patch?, How do I apply a patch?, What is GNU?, General Development Tool Hints
|
|
|
|
@section How do I generate a patch?
|
|
|
|
The RTEMS patches to the development tools are generated using a
|
|
command like this
|
|
|
|
@example
|
|
diff -N -P -r -c TOOL-original-image TOOL-with-changes >PATCHFILE
|
|
@end example
|
|
|
|
where the options are:
|
|
|
|
@itemize @bullet
|
|
|
|
@item -N and -P take care of adding and removing files (be careful not to
|
|
include junk files like file.mybackup)
|
|
|
|
@item -r tells diff to recurse through subdirectories
|
|
|
|
@item -c is a context diff (easy to read for humans)
|
|
|
|
@end itemize
|
|
|
|
Please look at the generated PATCHFILE and make sure it does not
|
|
contain anything you did not intend to send to the maintainers.
|
|
It is easy to accidentally leave a backup file in the modified
|
|
source tree or have a spurious change that should not be
|
|
in the PATCHFILE.
|
|
|
|
If you end up with the entire contents of a file in the patch
|
|
and can't figure out why, you may have different CR/LF scheme
|
|
in the two source files. The GNU open-source packages usually have
|
|
UNIX style CR/LF. If you edit on a Windows platform, the line
|
|
terminators may have been transformed by the editor into Windows
|
|
style.
|
|
|
|
|
|
@node How do I apply a patch?, , How do I generate a patch?, General Development Tool Hints
|
|
|
|
@section How do I apply a patch?
|
|
|
|
Patches generated with the @code{diff} program are fed into the
|
|
@code{patch} program as follows:
|
|
|
|
@example
|
|
patch -p1 <PATCHFILE
|
|
@end example
|
|
|
|
where the options are:
|
|
|
|
@itemize @bullet
|
|
|
|
@item -pNUM tells @code{patch} to strip off NUM slashes from the
|
|
pathname.
|
|
|
|
@end itemize
|
|
|
|
If @code{patch} prompts for a file to patch, you may need to adjust NUM.
|
|
|