[En-Nut-Discussion] New Makefile Structure
Harald Kipp
harald.kipp at egnite.de
Wed Apr 15 09:35:43 CEST 2009
Curtis Maloney wrote:
> Harald Kipp wrote:
>> Btw. please note that Unix line endings are used. When using the patch
>> on Windows, it may be required to first run unix2dos on the patch file
>> before applying it.
>
> You can tell SVN to fix this on files where it's important by setting the
> svn:eol-style property. A command such as:
>
> svn propset svn:eol-style native [list of files]
>
> Will tell SVN to convert the line end style appropriate for the system you
> check out on.
As far as I can see this already works fine when reading from and
writing to the repository. However, it will miserably fail when applying
patches to the local files.
If I create a patch on Windows, which is them applied and committed on
Linux and later checked out on Windows again, then weird line endings
(in the patched regions only) may result. I have no solution to this
other than making sure that all patches should contain Linux line
endings and need to be converted before applying the patch under Windows.
Some time ago I wrote a small Windows tool which is able to handle all
kind of line ending problems, even when mixed in a single file. In
certain situations you may need more than one pass. I made it available
for download at
http://www.ethernut.de/arc/eolmod-1_0.zip
Feel free to use and distribute it in any way. Without any guarantee, of
course. If called without argument, it will display a short help message:
Usage: eolmod [options] <source file> [<target file>]
Options:
-a Append LF character after each CR character (mac2dos)
-A Prepend CR character before each LF character (unix2dos)
-k Kill all CR characters (dos2unix)
-K Kill all LF characters (dos2mac)
-r Replace each CR characters by LF character (mac2unix)
-R Replace each LF characters by CR character (unix2mac)
-u 'Undouble' CR characters
-U 'Undouble' LF characters
-v Increase verbosity
Harald
More information about the En-Nut-Discussion
mailing list