[Top][All Lists]

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

Re: problems in macros

From: Bruce Korb
Subject: Re: problems in macros
Date: Tue, 27 Dec 2005 09:42:34 -0800
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Adnan Shaheen wrote:
Hi there,

I want to know how can i define macros in my file.
If i can do it how i will define a macro TESTING in the

For my code as
#ifdef TESTING
do this
#else // if not defined TESTING
do that
#endif // TESTING

Hi Adnan,

You're speaking the wrong language.  The file is
a mixture of m4 + Bourne shell.  Your conditionals appear to be
C preprocessing conditional code.  Anyway, it is cleaner to
define two macros and then:

  [if ${TESTING} ; then]

with all those funny '[' and ']' thingeys making it clear that
the "enclosed" text is plain shell scripting and not for the
M4 processor to figure out.

Cheers - Bruce

reply via email to

[Prev in Thread] Current Thread [Next in Thread]