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/ALCATEL@[EMAIL PROTECTED] on 04/02/2003 10:20:39

Sent by:  [EMAIL PROTECTED]


To:   [EMAIL PROTECTED]
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
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make




_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to