This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: qeustion about make


%% 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]