[H-GEN] gnu make command-line target ordering problems?
Ben Carlyle
benc at foxboro.com.au
Tue Oct 19 00:55:59 EDT 1999
[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]
I wrote,
> Solution 2: Your suggested approach (the one I tried before Solution 1)
> 2a ---
> objects: ${OBJS}
> ship_templates
> clean_out_templates:
> clean_templates
> include ${OBJS:%.o=%.d}
> ---
> or perhaps
> 2b ---
> objects: clean_out_templates ${OBJS} ship_all_templates
> clean_out_templates:
> clean_templates
> ship_all_templates: ${OBJS}
> ship_templates
> include ${OBJS:%.o=%.d}
> ---
>
> where
> foo.d is
> ---
> foo.o foo.d: clean_out_templates foo.c foo.h bar.h
> ---
I have just given this setup a trial, and have come to the conclusion
that it is unworkable when .d files are being automatically generated
(as they are in my system). clean_out_templates cannot be specified
as a dependancy of foo.d, or the make will fall into an infinite loop.
The only way to do this would be to split it out into two separate
depenancy targets, one for .d and one for .o. This is simply getting
too complicated too fast.
If anyone on the list can suggest a better method or a way to make
this one work, I'd be interested to hear.
Benjamin.
--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.
More information about the General
mailing list