You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2010/09/27 13:10:57 UTC

svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Author: mturk
Date: Mon Sep 27 11:10:57 2010
New Revision: 1001670

URL: http://svn.apache.org/viewvc?rev=1001670&view=rev
Log:
Handle some of the possible variants from the PROCESSOR_ARCHITECTURE environment

Modified:
    commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Modified: commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc?rev=1001670&r1=1001669&r2=1001670&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc (original)
+++ commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc Mon Sep 27 11:10:57 2010
@@ -103,17 +103,24 @@ CPU=X64
 !IF "$(BUILD_CPU)" == "ia64" || "$(BUILD_CPU)" == "i64"
 CPU=I64
 !ENDIF
-!ENDIF
-# Figure out CPU from the current host
-!IF !DEFINED(CPU) || "$(CPU)" == ""
+!ELSE
 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
 !IF "$(PROCESSOR_ARCHITEW6432)" == ""
-CPU=X86
+BUILD_CPU=X86
 !ELSE
-CPU=$(PROCESSOR_ARCHITEW6432)
+BUILD_CPU=$(PROCESSOR_ARCHITEW6432)
 !ENDIF
 !ELSE
-CPU=$(PROCESSOR_ARCHITECTURE)
+BUILD_CPU=$(PROCESSOR_ARCHITECTURE)
+!ENDIF
+!IF "$(BUILD_CPU)" == "i386" || "$(BUILD_CPU)" == "x86" || "$(BUILD_CPU)" == "i686"
+CPU=X86
+!ENDIF
+!IF "$(BUILD_CPU)" == "amd64" || "$(BUILD_CPU)" == "x86_64" || "$(BUILD_CPU)" == "x64"
+CPU=X64
+!ENDIF
+!IF "$(BUILD_CPU)" == "ia64" || "$(BUILD_CPU)" == "i64"
+CPU=I64
 !ENDIF
 !ENDIF
 



Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by Mladen Turk <mt...@apache.org>.
On 09/27/2010 06:57 PM, Rainer Jung wrote:
> On 27.09.2010 17:45, sebb wrote:
>> On 27 September 2010 15:32, Mladen Turk<mt...@apache.org> wrote:
>>> On 09/27/2010 04:08 PM, sebb wrote:
>>>>
>>>> I don't have VC 2005, but I was able to build prunmgr and prunsrv with
>>>> Visual Studio 2008 just now.
>>>> [I realise that these will be linked to a CRTL which is not
>>>> backwards-compatible, but for local testing that should be OK]
>>>>
>>>
>>> Sure.
>>> I'm using the Driver Developers Kit 7.1
>>
>> Downloading it now ...
>>
>>> It links to MSVCRT.dll while having modern compiler.
>>> However setting that up for building the non-driver code
>>> requires lots of manual copy/paste.
>>
>> Is it worth trying to document those procedures?
>
> At least i would be interested as well :)
>

Sure, I was planning to blog about that.
I posted something on the m.p.vc.language
http://www.eggheadcafe.com/software/aspnet/36180858/using-msvcrtdll-with-visual-studio-20082010.aspx
Based on the somehow crippled explanation on the
http://kobyk.wordpress.com/2007/07/20/dynamically-linking-with-msvcrtdll-using-visual-c-2005

I'll document that more thoroughly since I plan to use
it for all ASF windows binaries (mod_jk, tomcat native, daemon)



Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by Rainer Jung <ra...@kippdata.de>.
Thanks!

Will try your README for next mod_jk or Web Server releases.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by Mladen Turk <mt...@apache.org>.
On 09/27/2010 06:57 PM, Rainer Jung wrote:
> On 27.09.2010 17:45, sebb wrote:
>
> At least i would be interested as well :)
>

Here you'll find a README.txt for assembling the
custom VC installation that uses DDK 7.1
Well, Still needs Platform SDK for 2003r2 and
VS 2003 (There are no CRT .obj files for x86 in PSDK
nor in the DDK, and later VS versions fail for
some reason which didn't yet guess why)

Scripts from the README.txt can be found at
http://people.redhat.com/mturk/files/

If someone is interested I'll send him a link with
the fully assembled .zip (150Mb).


Regards
-- 
^TM

Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by Rainer Jung <ra...@kippdata.de>.
On 27.09.2010 17:45, sebb wrote:
> On 27 September 2010 15:32, Mladen Turk<mt...@apache.org>  wrote:
>> On 09/27/2010 04:08 PM, sebb wrote:
>>>
>>> I don't have VC 2005, but I was able to build prunmgr and prunsrv with
>>> Visual Studio 2008 just now.
>>> [I realise that these will be linked to a CRTL which is not
>>> backwards-compatible, but for local testing that should be OK]
>>>
>>
>> Sure.
>> I'm using the Driver Developers Kit 7.1
>
> Downloading it now ...
>
>> It links to MSVCRT.dll while having modern compiler.
>> However setting that up for building the non-driver code
>> requires lots of manual copy/paste.
>
> Is it worth trying to document those procedures?

At least i would be interested as well :)

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by sebb <se...@gmail.com>.
On 27 September 2010 15:32, Mladen Turk <mt...@apache.org> wrote:
> On 09/27/2010 04:08 PM, sebb wrote:
>>
>> I don't have VC 2005, but I was able to build prunmgr and prunsrv with
>> Visual Studio 2008 just now.
>> [I realise that these will be linked to a CRTL which is not
>> backwards-compatible, but for local testing that should be OK]
>>
>
> Sure.
> I'm using the Driver Developers Kit 7.1

Downloading it now ...

> It links to MSVCRT.dll while having modern compiler.
> However setting that up for building the non-driver code
> requires lots of manual copy/paste.

Is it worth trying to document those procedures?

>
>
>
> Regards
> --
> ^TM
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by Mladen Turk <mt...@apache.org>.
On 09/27/2010 04:08 PM, sebb wrote:
>
> I don't have VC 2005, but I was able to build prunmgr and prunsrv with
> Visual Studio 2008 just now.
> [I realise that these will be linked to a CRTL which is not
> backwards-compatible, but for local testing that should be OK]
>

Sure.
I'm using the Driver Developers Kit 7.1
It links to MSVCRT.dll while having modern compiler.
However setting that up for building the non-driver code
requires lots of manual copy/paste.



Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by sebb <se...@gmail.com>.
On 27 September 2010 14:42, sebb <se...@gmail.com> wrote:
> On 27 September 2010 13:53, sebb <se...@gmail.com> wrote:
>> On 27 September 2010 13:49, Mladen Turk <mt...@apache.org> wrote:
>>> On 09/27/2010 02:16 PM, sebb wrote:
>>>>
>>>> Might be simpler to recheck if CPU is set after handling BUILD_CPU,
>>>> rather than nesting further.
>>>> i.e.
>>>>
>>>> IF CPU not set
>>>> try to set from BUILD_CPU
>>>> ENDIF
>>>>
>>>> IF CPU not set
>>>> try to set from PROCESSOR_ARCH*
>>>> ENDIF
>>>>
>>>
>>> Feel free to modify it according to what you think is the best.
>>> As long as CPU remains in the required case sensitive
>>> set (X86, X64, I64), I don't care.
>>
>> OK, will do.
>
> I think it's fixed now, and hopefully a bit simpler.

I don't have VC 2005, but I was able to build prunmgr and prunsrv with
Visual Studio 2008 just now.
[I realise that these will be linked to a CRTL which is not
backwards-compatible, but for local testing that should be OK]

>>>
>>> Regards
>>> --
>>> ^TM
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by sebb <se...@gmail.com>.
On 27 September 2010 13:53, sebb <se...@gmail.com> wrote:
> On 27 September 2010 13:49, Mladen Turk <mt...@apache.org> wrote:
>> On 09/27/2010 02:16 PM, sebb wrote:
>>>
>>> Might be simpler to recheck if CPU is set after handling BUILD_CPU,
>>> rather than nesting further.
>>> i.e.
>>>
>>> IF CPU not set
>>> try to set from BUILD_CPU
>>> ENDIF
>>>
>>> IF CPU not set
>>> try to set from PROCESSOR_ARCH*
>>> ENDIF
>>>
>>
>> Feel free to modify it according to what you think is the best.
>> As long as CPU remains in the required case sensitive
>> set (X86, X64, I64), I don't care.
>
> OK, will do.

I think it's fixed now, and hopefully a bit simpler.

>>
>> Regards
>> --
>> ^TM
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by sebb <se...@gmail.com>.
On 27 September 2010 13:49, Mladen Turk <mt...@apache.org> wrote:
> On 09/27/2010 02:16 PM, sebb wrote:
>>
>> Might be simpler to recheck if CPU is set after handling BUILD_CPU,
>> rather than nesting further.
>> i.e.
>>
>> IF CPU not set
>> try to set from BUILD_CPU
>> ENDIF
>>
>> IF CPU not set
>> try to set from PROCESSOR_ARCH*
>> ENDIF
>>
>
> Feel free to modify it according to what you think is the best.
> As long as CPU remains in the required case sensitive
> set (X86, X64, I64), I don't care.

OK, will do.

>
> Regards
> --
> ^TM
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by Mladen Turk <mt...@apache.org>.
On 09/27/2010 02:16 PM, sebb wrote:
>
> Might be simpler to recheck if CPU is set after handling BUILD_CPU,
> rather than nesting further.
> i.e.
>
> IF CPU not set
> try to set from BUILD_CPU
> ENDIF
>
> IF CPU not set
> try to set from PROCESSOR_ARCH*
> ENDIF
>

Feel free to modify it according to what you think is the best.
As long as CPU remains in the required case sensitive
set (X86, X64, I64), I don't care.


Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1001670 - /commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc

Posted by sebb <se...@gmail.com>.
On 27 September 2010 12:10,  <mt...@apache.org> wrote:
> Author: mturk
> Date: Mon Sep 27 11:10:57 2010
> New Revision: 1001670
>
> URL: http://svn.apache.org/viewvc?rev=1001670&view=rev
> Log:
> Handle some of the possible variants from the PROCESSOR_ARCHITECTURE environment

Unfortunately the patch does not work, as the PROCESSOR_ARCHITECTURE
branch is never taken if BUILD_CPU is not defined.

Might be simpler to recheck if CPU is set after handling BUILD_CPU,
rather than nesting further.
i.e.

IF CPU not set
try to set from BUILD_CPU
ENDIF

IF CPU not set
try to set from PROCESSOR_ARCH*
ENDIF

>
> Modified:
>    commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc
>
> Modified: commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc
> URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc?rev=1001670&r1=1001669&r2=1001670&view=diff
> ==============================================================================
> --- commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc (original)
> +++ commons/proper/daemon/trunk/src/native/windows/include/Makefile.inc Mon Sep 27 11:10:57 2010
> @@ -103,17 +103,24 @@ CPU=X64
>  !IF "$(BUILD_CPU)" == "ia64" || "$(BUILD_CPU)" == "i64"
>  CPU=I64
>  !ENDIF
> -!ENDIF
> -# Figure out CPU from the current host
> -!IF !DEFINED(CPU) || "$(CPU)" == ""
> +!ELSE
>  !IF "$(PROCESSOR_ARCHITECTURE)" == ""
>  !IF "$(PROCESSOR_ARCHITEW6432)" == ""
> -CPU=X86
> +BUILD_CPU=X86
>  !ELSE
> -CPU=$(PROCESSOR_ARCHITEW6432)
> +BUILD_CPU=$(PROCESSOR_ARCHITEW6432)
>  !ENDIF
>  !ELSE
> -CPU=$(PROCESSOR_ARCHITECTURE)
> +BUILD_CPU=$(PROCESSOR_ARCHITECTURE)
> +!ENDIF
> +!IF "$(BUILD_CPU)" == "i386" || "$(BUILD_CPU)" == "x86" || "$(BUILD_CPU)" == "i686"
> +CPU=X86
> +!ENDIF
> +!IF "$(BUILD_CPU)" == "amd64" || "$(BUILD_CPU)" == "x86_64" || "$(BUILD_CPU)" == "x64"
> +CPU=X64
> +!ENDIF
> +!IF "$(BUILD_CPU)" == "ia64" || "$(BUILD_CPU)" == "i64"
> +CPU=I64
>  !ENDIF
>  !ENDIF
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org