Re: Query: how to set #define values in parameters of 'make'

From: Sharad Kala (no_spam.sharadk_ind_at_yahoo.com)
Date: 11/29/04


Date: Mon, 29 Nov 2004 16:50:41 +0530


"Tropos" <tropostropos@yahoo.co.uk> wrote in message

> I have a _TEST_ flag that I want to sometimes set for compilation,
> e.g.
>
> #if _TEST_
> #include "MyTestInterface.h"
> #else
> #include "MyRealInterface.h"
> #endif
>
> But I am in a version-controlled environment where there is a time
> penalty for checking out/checking in the source file or makefile. Is
> there any way I can say something like
>
> make -D_TEST_=1
>
> to set the value of _TEST_ for a single build?

This if offtopic here. But there is a way to achieve what you want. Ask in
news:news.gcc.help

Sharad



Relevant Pages

  • Re: Query: how to set #define values in parameters of make
    ... > But I am in a version-controlled environment where there is a time ... > penalty for checking out/checking in the source file or makefile. ...
    (comp.lang.cpp)
  • Re: Query: How can I set precompiler macro values from the make command line?
    ... > But I am in a version-controlled environment where there is a time ... > penalty for checking out/checking in the source file or makefile. ... using the native Sun compiler and make.) ...
    (comp.unix.programmer)
  • Makefiles
    ... have a shell program source file, say prog.sh, and type "make prog" the make utility will automatically create "prog" and change the mode so it is executable. ... A Makefile defines targets -- prog, for example, is the target of prog.sh -- and dependencies. ... A C program depends upon a object file, not the source file. ... CFLAGS and LDFLAGS are tokens defined to mean something by make; MAINS and OBJECTS are tokens defined locally. ...
    (comp.databases.informix)
  • How to modify and rebuild source code (like Calibrui)?
    ... User Interface Component": ... I need to make a small change to calibrui.cpp, so I edited the source file ... I guess I don't know how to "rebuild the ... calibrui.rc, makefile, makefile.inc, and sources. ...
    (microsoft.public.windowsce.platbuilder)
  • Using make
    ... I have a source file called test.c. ... gcc test.c -o test ... I have both the sourcefile and the Makefile in the same ... mac2 c_assign> make ...
    (comp.lang.c)