Ibrahim,

On Thu, 13 Aug 1998, Ibrahim F Haddad wrote:

> I have a directory that contains 2 sub directories.
> In each of the subdirectories I have a software 
> that uses makefile to compile. So i have 2 makefiles.
> I need to have a makefile in the root directory that
> upon the initation of 'make' would go and 
> do 'make' for the makefiles available in the 2 
> subdirectories.

> the question is: how??? :)

The following makefile snippet should do the job for you.

    all:
            cd subdir_1; $(MAKE) all
            cd subdir_2; $(MAKE) all

The critical thing to keep in mind is that make executes each "line" in
its own shell.  As such, the "cd" and the corresponding "make" should
belong to the same "line" as far as make is concerned.

        -Walid

==================================================================
Walid Keirouz                     Computer Science---Byblos Campus
E-mail: [EMAIL PROTECTED]          Lebanese American University
Tel:    +961 (9) 547-254 x2361    475 Riverside Drive #1846
Fax:    +961 (9) 944-851          New York, NY 10115

Reply via email to