[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make and recursion
From: |
Jimmy DEVEIL |
Subject: |
Make and recursion |
Date: |
Thu, 12 Oct 2006 15:26:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3 |
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 : address@hidden
address@hidden
======================================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Make and recursion,
Jimmy DEVEIL <=