help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recursive use of Gmake


From: Jean-Paul . Cloarec
Subject: Recursive use of Gmake
Date: Fri, 7 Feb 2003 09:57:11 +0100

Hello all,

I repost this because I have trouble to use something I don't
understand....
Is it easy or a pain to explain ?

Thank you for your help
With regards
Jean-Paul

---------------------- Forwarded by Jean-Paul CLOAREC/FR/ALCATEL on
07/02/2003 09:55 ---------------------------


Jean-Paul CLOAREC/FR/address@hidden@gnu.org on 04/02/2003 10:20:39

Sent by:  address@hidden


To:   address@hidden
cc:
Subject:  Recursive use of Gmake



Hello,

There is something I don't understand regarding recursive make
>From the manual , I got this :
SUBDIRS = foo bar baz

  .PHONY: subdirs $(SUBDIRS)

  subdirs: $(SUBDIRS)

  $(SUBDIRS):
          $(MAKE) -C $@

  foo: baz


What I don't understand is subdirs target
What is the difference with the following :

SUBDIRS = foo bar baz

  .PHONY: $(SUBDIRS)

  $(SUBDIRS):
          $(MAKE) -C $@

  foo: baz

I tried it. It seems to work fine :
% Gmake
( cd baz; Gmake )
Gmake[1]: Entering directory `/vob/cncs_training_ni/FICHE1/baz'
cc -o toto toto.c
Gmake[1]: Leaving directory `/vob/cncs_training_ni/FICHE1/baz'
( cd foo; Gmake )
Gmake[1]: Entering directory `/vob/cncs_training_ni/FICHE1/foo'
cc -o toto toto.c
Gmake[1]: Leaving directory `/vob/cncs_training_ni/FICHE1/foo'

So, what is the purpose of subdirs ?

Thank you for your help
Best regards
jena-paul





_______________________________________________
Help-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-make






reply via email to

[Prev in Thread] Current Thread [Next in Thread]