From cstrato at aon.at  Wed Sep 15 22:39:11 2010
From: cstrato at aon.at (cstrato)
Date: Wed, 15 Sep 2010 22:39:11 +0200
Subject: [Rd] Problem with WARNING...headers with CRLF line endings
In-Reply-To: <4C900C09.2010509@fhcrc.org>
References: <4C8E9297.5050806@aon.at>	<77EB52C6DD32BA4D87471DCD70C8D700036E87E6@NA-PA-VBE03.na.tibco.com>	<4C8FBE96.6080604@aon.at>	<69C89B57-A641-44D3-A95D-D95A5AD6B2A6@r-project.org>	<4C8FE527.6060308@aon.at>
	<4C8FE9EE.60604@fhcrc.org>	<4C8FF01B.6060208@aon.at>
	<4C8FF268.9010500@fhcrc.org> <4C8FF78F.5020407@gmail.com>
	<4C900C09.2010509@fhcrc.org>
Message-ID: <4C912EEF.5050701@aon.at>

Dear Duncan, dear Herve,

Thank you both for your help and suggestions. I think that you are both 
right:

In principle I do not want to put these files in the source tarball (and 
I did not in the past), however because of the way R CMD check works 
this seems to be the only possibility to get rid of the warning message.

I agree that it is weird to get this warning message although these 
files are not in the source tarball.

Since I have a Makefile, as Herve mentions, I can try to remove these 
files in the clean step, which currently is:

clean:
	rm -f $(MYOBJ) *.a *.d *.rc

I will try to change this part but I am not sure if this will solve the 
problem.

Best regards
Christian


On 9/15/10 1:58 AM, Herv? Pag?s wrote:
> On 09/14/2010 03:30 PM, Duncan Murdoch wrote:
>> On 14/09/2010 6:08 PM, Herv? Pag?s wrote:
>>> On 09/14/2010 02:58 PM, cstrato wrote:
>>>> Dear Herve,
>>>>
>>>> Thank you for your reply, however maybe I was not quite clear.
>>>>
>>>> The files xpsDict.h and xpsDict.cxx are automatically created by the
>>>> ROOT framework during compilation on every architecture.
>>>
>>> on every architecture... ok
>>> But if they are created during compilation, why do they need to be
>>> included in the source tarball? They are just temporary files right?
>>> Or I'm missing something...
>>>
>>>> This means they
>>>> are created on Linux and Mac with LF line endings, but on Windows with
>>>> CRLF line endings. However, they are created only if they do not
>>>> already
>>>> exist, and thus are not in the source tarball.
>>>
>>> I guess you mean they are not part of the source *tree*.
>>>
>>>> For testing purposes I have just added both files with LF line endings
>>>> to the source tarball and compiled it on Windows w/o problems.
>>>> Furthermore, the size of "xps_1.9.6.tar.gz" increases only from 4MB to
>>>> 4.3MB. Thus in principle I could upload both files to SVN for BioC 2.7,
>>>> and this should eliminate the warning message. What is your opinion?
>>>
>>> I still don't understand why you want to have them in the source
>>> tarball.
>>
>> I think he doesn't want to put them in the source tarball, but because
>> of the way R CMD check works, he may have to.
>>
>> It appears that R CMD check builds those files, and then checks for CRLF
>> endings on all files. If it did the CRLF check first, it wouldn't see
>> them and complain. The problem with this change is that some packages
>> might create files with CRLF endings on all platforms, and then check
>> *should* complain about them.
>
> I see your point but, on the other hand, and more generally speaking,
> you expect 'R CMD check' to check the source files i.e. the files that
> belong to the source tarball, and not temporary compilation/installation
> products that 'R CMD INSTALL' didn't remove (for whatever reason).
>
> It's weird to get a message like:
>
> * checking line endings in C/C++/Fortran sources/headers ... WARNING
> Found the following sources/headers with CR or CRLF line endings:
> src/xpsDict.h
>
> if there is no such file in the source tarball.
>
>>
>> My advice would be not to put them in the tarball, and ignore the
>> warning. Or write a Makevars.win that fixes the line endings so that
>> check is happy.
>
> Yes and since he already uses a Makefile, it should be easy to remove
> those files at the end of installation so they don't end up in the
> tarball anymore. Wouldn't that also be enough to silent 'R CMD check'?
> Perhaps package authors should really make sure that src/ gets
> cleaned after the installation step of 'R CMD build' (this step is
> performed only if the package has vignettes). Then it shouldn't matter
> whether 'R CMD check' checks for CRLF endings after or before
> installing the package.
>
> Cheers,
> H.
>
>>
>> Duncan Murdoch
>
>



[Rd] Problem with WARNING...headers with CRLF line endings
cstrato