[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xutils / imake and CrossCompile



On Wed, Mar 31, 2004 at 12:03:22PM +1000, David Gardiner wrote:
> Hey All,
> 
> I've just upgraded my one of the boxes I work on and found that 
> CrossCompile is now being defined in imake. In the  version I was 
> running previously (which I have on another machine) it was not defined 
> is there any reason for this change?
[...]
> Test.tmpl
> ----------------------------------------------------
> #include <Imake.cf>
> #include <Test.cf>
> ----------------------------------------------------
> 
> Test.cf
> ----------------------------------------------------
> #ifdef CrossCompiling
> CROSS_COMPILE = DODAH
> #else
> #define CrossCompiling          NO
> CROSS_COMPILE =
> #endif /* CrossCompiling */
> ----------------------------------------------------

That's not how to test for booleans in Imake.

Use:

#ifdef CrossCompiling
# if CrossCompiling
/* foo */
# endif
#endif

...instead.

As you can see below, Imake.tmpl now defines CrossCompiling to NO if
it's not defined.

~/packages/xfree86/4.3.0/xfree86-4.3.0/build-tree/xc/config/cf % grep -5 'define[[:space:]]\+CrossCompiling' *
Amoeba.cf- * and installation of binaries and data files from the Unix host to
Amoeba.cf- * the Amoeba file system.
Amoeba.cf- */
Amoeba.cf-
Amoeba.cf-/* #ifdef CROSS_COMPILING */
Amoeba.cf:#define CrossCompiling          YES
Amoeba.cf-
Amoeba.cf-#define HostLinkRule(target, flags, src, libs)  cc -o target src
Amoeba.cf-
Amoeba.cf-#define LinkRule(program,options,objects,libraries) \
Amoeba.cf-$(LD) $(ALDFLAGS) $(HEAD) -o program options objects libraries $(EXTRA_LOAD_FLAGS)
--
Imake.tmpl- */
Imake.tmpl- _NULLCMD_ = NullMakeCommand
Imake.tmpl-#endif
Imake.tmpl-
Imake.tmpl-#ifndef CrossCompiling
Imake.tmpl:#define CrossCompiling               NO
Imake.tmpl-#undef  CrossCompileDir
Imake.tmpl-#endif
Imake.tmpl-#ifndef BourneShell                  /* to force shell in makefile */
Imake.tmpl-#define BourneShell          /bin/sh
Imake.tmpl-#endif
--
iPAQH3600.cf- * To use this, add the following to host.def:
iPAQH3600.cf-   #define KDriveXServer YES
iPAQH3600.cf-   #define XiPAQH3500Server YES
iPAQH3600.cf- */
iPAQH3600.cf-
iPAQH3600.cf:#define CrossCompiling YES
iPAQH3600.cf-
iPAQH3600.cf-#undef i386Architecture
iPAQH3600.cf-#define Arm32Architecture
iPAQH3600.cf-
iPAQH3600.cf-#undef OptimizedCDebugFlags
--
itsy.cf- * To use this, add the following to host.def:
itsy.cf-   #define KDriveXServer YES
itsy.cf-   #define XItsyServer YES
itsy.cf- */
itsy.cf-
itsy.cf:#define CrossCompiling YES
itsy.cf-
itsy.cf-#undef i386Architecture
itsy.cf-#define Arm32Architecture
itsy.cf-
itsy.cf-#undef OptimizedCDebugFlags
--
nto.cf-#define StripInstalledPrograms   NO
nto.cf-#define BuildLBX         YES
nto.cf-#define ForceNormalLib           YES
nto.cf-
nto.cf-#define SourceDefines            -D_POSIX_SOURCE -D_QNX_SOURCE
nto.cf:#define CrossCompiling           NO
nto.cf-#define DoRanlibCmd              YES
nto.cf-#define GccUsesGas               YES
nto.cf-#define MkdirHierCmd             mkdir -p
nto.cf-
nto.cf-#ifdef UseInstalled

-- 
G. Branden Robinson                |       If we believe absurdities, we
Debian GNU/Linux                   |       shall commit atrocities.
branden@debian.org                 |       -- Voltaire
http://people.debian.org/~branden/ |

Attachment: signature.asc
Description: Digital signature


Reply to: