Re: makefile question

  • From: "Tyler Littlefield" <tyler@xxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Tue, 30 Dec 2008 10:41:24 -0700

I've got a quick question.
I want to strip symbols based on whether the user wants debugging mode on. in 
the top of my file, I have:
DEBUG=yes
now, lower down I have:
 ifeq ($(DEBUG),yes)
  @strip -X -g $@
 endif
when I compile with make, I get:
ifeq (yes,yes)
/bin/sh: -c: line 0: syntax error near unexpected token `yes,yes'
/bin/sh: -c: line 0: `ifeq (yes,yes)'
make: *** [main.o] Error 2
tyler@tds:~/skel$ 
it looks like it's trying to execute my if statement... any ideas?

  ----- Original Message ----- 
  From: Ken Perry 
  To: programmingblind@xxxxxxxxxxxxx 
  Sent: Saturday, December 27, 2008 8:53 AM
  Subject: RE: makefile question


  You could put it in variables but if you are seriously trying to make your 
compile work better you might want to look into jam it's a better make system 
and it builds source much faster and does dependencies much better.  The boost 
libraries use Jam because of that very fact.  

   

  Ken

   

  From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Tyler Littlefield
  Sent: Saturday, December 27, 2008 12:42 AM
  To: programmingblind@xxxxxxxxxxxxx
  Subject: Re: makefile question

   

  awesome, thanks. so I just need to add a cd;make to the root for each of the 
folders.

  wonder if there's an easier way of doing that (like storing the list of dirs 
in a variable) or something... I'll have to check in to it.

   

    ----- Original Message ----- 

    From: Ken Perry 

    To: programmingblind@xxxxxxxxxxxxx 

    Sent: Friday, December 26, 2008 8:32 PM

    Subject: RE: makefile question

     

     

     

    You add the make file in the next level in the make file of the first level 
as one of the commands to execut in the lower level.  I have a 3 level tree in 
my current make file system and in the first level it looks something like this 
:

     

    all:          $(BINDIR)$(SERVER)

                    cd scripts;make "MAKEFILE=${MAKEFILE}"

                    cd utilities;make 

                    cd key;make

    cd compiler;make "MAKEFILE=${MAKEFILE}"

    cd language;make "MAKEFILE=${MAKEFILE}"

                    cd mplex;make "MAKEFILE=${MAKEFILE}"

    cd Utility;make "MAKEFILE=${MAKEFILE}"

     

    d 

     

    From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Tyler Littlefield
    Sent: Friday, December 26, 2008 2:26 PM
    To: programmingblind@xxxxxxxxxxxxx
    Subject: makefile question

     

    Hello list,

    I've got a quick question.

    I've got a set of programs, each in their own separate folder with 
makefiles to match.

    This works, but when I want to build the whole package I have to go from 
directory to directory.

    Is there a way perhaps, to make a makefile compile with other makefiles 
under separate directories? I'd just like one main makefile that will run the 
makefiles in sub directories, and pass in the argument.

    So, if I'm at the root of the directory and I want to clean the package, 
make clean would go to directories a,b,c,d,e and run make clean, etc.

    TIA,

     

Other related posts: