Thread: Another makefile question

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    29

    Another makefile question

    I have a recursive make structure (i.e. make calls the makefiles in subdirectories). I am in the process of generalizing this and so I made a target called subdirs as follows:

    subdirs:
    $(foreach SUBDIR, $(SUBDIRS), $(MAKE) -C $(SUBDIR) all; )

    where the variable SUBDIRS is the list of subdirectories. The problem is that if one of the makefiles in the subdirectories errors, the make continues with the next subdirectory. Is there a way to use eval here? I tried and keep getting error missing seperator messages. Also, is there a way that I can get the subdirectories without having to explicitly type them in the list?

    Thanks!
    chacham15
    Last edited by chacham15; 10-24-2008 at 01:42 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quick Compilation Question
    By chacham15 in forum C Programming
    Replies: 10
    Last Post: 10-12-2008, 08:15 PM
  2. A question about an interesting Makefile
    By meili100 in forum Tech Board
    Replies: 2
    Last Post: 08-12-2008, 03:56 PM
  3. about Makefile and Macro
    By tom_mk in forum C++ Programming
    Replies: 1
    Last Post: 09-18-2003, 01:07 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Makefile Newbie: Inheritance Question
    By Ashes999 in forum C++ Programming
    Replies: 2
    Last Post: 07-10-2003, 02:34 AM