This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: qeustion about make
- To: Mohammad Saleem <mosa at enea dot se>
- Subject: Re: qeustion about make
- From: "Paul D. Smith" <psmith at gnu dot org>
- Date: 08 Nov 2001 09:39:23 -0500
- Cc: automake at gnu dot org
- List-Id: Discussion list for automake <automake.gnu.org>
- Organization: GNU's Not Unix!
- References: <3BEA7E87.3020306@enea.se>
- Reply-To: psmith at gnu dot org
%% Mohammad Saleem <mosa@enea.se> writes:
ms> I am using gnu make 3.79.1.
ms> I have a question regarding make. My question is that I want to define a
ms> symbol on command line. How to do with make?
ms> For example if I want to define MYOBJECT symbol, how to write?
ms> I even tried with
ms> prompt> make -D MYOBJECT test.c
ms> didn't work.
This is not actually an automake question; you should better address it
to help-make@gnu.org.
The answer to your question is that the make variable CPPFLAGS is used
to hole C preprocessor flags. So, if you want to change or the flags
that are passed to the preprocessor, you would override that make
variable on the command line, like this:
$ make CPPFLAGS='-D MYOBJECT'
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist