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

Reply via email to