Hi all,

I use GNU Make to compile a complex project.
This project is composed of several modules interdependant (one module by directory)
I use make recursively to visit all directories and sub-directories.

But I want to launch another make in another directory (not a sub-directory).
Ex:

/
|- src
   |- module1
   |  |- sub-module1
   |  |- sub-module2 (depend module2/sub-module1)
   |- module2
      |- sub-module1
      |- sub-module2 (depend module1/sub-module1)

I use a target like :
depdirs: ${DEPDIRS}
${DEPDIRS}:
        @echo $@ > .history
        $(MAKE) -C $@ $(MAKECMDGOALS)

When make is executed, it found the dependance of module1/sub-module2 and execute another make in module2/sub-module1... ok But when it arrives in module1, make (recursively) execute another make in subdirectories and remake module2/sub-module1...

To avoid this I use a .history file and a if statement in make to write rules or not.

But if an error occured in the first call of module2/sub-module1,
my .history file contained the log of execution of make and don't execute another make (in subdirectories call or in another call of 'make all')

- I try to use .DELETE_ON_ERROR to delete the .history file or the line in this file without success (the file isn't a target). - I try to launch specific target on errors (to launch scripts like 'sed') without success.

Anyone can help me ?
thx :)
--
======================================================
 Jimmy DEVEIL                  DGAC/DSNA/DTI/SDER/ATT
 Tel :  01 69 57 69 08
 mail : [EMAIL PROTECTED]
        [EMAIL PROTECTED]
======================================================


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to