[mercury-users] Recursive make considered harmful

Peter Ross pro at missioncriticalit.com
Tue Nov 8 07:49:13 AEDT 2005


On Mon, Nov 07, 2005 at 03:17:14PM +0100, Peter Ross wrote:
> OBJ := $(patsubst %.m,%.o,$(SRC))
> 
> include $(OBJ:.o=.myd)
> 
> %.myd: %.m
> 	mmc --generate-dependencies $*.m
> 	rm $(notdir $*.dep $*.dv)
> 	mv $(notdir $*.d) $*.myd
> 
> 
> The second problem is that in the above the .d is in the wrong
> directory, however I think that is more a problem with my definition
> of the Mmakefile.
> 
Actually I remember what the problem here is

Effectively I want the rule

	main.d: ant/main.m

but I don't know how to express that using the "%.d: %.m" notation,
hence my use of the "%.myd: %.m" and the mv to place the file in the
correct directory.

If anyone knows how to solve that problem, it would be most appreciated.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list