Hi, dear all,

in the win ce .net help doc says :

============================================

Conditional statements in sources files are not supported.
The following code example shows that Build.exe ignores
the first, second, fourth, and sixth lines, and appends
the SOURCES macro twice.
# Bad example
!IF "$(LOCALE)" == "0409"
SOURCES= $(SOURCES) us-src.c
!ELSE
SOURCES= $(SOURCES) inter-src.c
!ENDIF

====================================

However, !IF and !ELSE is used in every sample source
files. for example :

===================================

DOSYSGEN=1

!IFDEF DOSYSGEN

TARGETNAME = KBDHID_LIB
TARGETTYPE = LIBRARY
TARGETDEFNAME = KBDHID

DEFFILE=$(TARGETDEFNAME).def
WINCETARGETFILE0=$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)
\$(TARGETDEFNAME).def

!ELSE

TARGETNAME = KBDHID
TARGETTYPE = DYNLINK

TARGETLIBS = \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \

DLLENTRY = DllEntry

!ENDIF

SOURCES= \
kbdhid.cpp \
kbd.cpp \

=======================================

What is this going on?
Is this the reason that I only get KBDHID_LIB.lib, but
doesn't get KBDHID.dll?
But it seems not.
Help, I just can't get my kbdhid.dll


KY

Re: about sources file by Steve

Steve
Tue Sep 23 22:33:51 CDT 2003

The documentation is correct. It's just not entirely clear that it's
exclusively limited to the SROURCES macro and not to SOURCES files in
general.
Thus the sample:
# Bad example
!IF "$(LOCALE)" == "0409"
SOURCES= $(SOURCES) us-src.c
!ELSE
SOURCES= $(SOURCES) inter-src.c
!ENDIF

In this, bad, sample the settings are trying to create a conditional list of
files to compile. That won't work. However anywhere else the conditionals
are perfectly fine.

--
Steve Maillet (eMVP)
Entelechy Consulting
smaillet_AT_EntelechyConsulting_DOT_com



Re: about sources file by kuoyu

kuoyu
Wed Sep 24 03:41:26 CDT 2003

Thanks, steve.

KY.
>-----Original Message-----
>The documentation is correct. It's just not entirely
clear that it's
>exclusively limited to the SROURCES macro and not to
SOURCES files in
>general.
>Thus the sample:
># Bad example
>!IF "$(LOCALE)" == "0409"
> SOURCES= $(SOURCES) us-src.c
>!ELSE
> SOURCES= $(SOURCES) inter-src.c
>!ENDIF
>
>In this, bad, sample the settings are trying to create a
conditional list of
>files to compile. That won't work. However anywhere else
the conditionals
>are perfectly fine.
>
>--
>Steve Maillet (eMVP)
>Entelechy Consulting
>smaillet_AT_EntelechyConsulting_DOT_com
>
>
>.
>