Thread overview
[dmd-internals] Building verstr.h on OSX
Feb 19, 2013
Walter Bright
Feb 19, 2013
Walter Bright
Feb 19, 2013
Jacob Carlborg
Feb 19, 2013
Jacob Carlborg
Feb 19, 2013
Jacob Carlborg
Feb 19, 2013
Walter Bright
Feb 19, 2013
Jacob Carlborg
Feb 19, 2013
Walter Bright
Feb 19, 2013
Jacob Carlborg
Feb 19, 2013
Walter Bright
February 18, 2013
The line from posix.mak:

/bin/echo -n \"`cat ../VERSION`\" >verstr.h

produces a file verstr.h that only contains the character "

Anyone know how to fix this?
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

February 18, 2013
On 2/18/2013 9:51 PM, Walter Bright wrote:
> The line from posix.mak:
>
> /bin/echo -n \"`cat ../VERSION`\" >verstr.h
>
> produces a file verstr.h that only contains the character "
>
> Anyone know how to fix this?


P.S. It does work on Ubuntu. I wonder why nobody noticed this on OSX before.
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

February 19, 2013

On 19 feb 2013, at 06:51, Walter Bright <walter@digitalmars.com> wrote:

> The line from posix.mak:
> 
> /bin/echo -n \"`cat ../VERSION`\" >verstr.h
> 
> produces a file verstr.h that only contains the character "
> 
> Anyone know how to fix this?

What's the need for "echo"?

--
/Jacob Carlborg
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

February 19, 2013
On Feb 19, 2013, at 06:51 AM, Walter Bright <walter@digitalmars.com> wrote:

> The line from posix.mak:
>
> /bin/echo -n \"`cat ../VERSION`\" >verstr.h
> 
> produces a file verstr.h that only contains the character "
>
> Anyone know how to fix this?

It works correctly on Mac OS X 10.6. It outputs:

"2.062"

Including the citation characters.

--
/Jacob Carlborg

February 19, 2013
On 19 feb 2013, at 06:51, Walter Bright <walter@digitalmars.com> wrote:

> The line from posix.mak:
> 
> /bin/echo -n \"`cat ../VERSION`\" >verstr.h
> 
> produces a file verstr.h that only contains the character "
> 
> Anyone know how to fix this?

Works for me on Mac OS X 10.6 - 10.8.

-- 
/Jacob Carlborg

_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

February 19, 2013
On 2/19/2013 10:08 AM, Jacob Carlborg wrote:
> On 19 feb 2013, at 06:51, Walter Bright <walter@digitalmars.com> wrote:
>
>> The line from posix.mak:
>>
>> /bin/echo -n \"`cat ../VERSION`\" >verstr.h
>>
>> produces a file verstr.h that only contains the character "
>>
>> Anyone know how to fix this?
> Works for me on Mac OS X 10.6 - 10.8.
>

Ah, found the problem. My VERSION had a \r\n in it.
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

February 19, 2013
On 19 feb 2013, at 21:23, Walter Bright <walter@digitalmars.com> wrote:

> Ah, found the problem. My VERSION had a \r\n in it.

Windows line endings are evil :)

-- 
/Jacob Carlborg

_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

February 19, 2013
On 2/19/2013 12:28 PM, Jacob Carlborg wrote:
> On 19 feb 2013, at 21:23, Walter Bright <walter@digitalmars.com> wrote:
>
>> Ah, found the problem. My VERSION had a \r\n in it.
> Windows line endings are evil :)
>

In this case, it would have also failed if it had \n as a line ending. The makefile depends on there being no line ending.
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

February 19, 2013
On 19 feb 2013, at 21:56, Walter Bright <walter@digitalmars.com> wrote:

> In this case, it would have also failed if it had \n as a line ending. The makefile depends on there being no line ending.


Then makefiles are evil :)

-- 
/Jacob Carlborg

_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

February 19, 2013
On 2/19/2013 1:10 PM, Jacob Carlborg wrote:
> On 19 feb 2013, at 21:56, Walter Bright <walter@digitalmars.com> wrote:
>
>> In this case, it would have also failed if it had \n as a line ending. The makefile depends on there being no line ending.
>
> Then makefiles are evil :)

It didn't work when I tried the echo command from the command prompt. It was not make's fault.
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals